You are here

function _video_ffmpeg_helper_add_rendering in Video 6.2

Same name and namespace in other branches
  1. 5 plugins/video_ffmpeg_helper/video_ffmpeg_helper.module \_video_ffmpeg_helper_add_rendering()
  2. 6 plugins/video_ffmpeg_helper/video_ffmpeg_helper.module \_video_ffmpeg_helper_add_rendering()

Add a video conversion rendering process to the queue

1 call to _video_ffmpeg_helper_add_rendering()
video_ffmpeg_helper_nodeapi in plugins/video_ffmpeg_helper/video_ffmpeg_helper.module
Implementation of hook_nodeapi()

File

plugins/video_ffmpeg_helper/video_ffmpeg_helper.module, line 316
Provide some api for use ffmpeg. Simplify video nodes creation.

Code

function _video_ffmpeg_helper_add_rendering(&$node) {
  $file = _video_upload_get_file($node->new_video_upload_file_fid);

  //print_r($node); die;
  db_query('INSERT INTO {video_rendering} (vid, nid, origfile, pid, status, started, completed) VALUES (%d, %d, \'%s\', %d, %d, %d, %d)', $node->vid, $node->nid, $file->filepath, 0, VIDEO_RENDERING_PENDING, 0, 0);
  drupal_set_message(t('Video submission queued for processing. Please wait: our servers are preparing your video for web displaying.'));

  // let's add the rendering in progress video
  $node->vidfile = variable_get('video_ffmpeg_helper_auto_cvr_busy_video_path', 'busy.flv');
  db_query('UPDATE {video} SET vidfile = \'%s\' WHERE nid=%d AND vid=%d', $node->vidfile, $node->nid, $node->vid);
}