diff options
author | Heshan <heshan@heidisoft.com> | 2011-03-13 00:03:05 +0530 |
---|---|---|
committer | Heshan <heshan@heidisoft.com> | 2011-03-13 00:03:05 +0530 |
commit | f53f62a5ecf8343941e2c74d06b429bb271d7df2 (patch) | |
tree | 788ce5cb10e20aa104b2b9975a0b07304fef63b5 /includes/transcoder.inc | |
parent | d47e35b2a2c56ecbfc813433d96082394f98136b (diff) | |
download | video-f53f62a5ecf8343941e2c74d06b429bb271d7df2.tar.gz video-f53f62a5ecf8343941e2c74d06b429bb271d7df2.tar.bz2 |
Completed some transcoding stuff and tested the video convert on save.
Diffstat (limited to 'includes/transcoder.inc')
-rw-r--r-- | includes/transcoder.inc | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/includes/transcoder.inc b/includes/transcoder.inc index 994ab47..e5f7123 100644 --- a/includes/transcoder.inc +++ b/includes/transcoder.inc @@ -89,22 +89,19 @@ class video_transcoder { } public function convert_video(&$video) { + // load the presets $video_preset = new video_preset(); $presets = $video_preset->properties(); $video->presets = $presets; $output = $this->transcoder->convert_video($video); // if successfully converted the video then update the status to publish - if ($output) + if ($output && variable_get('video_publish_on_complete', TRUE)) // Update our node id to published. We do not do a node_load as it causes editing problems when saving. - db_query("UPDATE {node} SET status=%d WHERE nid=%d", 1, $video->nid); - - // If they are using metadata. - // @TODO : add meta data support -// if (variable_get('video_metadata', FALSE)) { -// module_load_include('inc', 'video', '/includes/metadata'); -// $metadata = new video_metadata; -// $metadata->process($converted); -// } + db_update('node') + ->fields(array( + 'status' => NODE_PUBLISHED)) + ->condition('nid', $video->nid, '=') + ->execute(); return $output; } @@ -171,10 +168,6 @@ class video_transcoder { return $this->transcoder->create_job($video, $nid); } - public function update_job($video) { - return $this->transcoder->update_job($video); - } - public function delete_job($video) { return $this->transcoder->delete_job($video); } @@ -203,8 +196,6 @@ interface transcoder_interface { public function create_job($video, $nid); - public function update_job($video); - public function delete_job($video); public function load_job($fid); |