You are here

public function video_phpvideotoolkit::get_codecs in Video 7

Overrides transcoder_interface::get_codecs

File

transcoders/video_phpvideotoolkit.inc, line 47

Class

video_phpvideotoolkit

Code

public function get_codecs() {
  $info = $this->toolkit
    ->getFFmpegInfo(FALSE);
  $available_codecs = $info['codecs'];
  $codecs = array(
    'decode' => array(),
    'encode' => array(),
  );
  foreach ($available_codecs as $key => $value) {
    $codecs['encode'][$key] = array();
    $codecs['decode'][$key] = array();
    foreach ($value as $codec_key => $codec) {
      if ($codec['encode']) {
        $codecs['encode'][$key][$codec_key] = $codec['fullname'];
      }
      if ($codec['decode']) {
        $codecs['decode'][$key][$codec_key] = $codec['fullname'];
      }
    }
  }
  return $codecs;
}