当前位置: 首页>>代码示例>>PHP>>正文


PHP entry::getThumbOffset方法代码示例

本文整理汇总了PHP中entry::getThumbOffset方法的典型用法代码示例。如果您正苦于以下问题:PHP entry::getThumbOffset方法的具体用法?PHP entry::getThumbOffset怎么用?PHP entry::getThumbOffset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在entry的用法示例。


在下文中一共展示了entry::getThumbOffset方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: bypassConversion

 /**
  * @param flavorAsset $originalFlavorAsset
  * @param entry $entry
  * @param BatchJob $convertProfileJob
  * @return BatchJob
  */
 public static function bypassConversion(flavorAsset $originalFlavorAsset, entry $entry, BatchJob $convertProfileJob)
 {
     if (!$originalFlavorAsset->hasTag(flavorParams::TAG_MBR)) {
         $mediaInfo = mediaInfoPeer::retrieveByFlavorAssetId($originalFlavorAsset->getId());
         if ($mediaInfo) {
             $tagsArray = $originalFlavorAsset->getTagsArray();
             $finalTagsArray = KDLWrap::CDLMediaInfo2Tags($mediaInfo, $tagsArray);
             $originalFlavorAsset->setTagsArray($finalTagsArray);
         }
     }
     if (!$entry->getCreateThumb()) {
         // mark the asset as ready
         $originalFlavorAsset->setStatusLocalReady();
         $originalFlavorAsset->save();
         kFlowHelper::generateThumbnailsFromFlavor($entry->getId(), null, $originalFlavorAsset->getFlavorParamsId());
         kBusinessPostConvertDL::handleConvertFinished(null, $originalFlavorAsset);
         return null;
     }
     $offset = $entry->getThumbOffset();
     // entry getThumbOffset now takes the partner DefThumbOffset into consideration
     $srcSyncKey = $originalFlavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
     $srcFileSyncLocalPath = kFileSyncUtils::getLocalFilePathForKey($srcSyncKey);
     $srcFileSyncWamsAssetId = kFileSyncUtils::getWamsAssetIdForKey($srcSyncKey);
     $postConvertAssetType = BatchJob::POSTCONVERT_ASSET_TYPE_BYPASS;
     return kJobsManager::addPostConvertJob($convertProfileJob, $postConvertAssetType, $srcFileSyncLocalPath, $originalFlavorAsset->getId(), null, true, $offset, null, $srcFileSyncWamsAssetId);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:32,代码来源:kBusinessPreConvertDL.php

示例2: bypassConversion

 /**
  * @param flavorAsset $originalFlavorAsset
  * @param entry $entry
  * @param BatchJob $convertProfileJob
  * @return BatchJob
  */
 public static function bypassConversion(flavorAsset $originalFlavorAsset, entry $entry, BatchJob $convertProfileJob)
 {
     if (!$originalFlavorAsset->hasTag(flavorParams::TAG_MBR)) {
         $mediaInfo = mediaInfoPeer::retrieveByFlavorAssetId($originalFlavorAsset->getId());
         if ($mediaInfo) {
             $tagsArray = $originalFlavorAsset->getTagsArray();
             $finalTagsArray = KDLWrap::CDLMediaInfo2Tags($mediaInfo, $tagsArray);
             $originalFlavorAsset->setTagsArray($finalTagsArray);
         }
     }
     $offset = $entry->getThumbOffset();
     // entry getThumbOffset now takes the partner DefThumbOffset into consideration
     $srcSyncKey = $originalFlavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
     $srcFileSyncLocalPath = kFileSyncUtils::getLocalFilePathForKey($srcSyncKey);
     $jobSubType = BatchJob::BATCHJOB_SUB_TYPE_POSTCONVERT_BYPASS;
     return kJobsManager::addPostConvertJob($convertProfileJob, $jobSubType, $srcFileSyncLocalPath, $originalFlavorAsset->getId(), null, true, $offset);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:23,代码来源:kBusinessPreConvertDL.php

示例3: handleOperatorsProcessingFinished

 private static function handleOperatorsProcessingFinished(flavorAsset $flavorAsset, flavorParamsOutput $flavorParamsOutput, entry $entry, BatchJob $dbBatchJob, kConvertJobData $data, $rootBatchJob = null)
 {
     $offset = $entry->getThumbOffset();
     // entry getThumbOffset now takes the partner DefThumbOffset into consideration
     $createThumb = $entry->getCreateThumb();
     $extractMedia = true;
     if ($entry->getType() != entryType::MEDIA_CLIP) {
         // e.g. document
         $extractMedia = false;
     }
     if (!kFileSyncUtils::fileSync_exists($flavorAsset->getSyncKey(flavorAsset::FILE_SYNC_ASSET_SUB_TYPE_ASSET))) {
         $extractMedia = false;
         $createThumb = false;
     }
     $rootBatchJob = $dbBatchJob->getRootJob();
     if ($extractMedia && $rootBatchJob && $rootBatchJob->getJobType() == BatchJobType::CONVERT_PROFILE) {
         $rootBatchJobData = $rootBatchJob->getData();
         if ($rootBatchJobData instanceof kConvertProfileJobData) {
             $extractMedia = $rootBatchJobData->getExtractMedia();
         }
     }
     // For apple http flavors do not attempt to get thumbs and media info,
     // It is up to the operator to provide that kind of data, rather than hardcoded check
     // To-fix
     if ($flavorParamsOutput->getFormat() == assetParams::CONTAINER_FORMAT_APPLEHTTP) {
         $createThumb = false;
         $extractMedia = false;
     }
     if ($flavorParamsOutput->getFormat() == assetParams::CONTAINER_FORMAT_WIDEVINE) {
         $createThumb = false;
     }
     if ($createThumb && in_array($flavorParamsOutput->getVideoCodec(), self::$thumbUnSupportVideoCodecs)) {
         $createThumb = false;
     }
     if ($createThumb || $extractMedia) {
         $postConvertAssetType = BatchJob::POSTCONVERT_ASSET_TYPE_FLAVOR;
         if ($flavorAsset->getIsOriginal()) {
             $postConvertAssetType = BatchJob::POSTCONVERT_ASSET_TYPE_SOURCE;
         }
         kJobsManager::addPostConvertJob($dbBatchJob, $postConvertAssetType, $data->getDestFileSyncLocalPath(), $data->getFlavorAssetId(), $flavorParamsOutput->getId(), $createThumb, $offset);
     } else {
         $flavorAsset = kBusinessPostConvertDL::handleFlavorReady($dbBatchJob, $data->getFlavorAssetId());
         if ($flavorAsset) {
             if ($flavorAsset->hasTag(flavorParams::TAG_SOURCE)) {
                 kBusinessPreConvertDL::continueProfileConvert($dbBatchJob);
             }
             if ($flavorAsset->getType() == assetType::FLAVOR) {
                 $flavorAsset->setBitrate($flavorParamsOutput->getVideoBitrate() + $flavorParamsOutput->getAudioBitrate());
                 $flavorAsset->setWidth($flavorParamsOutput->getWidth());
                 $flavorAsset->setHeight($flavorParamsOutput->getHeight());
                 $flavorAsset->setFrameRate($flavorParamsOutput->getFrameRate());
                 $flavorAsset->setIsOriginal(0);
                 $flavorAsset->save();
             }
             kBusinessPostConvertDL::handleConvertFinished($dbBatchJob, $flavorAsset);
         }
     }
 }
开发者ID:GElkayam,项目名称:server,代码行数:58,代码来源:kFlowHelper.php


注:本文中的entry::getThumbOffset方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。