You are here

function video_cron_admin_settings in Video 7

Same name and namespace in other branches
  1. 6.5 video.admin.inc \video_cron_admin_settings()
  2. 6.4 video.admin.inc \video_cron_admin_settings()

Video cron admin settings

Return value

<type>

1 string reference to 'video_cron_admin_settings'
video_ui_menu in modules/video_ui/video_ui.module
Implementation of hook_menu().

File

modules/video_ui/video.admin.inc, line 171
Provides the administration settings for the Video Drupal module.

Code

function video_cron_admin_settings() {
  $form = array();
  $form['video_cron'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use Drupals built in cron.'),
    '#default_value' => variable_get('video_cron', TRUE),
    '#description' => t('If you would like to use Drupals built in cron hook, check this box.  Please be warned that transcoding videos is very resource intensive.  If you use poor mans cron, I highly discourage this option.  I also suggest you setup your cron to call this function through CLI instead of WGET.'),
  );
  $form['video_queue_timeout'] = array(
    '#type' => 'textfield',
    '#title' => t('Video queue timeout (s).'),
    '#default_value' => variable_get('video_queue_timeout', 90),
    '#description' => t('The maximum time allow a video to complete their transcoding. Put a larger value for larger size video.'),
  );
  $form['video_ffmpeg_instances'] = array(
    '#type' => 'textfield',
    '#title' => t('Total videos to convert during each cron process.'),
    '#default_value' => variable_get('video_ffmpeg_instances', 5),
    '#description' => t('How many videos do you want to process on each cron run?  Either through hook_cron or the video_scheduler.php.'),
  );
  return system_settings_form($form);
}