You are here

function _video_ffmpeg_helper_is_being_processed in Video 6.2

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

Returns true if the video is being encoded or queeded

1 call to _video_ffmpeg_helper_is_being_processed()
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 333
Provide some api for use ffmpeg. Simplify video nodes creation.

Code

function _video_ffmpeg_helper_is_being_processed($node) {
  $result = db_query("SELECT status FROM {video_rendering} WHERE vid = %d AND nid = %d", $node->vid, $node->nid);
  $status = db_result($result);
  if ($status == VIDEO_RENDERING_PENDING || $status == VIDEO_RENDERING_ACTIVE) {

    // video is still being converted
    return TRUE;
  }
  return FALSE;
}