You are here

public static function Transcoder::createTranscoder in Video 7.2

Create a new instance of the transcoder implementation.

Return value

TranscoderFactoryInterface

1 call to Transcoder::createTranscoder()
Transcoder::__construct in includes/Transcoder.inc

File

includes/Transcoder.inc, line 335
Class file used to wrap the transcoder helper functions.

Class

Transcoder
@file Class file used to wrap the transcoder helper functions.

Code

public static function createTranscoder($transcoder) {
  if ($transcoder == '') {
    return NULL;
  }
  if (!class_exists($transcoder, TRUE)) {
    drupal_set_message(t('The transcoder %transcoder is not configured properly.', array(
      '%transcoder' => $transcoder,
    )), 'error');
  }
  return new $transcoder();
}