You are here

public function video_ffmpeg::delete_job in Video 7

Same name and namespace in other branches
  1. 6.4 transcoders/video_ffmpeg.inc \video_ffmpeg::delete_job()

Interface Implementations

Overrides transcoder_interface::delete_job

See also

sites/all/modules/video/includes/transcoder_interface#delete_job()

1 call to video_ffmpeg::delete_job()
video_ffmpeg_php::delete_job in transcoders/video_ffmpeg_php.inc
Interface Implementations
1 method overrides video_ffmpeg::delete_job()
video_ffmpeg_php::delete_job in transcoders/video_ffmpeg_php.inc
Interface Implementations

File

transcoders/video_ffmpeg.inc, line 444

Class

video_ffmpeg

Code

public function delete_job($video) {
  $video = (object) $video;
  if (!($video = $this
    ->load_job($video->fid))) {
    return;
  }

  // converted output values
  $converted = unserialize($video->data);
  if (!empty($converted)) {
    foreach ($converted as $file) {
      if (file_exists(drupal_realpath($file->uri))) {
        @drupal_unlink($file->uri);
      }
    }
  }

  //now delete our rows.
  db_delete('video_files')
    ->condition('fid', $video->fid)
    ->execute();
}