aboutsummaryrefslogtreecommitdiff
path: root/plugins/video_ffmpeg_helper/video_scheduler.php
diff options
context:
space:
mode:
authorHeshan Wanigasooriya <heshanmw@gmail.com>2009-06-01 01:10:32 +0000
committerHeshan Wanigasooriya <heshanmw@gmail.com>2009-06-01 01:10:32 +0000
commit62eb579d771b8b25fc0e84f379be7e3528463cb2 (patch)
tree9fa870bb5198840ba7828a73d32a79fdd9b59f25 /plugins/video_ffmpeg_helper/video_scheduler.php
parent2d7faf7031f7a3c1867c6777ab9d00806e800552 (diff)
downloadvideo-62eb579d771b8b25fc0e84f379be7e3528463cb2.tar.gz
video-62eb579d771b8b25fc0e84f379be7e3528463cb2.tar.bz2
updating video_ffmpeg_helper module
Diffstat (limited to 'plugins/video_ffmpeg_helper/video_scheduler.php')
-rw-r--r--plugins/video_ffmpeg_helper/video_scheduler.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/video_ffmpeg_helper/video_scheduler.php b/plugins/video_ffmpeg_helper/video_scheduler.php
index b33da11..58c9e7b 100644
--- a/plugins/video_ffmpeg_helper/video_scheduler.php
+++ b/plugins/video_ffmpeg_helper/video_scheduler.php
@@ -20,7 +20,7 @@
*/
// set to the ffmpeg executable
-define('VIDEO_RENDERING_FFMPEG_PATH', '/usr/bin/ffmpeg');
+define('VIDEO_RENDERING_FFMPEG_PATH', '/home2/heidisof/bin/./ffmpeg');
// set to the temp file path.
//IMPORTANT: the user who runs this script must have permissions to create files there. If this is not the case the default php temporary folder will be used.
@@ -48,7 +48,8 @@ if (isset($_SERVER['argv'][1])) {
$_SERVER['HTTP_HOST'] = $url['host'];
}
-module_load_include('/includes/bootstrap.inc', 'video_scheduler', 'includes/bootstrap');
+include_once('./includes/bootstrap.inc');
+//module_load_include('/includes/bootstrap.inc', 'video_scheduler', 'includes/bootstrap');
// disable error reporting for bootstrap process
error_reporting(E_ERROR);
// let's bootstrap: we will be able to use drupal apis
@@ -107,12 +108,12 @@ function video_scheduler_select() {
// TODO: use db_query_range
$jobs = array();
$i = 0;
- $count = db_num_rows($result);
+ $count = db_result(db_query('SELECT COUNT(*) FROM {video_rendering} vr INNER JOIN {node} n ON vr.vid = n.vid INNER JOIN {video} v ON n.vid = v.vid WHERE n.nid = v.nid AND vr.nid = n.nid AND vr.status = %d ORDER BY n.created', VIDEO_RENDERING_PENDING));
while($i < $count && $i < VIDEO_RENDERING_FFMPEG_INSTANCES) {
$jobs[] = db_fetch_object($result);
$i++;
}
-
+//print_r($jobs);
return $jobs;
}