aboutsummaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorHeshan <heshan@heidisoft.com>2011-03-11 23:09:50 +0530
committerHeshan <heshan@heidisoft.com>2011-03-11 23:09:50 +0530
commitd47e35b2a2c56ecbfc813433d96082394f98136b (patch)
tree6f19f445f0065d1eaefbcafd0fafc49980583c53 /includes
parenta9addd6ed7ab0e15e1d4b3db4c67ea9b00578d2d (diff)
downloadvideo-d47e35b2a2c56ecbfc813433d96082394f98136b.tar.gz
video-d47e35b2a2c56ecbfc813433d96082394f98136b.tar.bz2
Adding video autoconversion and ported video_ffmpeg database queries to D7
Diffstat (limited to 'includes')
-rw-r--r--includes/conversion.inc4
-rw-r--r--includes/transcoder.inc6
-rw-r--r--includes/video_helper.inc10
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.