You are here

public function video_zencoder::delete_job in Video 6.5

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

Overrides video_transcoder::delete_job

File

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

Class

video_zencoder

Code

public function delete_job(stdClass $video) {

  // Cancel the job
  if ($video->status == VIDEO_RENDERING_ACTIVE && !empty($video->jobid)) {
    module_load_include('lib.inc', 'video_zencoder');
    $zc = new video_zencoder_api();
    $zc
      ->cancel_job($video);
  }
  db_query('DELETE FROM {video_zencoder} WHERE fid = %d', $video->fid);
}