public function video_phpvideotoolkit::load_completed_job in Video 7
Interface Implementations
Overrides transcoder_interface::load_completed_job
See also
sites/all/modules/video/includes/transcoder_interface#load_completed_job()
File
- transcoders/
video_phpvideotoolkit.inc, line 527
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}->extension = $extension;
$video->player = strtolower($extension);
}
}
else {
return FALSE;
}
}