本文整理汇总了PHP中Video::get_list方法的典型用法代码示例。如果您正苦于以下问题:PHP Video::get_list方法的具体用法?PHP Video::get_list怎么用?PHP Video::get_list使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Video
的用法示例。
在下文中一共展示了Video::get_list方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
function index()
{
$video = new Video();
if (!isset($_SESSION['user_id']) || empty($_SESSION['user_id'])) {
$this->error = "Please Login";
return;
}
$this->inProgress = $video->get_list(array("isConverted" => "0", "user_id" => $_SESSION['user_id']));
$page = (int) (isset($_GET['page']) && is_numeric($_GET['page'])) ? $_GET['page'] : 1;
$video->getPages(false, false, $_SESSION['user_id']);
$allPagesFromCurrentUser = $video->allVideos;
$showPerSite = 5;
$this->Seiten = (int) ceil($allPagesFromCurrentUser / $showPerSite);
$this->page = $page;
$start_pointer = (int) ($page * $showPerSite) - $showPerSite;
$this->obj = $video->getPages($start_pointer, $showPerSite, $_SESSION['user_id']);
}
示例2: _
<?php
}
?>
</div>
</div>
<div class="large-12 columns">
<h1><?php
echo _("Recent Videos");
?>
</h1>
</div>
<?php
$video = new Video();
$data = $video->get_list(array("isConverted" => 1, "visibility_setting" => 1), "1, 9");
$i = 0;
foreach ($data as $row) {
?>
<div class="large-4 small-6 columns">
<a href="<?php
echo Config::get('address');
?>
/video/view?id=<?php
echo $row->id;
?>
">
<img src="<?php
echo Config::get('address');
?>
示例3: getmypid
<?php
include "init.php";
file_put_contents("job-pid.lock", getmypid());
$pids = array();
while (true) {
$newJob = new Video();
$obj = $newJob->get_list(array("isConverted" => 0));
if (count($obj) > 0) {
file_put_contents("job.lock", "working");
} else {
sleep(1);
continue;
}
foreach ($obj as $video) {
$ffmpeg = new FFmpeg(Config::get('basedir') . "/public/upload/" . $video->filename);
$ffmpeg->convertVideo("webm");
$ffmpeg->convertVideo("mp4");
if (!is_dir(Config::get('basedir') . "/public/video/" . $video->user_id)) {
mkdir(Config::get('basedir') . "/public/video/" . $video->user_id);
}
if (!is_dir(Config::get('basedir') . "/public/video/" . $video->user_id . "/" . $video->id)) {
mkdir(Config::get('basedir') . "/public/video/" . $video->user_id . "/" . $video->id);
}
rename(Config::get('basedir') . "/public/upload/" . $video->filename . ".mp4", Config::get('basedir') . "/public/video/" . $video->user_id . "/" . $video->id . "/" . $video->id . ".mp4");
rename(Config::get('basedir') . "/public/upload/" . $video->filename . ".webm", Config::get('basedir') . "/public/video/" . $video->user_id . "/" . $video->id . "/" . $video->id . ".webm");
rename(Config::get('basedir') . "/public/upload/" . $video->filename, Config::get('basedir') . "/public/video/" . $video->user_id . "/" . $video->id . "/" . $video->id . ".basefile");
rename(Config::get('basedir') . "/public/upload/" . $video->filename . "_thumbs1/00000001.png", Config::get('basedir') . "/public/video/" . $video->user_id . "/" . $video->id . "/thumb1.png");
rename(Config::get('basedir') . "/public/upload/" . $video->filename . "_thumbs2/00000001.png", Config::get('basedir') . "/public/video/" . $video->user_id . "/" . $video->id . "/thumb2.png");
rename(Config::get('basedir') . "/public/upload/" . $video->filename . "_thumbs3/00000001.png", Config::get('basedir') . "/public/video/" . $video->user_id . "/" . $video->id . "/thumb3.png");
rmdir(Config::get('basedir') . "/public/upload/" . $video->filename . "_thumbs1");