You are here

public function PHPVideoToolkit::hasCodecSupport in Video 7.2

Same name and namespace in other branches
  1. 7 libraries/phpvideotoolkit/phpvideotoolkit.php5.php \PHPVideoToolkit::hasCodecSupport()

Determines if your ffmpeg has particular codec support for encode or decode.

@access public

Parameters

$codec: The name of the codec you are checking for.

$support: PHPVideoToolkit::ENCODE or PHPVideoToolkit::DECODE, depending on which functionality is desired.

Return value

Boolean FALSE if there is no support, TRUE if there is support.

File

libraries/phpvideotoolkit/phpvideotoolkit.php5.php, line 848
Libary to access FFmpeg

Class

PHPVideoToolkit

Code

public function hasCodecSupport($codec, $support = PHPVideoToolkit::ENCODE) {
  $codec = strtolower($codec);
  $data = $this
    ->getFFmpegInfo();
  return isset($data['formats'][$codec]) === TRUE ? $data['formats'][$codec][$support] : FALSE;
}