public static function doCopy(flavorParams $flavorParams, flavorParamsOutput $flavorParamsOutput)
 {
     $flavorParamsOutput->setFlavorParamsId($flavorParams->getId());
     $flavorParamsOutput->setFlavorParamsVersion($flavorParams->getVersion());
     $flavorParamsOutput->setName($flavorParams->getName());
     $flavorParamsOutput->setTags($flavorParams->getTags());
     $flavorParamsOutput->setDescription($flavorParams->getDescription());
     $flavorParamsOutput->setReadyBehavior($flavorParams->getReadyBehavior());
     $flavorParamsOutput->setIsDefault($flavorParams->getIsDefault());
     $flavorParamsOutput->setFormat($flavorParams->getFormat());
     $flavorParamsOutput->setVideoCodec($flavorParams->getVideoCodec());
     $flavorParamsOutput->setVideoBitrate($flavorParams->getVideoBitrate());
     $flavorParamsOutput->setAudioCodec($flavorParams->getAudioCodec());
     $flavorParamsOutput->setAudioBitrate($flavorParams->getAudioBitrate());
     $flavorParamsOutput->setAudioChannels($flavorParams->getAudioChannels());
     $flavorParamsOutput->setAudioSampleRate($flavorParams->getAudioSampleRate());
     $flavorParamsOutput->setAudioResolution($flavorParams->getAudioResolution());
     $flavorParamsOutput->setWidth($flavorParams->getWidth());
     $flavorParamsOutput->setHeight($flavorParams->getHeight());
     $flavorParamsOutput->setFrameRate($flavorParams->getFrameRate());
     $flavorParamsOutput->setGopSize($flavorParams->getGopSize());
     $flavorParamsOutput->setTwoPass($flavorParams->getTwoPass());
     $flavorParamsOutput->setConversionEngines($flavorParams->getConversionEngines());
     $flavorParamsOutput->setConversionEnginesExtraParams($flavorParams->getConversionEnginesExtraParams());
     $flavorParamsOutput->setCustomData($flavorParams->getCustomData());
     $flavorParamsOutput->save();
     return $flavorParamsOutput;
 }
Beispiel #2
0
 /**
  * @param string $url
  * @param string $urlPrefix
  * @param flavorAsset|flavorParams $flavor
  * @return array
  */
 protected function getFlavorAssetInfo($url, $urlPrefix = '', $flavor = null)
 {
     $ext = null;
     if ($flavor && is_callable(array($flavor, 'getFileExt'))) {
         $ext = $flavor->getFileExt();
     }
     if (!$ext) {
         if ($urlPrefix && $url) {
             $urlPrefix = $urlPrefix . "/";
         }
         $urlPath = parse_url($urlPrefix . $url, PHP_URL_PATH);
         $ext = pathinfo($urlPath, PATHINFO_EXTENSION);
     }
     $bitrate = $flavor ? $flavor->getVideoBitrate() : 0;
     $width = $flavor ? $flavor->getWidth() : 0;
     $height = $flavor ? $flavor->getHeight() : 0;
     return array('url' => $url, 'urlPrefix' => $urlPrefix, 'ext' => $ext, 'bitrate' => $bitrate, 'width' => $width, 'height' => $height);
 }