public function video_ffmpeg::load_completed_job in Video 7
Same name and namespace in other branches
- 6.4 transcoders/video_ffmpeg.inc \video_ffmpeg::load_completed_job()
Interface Implementations
Overrides transcoder_interface::load_completed_job
See also
sites/all/modules/video/includes/transcoder_interface#load_completed_job()
1 call to video_ffmpeg::load_completed_job()
- video_ffmpeg_php::load_completed_job in transcoders/
video_ffmpeg_php.inc - Interface Implementations
1 method overrides video_ffmpeg::load_completed_job()
- video_ffmpeg_php::load_completed_job in transcoders/
video_ffmpeg_php.inc - Interface Implementations
File
- transcoders/
video_ffmpeg.inc, line 497
Class
Code
public function load_completed_job(&$video) {
$file = $this
->load_job($video->fid);
$data = unserialize($file->data);
if (!empty($data)) {
foreach ($data as $value) {
$extension = pathinfo(drupal_realpath($value->uri), PATHINFO_EXTENSION);
$video->files->{$extension}->filename = $value->filename;
$video->files->{$extension}->filepath = $value->uri;
$video->files->{$extension}->filemime = file_get_mimetype($value->uri);
$video->files->{$extension}->url = file_create_url($value->uri);
$video->files->{$extension}->uri = $value->uri;
$video->files->{$extension}->extension = $extension;
$video->player = strtolower($extension);
}
}
else {
return FALSE;
}
}