public function video_zencoder::load_completed_job in Video 7
Same name and namespace in other branches
- 6.5 plugins/video_zencoder/transcoders/video_zencoder.inc \video_zencoder::load_completed_job()
- 6.4 plugins/video_zencoder/transcoders/video_zencoder.inc \video_zencoder::load_completed_job()
Interface Implementations
Overrides transcoder_interface::load_completed_job
See also
sites/all/modules/video/includes/transcoder_interface#load_completed_job()
File
- modules/
video_zencoder/ transcoders/ video_zencoder.inc, line 365
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;
}
}