diff options
author | Heshan <heshan@heidisoft.com> | 2011-03-15 20:08:28 +0530 |
---|---|---|
committer | Heshan <heshan@heidisoft.com> | 2011-03-15 20:08:28 +0530 |
commit | 22ea3cf474ec42cf6272fb14a8916240295cff1a (patch) | |
tree | 866d8a40ac08afb598b872572e8ee8cee24de40f /includes/conversion.inc | |
parent | 14c097ff41e0410784aa1fdae7b4312ec70ff5e0 (diff) | |
download | video-22ea3cf474ec42cf6272fb14a8916240295cff1a.tar.gz video-22ea3cf474ec42cf6272fb14a8916240295cff1a.tar.bz2 |
Conversion of the videos are in and tested with mp4 and webm presets
Diffstat (limited to 'includes/conversion.inc')
-rw-r--r-- | includes/conversion.inc | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/includes/conversion.inc b/includes/conversion.inc index ae25245..493532e 100644 --- a/includes/conversion.inc +++ b/includes/conversion.inc @@ -5,16 +5,6 @@ * Class file to handle video conversion using ffmpeg and webservices. * */ -defined('VIDEO_RENDERING_PENDING') || - define('VIDEO_RENDERING_PENDING', 1); -defined('VIDEO_RENDERING_INQUEUE') || - define('VIDEO_RENDERING_INQUEUE', 2); -defined('VIDEO_RENDERING_ACTIVE') || - define('VIDEO_RENDERING_ACTIVE', 5); -defined('VIDEO_RENDERING_COMPLETE') || - define('VIDEO_RENDERING_COMPLETE', 10); -defined('VIDEO_RENDERING_FAILED') || - define('VIDEO_RENDERING_FAILED', 20); class video_conversion { @@ -69,14 +59,18 @@ class video_conversion { private function render($video) { if (!is_object($video)) { - watchdog('video_conversion', 'Video object is not present', array(), WATCHDOG_ERROR); + watchdog('transcoder', 'Video object is not present', array(), WATCHDOG_ERROR); return FALSE; } // Make sure this video is pending or do nothing. if ($video->video_status == VIDEO_RENDERING_PENDING) { return $this->transcoder->convert_video($video); + } else { + $status = array(VIDEO_RENDERING_COMPLETE => 'completed', VIDEO_RENDERING_FAILED => 'failed'); + watchdog('transcoder', 'Video conversion has been !status. You should add video to the queue. Please check the re-queue to enable the video conversion.', + array('!status' => $status[$video->video_status]), WATCHDOG_WARNING); + return FALSE; } - return NULL; } /** |