You are here

public function video_zencoder::load_job_queue in Video 6.5

Same name and namespace in other branches
  1. 6.4 plugins/video_zencoder/transcoders/video_zencoder.inc \video_zencoder::load_job_queue()
  2. 7 modules/video_zencoder/transcoders/video_zencoder.inc \video_zencoder::load_job_queue()

Return at most $num files that need to be transcoded.

Parameters

int $num:

Overrides video_transcoder::load_job_queue

File

plugins/video_zencoder/transcoders/video_zencoder.inc, line 488
Transcoder class file to handle Zencoder settings and conversions.

Class

video_zencoder

Code

public function load_job_queue($num) {
  $videos = array();
  $result = db_query_range('SELECT f.fid, f.filename, f.filepath, f.filemime, f.filesize, zc.vid, zc.nid, zc.dimensions, zc.status, zc.data, zc.jobid FROM {video_zencoder} zc LEFT JOIN {files} f ON zc.fid = f.fid WHERE zc.status = %d AND f.status = %d ORDER BY f.timestamp', VIDEO_RENDERING_PENDING, FILE_STATUS_PERMANENT, 0, $num);
  while ($row = db_fetch_object($result)) {
    $row->data = unserialize($row->data);
    $videos[] = $row;
  }
  return $videos;
}