value array (empty by default) * * * Example of usage: * @code * // transcoder object which generate .mp3 file * $oTranscoderMp3 = BxDolTranscoder::getObjectInstance('bx_audio_mp3'); * * // make sure to call it only once (for example: during module installation), before the first usage, no need to call it every time * $oTranscoderMp3->registerHandlers(); * * // get URLs of transcoded videos and video thumbnail, 33 is ID of original video file stored in specified storage object * $sUrlMp3 = $oTranscoderMp3->getFileUrl(33); * * echo 'My voice: '; * @endcode * * Also @see transcoder_audio sample for complete example. */ class BxDolTranscoderAudio extends BxDolTranscoderVideo implements iBxDolFactoryObject { protected function __construct($aObject, $oStorage) { parent::__construct($aObject, $oStorage); $this->_oDb = new BxDolTranscoderAudioQuery($aObject); $this->_sQueueTable = $this->_oDb->getQueueTable(); } /** * check if transcoder suppors given file mime type */ public function isMimeTypeSupported($sMimeType) { if (0 === strncmp($sMimeType, 'audio/', 6)) return true; return false; } /** * Convert video to .mp4 format */ protected function applyFilter_Mp3 ($sFile, $aParams) { return $this->_convertVideo($sFile, $sFile, '.mp3', $aParams, array ( 'acodec' => 'libmp3lame', 'ar' => '44100', 'b:a' => isset($aParams['audio_bitrate']) ? $aParams['audio_bitrate'] . 'k' : '128k', )); } } /** @} */