public static function PHPVideoToolkit::validateFormat in Video 7
Same name and namespace in other branches
- 7.2 libraries/phpvideotoolkit/phpvideotoolkit.php5.php \PHPVideoToolkit::validateFormat()
* Checks to see if a given codec can be decoded/encoded by the current ffmpeg binary. * @access public *
Parameters
$format string The shortcode for the codec to check for.: * @param $method string 'mux' or 'demux', The method to check against the format * @return boolean True if the format can be used with the given method by ffmpeg, otherwise false.
2 calls to PHPVideoToolkit::validateFormat()
- PHPVideoToolkit::canFormatBeDemuxed in libraries/
phpvideotoolkit/ phpvideotoolkit.php5.php - * Checks to see if a given format can be demuxed by the current ffmpeg binary. * @access public *
- PHPVideoToolkit::canFormatBeMuxed in libraries/
phpvideotoolkit/ phpvideotoolkit.php5.php - * Checks to see if a given format can be muxed by the current ffmpeg binary. * @access public *
File
- libraries/
phpvideotoolkit/ phpvideotoolkit.php5.php, line 2885
Class
Code
public static function validateFormat($format, $method) {
// check to see if this is a static call
if (isset($this) === false) {
$toolkit = new PHPVideoToolkit();
$info = $toolkit
->getFFmpegInfo(true);
}
else {
$info = $this
->getFFmpegInfo(true);
}
return isset($info['formats'][$format]) === true && isset($info['formats'][$format][$method]) === true ? $info['formats'][$format][$method] : false;
}