function _video_process_video in Video 6.5
2 calls to _video_process_video()
File
- ./
video.module, line 749 - Main file of the Video module.
Code
function _video_process_video(stdClass $video, video_transcoder $transcoder, video_filesystem $filesystem, array $presets) {
// Make sure this video is pending or do nothing.
if ($video->status != VIDEO_RENDERING_PENDING) {
return NULL;
}
if (!file_exists($video->filepath)) {
$transcoder
->change_status($video, VIDEO_RENDERING_FAILED);
watchdog('video', 'The video module tried to transcode %filepath, but the file can\'t be found.', array(
'%filepath' => $video->filepath,
), WATCHDOG_ERROR);
return FALSE;
}
$video->presets = $presets;
if (!$filesystem
->onpreconvert($video)) {
return FALSE;
}
if (!$transcoder
->convert_video($video)) {
return FALSE;
}
if (!$filesystem
->onpostconvert($video)) {
return FALSE;
}
db_query('UPDATE {node} SET status=%d WHERE nid = %d', 1, $video->nid);
return TRUE;
}