aboutsummaryrefslogtreecommitdiff
path: root/video_formatter.inc
diff options
context:
space:
mode:
authorHeshan <heshan@heidisoft.com>2011-03-11 23:09:50 +0530
committerHeshan <heshan@heidisoft.com>2011-03-11 23:09:50 +0530
commitd47e35b2a2c56ecbfc813433d96082394f98136b (patch)
tree6f19f445f0065d1eaefbcafd0fafc49980583c53 /video_formatter.inc
parenta9addd6ed7ab0e15e1d4b3db4c67ea9b00578d2d (diff)
downloadvideo-d47e35b2a2c56ecbfc813433d96082394f98136b.tar.gz
video-d47e35b2a2c56ecbfc813433d96082394f98136b.tar.bz2
Adding video autoconversion and ported video_ffmpeg database queries to D7
Diffstat (limited to 'video_formatter.inc')
-rw-r--r--video_formatter.inc14
1 files changed, 7 insertions, 7 deletions
diff --git a/video_formatter.inc b/video_formatter.inc
index 1ea9498..0be14f8 100644
--- a/video_formatter.inc
+++ b/video_formatter.inc
@@ -1,6 +1,5 @@
<?php
-
/**
* @file
* Video formatter hooks and callbacks.
@@ -15,14 +14,15 @@ function theme_video($variables) {
$field_settings = $variables['field']['settings'];
$instance_settings = $variables['instance']['settings'];
// Only needs to be ran if they are converting videos
- if (isset($field_settings['autoconversion']) && $field_settings['autoconversion'] && !$variables['item']['bypass_autoconversion']) {
+ if (isset($field_settings['autoconversion']) && $field_settings['autoconversion']) {
module_load_include('inc', 'video', '/includes/conversion');
$conversion = new video_conversion;
- $video = $conversion->load_job($variables['item']['fid']);
- if ($video->video_status == VIDEO_RENDERING_ACTIVE || $video->video_status == VIDEO_RENDERING_PENDING) {
- return theme('video_inprogress');
- } else if ($video->video_status == VIDEO_RENDERING_FAILED) {
- return theme('video_encoding_failed');
+ if ($video = $conversion->load_job($variables['item']['fid'])) {
+ if ($video->video_status == VIDEO_RENDERING_ACTIVE || $video->video_status == VIDEO_RENDERING_PENDING) {
+ return theme('video_inprogress');
+ } else if ($video->video_status == VIDEO_RENDERING_FAILED) {
+ return theme('video_encoding_failed');
+ }
}
}
return video_get_player($variables);