public function video_localcommand::admin_settings in Video 6.5
Overrides video_plugin::admin_settings
File
- transcoders/
video_localcommand.inc, line 462
Class
Code
public function admin_settings(&$form_state) {
$form = array();
$form['video_localcommand_start'] = array(
'#type' => 'markup',
'#value' => '<div id="video_localcommand">',
);
$form['video_transcoder_path'] = array(
'#type' => 'textfield',
'#title' => t('Path to transcoder executable'),
'#description' => t('Absolute path to your transcoder, such as FFmpeg. Do not include parameters.'),
'#default_value' => $this->cmdpath,
);
$form['video_thumbs'] = array(
'#type' => 'textfield',
'#title' => t('Number of thumbnails'),
'#description' => t('Number of thumbnails to generate for videos.'),
'#default_value' => variable_get('video_thumbs', 5),
);
$form['video_localcommand_nice_enable'] = array(
'#type' => 'checkbox',
'#title' => t('Enable the use of nice when calling the command.'),
'#default_value' => $this->usenice,
'#description' => t('The nice command invokes a command with an altered scheduling priority.'),
'#access' => PHP_OS == 'Linux',
);
$form['video_localcommand_log_commands'] = array(
'#type' => 'checkbox',
'#title' => t('Log all executed commands to the Drupal log.'),
'#default_value' => $this->logcommands,
'#description' => t('Enable this option when debugging local transcoding to log all commands to the <a href="@dblog-page">Drupal log</a>. This may help with debugging problems. When this option is disabled, only errors will be logged.', array(
'@dblog-page' => url('admin/reports/dblog'),
)),
);
// Thumbnail Videos We need to put this stuff last.
$form['autothumb'] = array(
'#type' => 'fieldset',
'#title' => t('Thumbnails'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['autothumb']['video_thumb_path'] = array(
'#type' => 'textfield',
'#title' => t('Path to save thumbnails'),
'#description' => t('Path to save video thumbnails extracted from the videos.') . ' ' . t('This path will be created within the %files-directory directory.', array(
'%files-directory' => file_directory_path(),
)),
'#default_value' => variable_get('video_thumb_path', 'video_thumbs'),
);
$form['autothumb']['video_localcommand_thumbnailer_options'] = array(
'#type' => 'textarea',
'#title' => t('Video thumbnailer options'),
'#description' => t('Provide the options for the thumbnailer. Available argument values are:') . theme('item_list', array(
'<strong>!seek</strong>: ' . t('the number of seconds into the video where the screenshot is taken'),
'<strong>!videofile</strong>: ' . t('the video file to create thumbnails for'),
'<strong>!thumbfile</strong>: ' . t('a newly created temporary file to overwrite with the thumbnail'),
)),
'#default_value' => $this->thumbcmdoptions,
'#wysiwyg' => FALSE,
);
// Video conversion settings.
$form['helpers'] = array(
'#type' => 'fieldset',
'#title' => t('Helper programs'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['helpers']['video_localcommand_qtfaststart_cmd'] = array(
'#type' => 'textfield',
'#title' => t('Path to qt-faststart'),
'#default_value' => $this->faststartcmd,
'#description' => t('When you enter the path to qt-faststart here, you can enable the qt-faststart tool for one or more presets.'),
);
$form['helpers']['video_flvtool2_path'] = array(
'#type' => 'textfield',
'#title' => t('Path to flvtool2'),
'#default_value' => $this->flvtoolcmd,
'#description' => t('When you enter the path to flvtool2 here, you can enable the flvtool2 tool for one or more presets.'),
);
$form['video_localcommand_end'] = array(
'#type' => 'markup',
'#value' => '</div>',
);
return $form;
}