public function PHPVideoToolkit::fileHasAudio in Video 7.2
Same name and namespace in other branches
- 7 libraries/phpvideotoolkit/phpvideotoolkit.php5.php \PHPVideoToolkit::fileHasAudio()
Determines if the input media has an audio stream.
@access public
Parameters
string $file The absolute path of the file that is required to be manipulated.:
Return value
bool
File
- libraries/
phpvideotoolkit/ phpvideotoolkit.php5.php, line 1123 - Libary to access FFmpeg
Class
Code
public function fileHasAudio($file = FALSE) {
// check to see if this is a static call
if ($file !== FALSE && isset($this) === FALSE) {
$toolkit = new PHPVideoToolkit();
$data = $toolkit
->getFileInfo($file);
}
elseif ($file === FALSE) {
if (!$this->_input_file) {
// input file not valid
return $this
->_raiseError('inputFileHasAudio_no_input');
// <- exits
}
$file = $this->_input_file;
$data = $this
->getFileInfo($file);
}
return isset($data['audio']);
}