public function TranscoderAbstractionFactoryZencoder::setInput in Video 7.2
Set Input file to add input file in to settings variable
Overrides TranscoderAbstractionFactory::setInput
File
- transcoders/
TranscoderAbstractionFactoryZencoder.inc, line 28 - File containing class TranscoderAbstractionFactoryZencoder
Class
- TranscoderAbstractionFactoryZencoder
- Class that handles Zencoder transcoding.
Code
public function setInput(array $file) {
parent::setInput($file);
$this->options['input'] = file_create_url($this->settings['input']['uri']);
$username = variable_get('video_zencoder_http_username', FALSE);
$password = variable_get('video_zencoder_http_password', FALSE);
if ($username && $password) {
$url = url('video/transfer/' . $this->settings['input']['fid'], array(
'absolute' => TRUE,
));
$scheme = file_uri_scheme($url);
$target = file_uri_target($url);
$this->options['input'] = $scheme . '://' . $username . ':' . $password . '@' . $target;
}
if (variable_get('video_zencoder_testing_mode', FALSE)) {
$this->options['input'] = variable_get('video_zencoder_test_file_path', 'http://example.com/video.mp4');
}
}