diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/conversion.inc | 4 | ||||
-rw-r--r-- | includes/transcoder.inc | 6 | ||||
-rw-r--r-- | includes/video_helper.inc | 10 |
3 files changed, 11 insertions, 9 deletions
diff --git a/includes/conversion.inc b/includes/conversion.inc index 8b1c165..b9be2b4 100644 --- a/includes/conversion.inc +++ b/includes/conversion.inc @@ -89,8 +89,8 @@ class video_conversion { return $this->transcoder->load_completed_job($video); } - public function create_job($video) { - return $this->transcoder->create_job($video); + public function create_job($video, $nid) { + return $this->transcoder->create_job($video, $nid); } public function update_job($video) { diff --git a/includes/transcoder.inc b/includes/transcoder.inc index a57fe91..994ab47 100644 --- a/includes/transcoder.inc +++ b/includes/transcoder.inc @@ -167,8 +167,8 @@ class video_transcoder { return $this->transcoder->get_dimensions($video); } - public function create_job($video) { - return $this->transcoder->create_job($video); + public function create_job($video, $nid) { + return $this->transcoder->create_job($video, $nid); } public function update_job($video) { @@ -201,7 +201,7 @@ class video_transcoder { interface transcoder_interface { - public function create_job($video); + public function create_job($video, $nid); public function update_job($video); diff --git a/includes/video_helper.inc b/includes/video_helper.inc index b41f657..a4f2b65 100644 --- a/includes/video_helper.inc +++ b/includes/video_helper.inc @@ -54,13 +54,15 @@ class video_helper { $video->autobuffering = variable_get('video_autobuffering', TRUE); $video->theora_player = variable_get('video_ogg_player', 'http://theora.org/cortado.jar'); // lets find out if we have transcoded this file and update our paths. - if (isset($field_settings['autoconversion']) && $field_settings['autoconversion'] - && !$variables['item']['bypass_autoconversion']) { + if (isset($field_settings['autoconversion']) && $field_settings['autoconversion']) { // discard all existing file data - $video->files = new stdClass(); module_load_include('inc', 'video', '/includes/conversion'); $conversion = new video_conversion; - $conversion->load_completed_job($video); + if ($conversion->load_job($variables['item']['fid'])) { + // reset the video files object and add converted videos in to it + $video->files = new stdClass(); + $conversion->load_completed_job($video); + } } // Let othere module to load the video files by referance // Lets find out if we have pushed this file to the cdn if enabled. |