You are here

function video_transcoder_admin_settings_validate in Video 7

Same name and namespace in other branches
  1. 6.5 video.admin.inc \video_transcoder_admin_settings_validate()
  2. 6.4 video.admin.inc \video_transcoder_admin_settings_validate()
  3. 7.2 modules/video_ui/video.admin.inc \video_transcoder_admin_settings_validate()

Form API callback to validate the upload settings form.

File

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

Code

function video_transcoder_admin_settings_validate($form, &$form_state) {

  // check ffmpeg_wrapper module installed or not
  if ($form_state['values']['video_convertor'] == 'video_ffmpeg_wrapper' && !module_exists('ffmpeg_wrapper')) {
    form_set_error('video_convertor', t('You need to download and install the !ffmpeg_wrapper module to enable this option.', array(
      '!ffmpeg_wrapper' => l(t('FFMPEG Wrapper'), 'http://drupal.org/project/ffmpeg_wrapper'),
    )));
  }

  // add vallidations by trnacoder interface
  $transcoder = $form_state['values']['video_convertor'];
  $transcoder = new video_transcoder($transcoder);
  $transcoder
    ->admin_settings_validate($form, $form_state);
}