aboutsummaryrefslogtreecommitdiff
path: root/video.drush.inc
diff options
context:
space:
mode:
authorHeshan Wanigasooriya <heshanmw@gmail.com>2010-12-05 12:56:20 +0000
committerHeshan Wanigasooriya <heshanmw@gmail.com>2010-12-05 12:56:20 +0000
commitb6e86040dd3faa3a70ec16e77220d852bdb09a04 (patch)
treecdb4282446dfb0efd750b87a7aaedd30229f0ff9 /video.drush.inc
parent973537f36c8f33473a00190aa64fc30b82d94c04 (diff)
downloadvideo-b6e86040dd3faa3a70ec16e77220d852bdb09a04.tar.gz
video-b6e86040dd3faa3a70ec16e77220d852bdb09a04.tar.bz2
Adding latest files.
Diffstat (limited to 'video.drush.inc')
-rw-r--r--video.drush.inc30
1 files changed, 30 insertions, 0 deletions
diff --git a/video.drush.inc b/video.drush.inc
new file mode 100644
index 0000000..3bed8e7
--- /dev/null
+++ b/video.drush.inc
@@ -0,0 +1,30 @@
+<?php
+// $Id$
+
+/**
+ * Implementation of hook_drush_command().
+ */
+function video_drush_command() {
+ $items = array();
+
+ $items['video-scheduler'] = array(
+ 'description' => 'Run video transcoder scheduler',
+ 'callback' => 'drush_video_scheduler',
+ 'drupal dependencies' => array('video'),
+ 'options' => array(
+ '--limit' => 'Change the number of video items to transcode',
+ ),
+ );
+
+ return $items;
+}
+
+function drush_video_scheduler() {
+ $limit = (int) drush_get_option('limit', variable_get('video_ffmpeg_instances', 5));
+ $GLOBALS['conf']['video_ffmpeg_instances'] = $limit;
+
+ // include our conversion class (also contains our defines)
+ module_load_include('inc', 'video', 'includes/conversion');
+ $video_conversion = new video_conversion;
+ $video_conversion->run_queue();
+} \ No newline at end of file