Example #1
0
 public static function addFlavorParamsOutputForSourceAssets(kConvertJobData $jobData)
 {
     $assetsData = array();
     foreach ($jobData->getSrcFileSyncs() as $srcFileSyncDesc) {
         /** @var $srcFileSyncDesc kSourceFileSyncDescriptor */
         $assetId = $srcFileSyncDesc->getAssetId();
         $flavorAsset = assetPeer::retrieveById($assetId);
         $assetsData['asset_' . $assetId . '_bitrate'] = $flavorAsset->getBitrate();
     }
     $pluginData = $jobData->getPluginData();
     if (!$pluginData) {
         $pluginData = array();
     }
     $jobData->setPluginData(array_merge($pluginData, $assetsData));
     return $jobData;
 }