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


PHP entry::getSource方法代码示例

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


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

示例1: serveLiveEntry

 private function serveLiveEntry()
 {
     if (in_array($this->entry->getSource(), LiveEntry::$kalturaLiveSourceTypes)) {
         if (!$this->entry->hasMediaServer()) {
             KExternalErrors::dieError(KExternalErrors::ENTRY_NOT_LIVE, "Entry [{$this->entryId}] is not broadcasting");
         }
         kApiCache::setExpiry(120);
     }
     list($baseUrl, $backupUrl) = $this->getLiveEntryBaseUrls();
     $cdnHost = parse_url($baseUrl, PHP_URL_HOST);
     if ($this->deliveryAttributes->getFormat() == PlaybackProtocol::MULTICAST_SL) {
         $this->deliveryAttributes->setFormat(PlaybackProtocol::HDS);
     }
     $this->deliveryProfile = DeliveryProfilePeer::getLiveDeliveryProfileByHostName($cdnHost, $this->deliveryAttributes);
     if (!$this->deliveryProfile) {
         return null;
     }
     $this->deliveryProfile->setDynamicAttributes($this->deliveryAttributes);
     return $this->deliveryProfile->serve($baseUrl, $backupUrl);
 }
开发者ID:AdiTal,项目名称:server,代码行数:20,代码来源:playManifestAction.class.php

示例2: serveLiveEntry

 private function serveLiveEntry()
 {
     if (in_array($this->entry->getSource(), LiveEntry::$kalturaLiveSourceTypes)) {
         if (!$this->entry->hasMediaServer()) {
             KExternalErrors::dieError(KExternalErrors::ENTRY_NOT_LIVE, "Entry [{$this->entryId}] is not broadcasting");
         }
         kApiCache::setExpiry(120);
     }
     $liveStreamConfig = $this->getLiveEntryStreamConfig();
     if (!$liveStreamConfig) {
         KExternalErrors::dieError(KExternalErrors::LIVE_STREAM_CONFIG_NOT_FOUND, "Live stream playbck configuration not found for entry [{$this->entryId}]");
     }
     $cdnHost = parse_url($liveStreamConfig->getUrl(), PHP_URL_HOST);
     if ($this->deliveryAttributes->getFormat() == PlaybackProtocol::MULTICAST_SL) {
         $this->deliveryAttributes->setFormat(PlaybackProtocol::HDS);
     }
     $this->deliveryProfile = DeliveryProfilePeer::getLiveDeliveryProfileByHostName($cdnHost, $this->deliveryAttributes);
     if (!$this->deliveryProfile) {
         return null;
     }
     $this->deliveryProfile->setDynamicAttributes($this->deliveryAttributes);
     return $this->deliveryProfile->serve($liveStreamConfig);
 }
开发者ID:kubrickfr,项目名称:server,代码行数:23,代码来源:playManifestAction.class.php

示例3: addProvisionProvideJob

 public static function addProvisionProvideJob(BatchJob $parentJob = null, entry $entry, kProvisionJobData $jobData)
 {
     $entry->setStatus(entryStatus::IMPORT);
     $entry->save();
     $batchJob = null;
     if ($parentJob) {
         $batchJob = $parentJob->createChild(BatchJobType::PROVISION_PROVIDE, $entry->getSource());
     } else {
         $batchJob = new BatchJob();
         $batchJob->setEntryId($entry->getId());
         $batchJob->setPartnerId($entry->getPartnerId());
     }
     $batchJob->setObjectId($entry->getId());
     $batchJob->setObjectType(BatchJobObjectType::ENTRY);
     return self::addJob($batchJob, $jobData, BatchJobType::PROVISION_PROVIDE, $entry->getSource());
 }
开发者ID:ace3535,项目名称:server,代码行数:16,代码来源:kJobsManager.php

示例4: checkForPendingLiveClips

 public static function checkForPendingLiveClips(entry $entry)
 {
     if ($entry->getSource() != EntrySourceType::RECORDED_LIVE) {
         KalturaLog::notice("Entry [" . $entry->getId() . "] is not a recorded live");
         return;
     }
     $liveEntry = entryPeer::retrieveByPKNoFilter($entry->getRootEntryId());
     if (!$liveEntry || $liveEntry->getStatus() == entryStatus::DELETED || !$liveEntry instanceof LiveEntry) {
         KalturaLog::notice("Entry root [" . $entry->getRootEntryId() . "] is not a valid live entry");
         return;
     }
     /* @var $liveEntry LiveEntry */
     $pendingMediaEntries = $liveEntry->getAttachedPendingMediaEntries();
     foreach ($pendingMediaEntries as $pendingMediaEntry) {
         /* @var $pendingMediaEntry kPendingMediaEntry */
         if ($pendingMediaEntry->getRequiredDuration() && $pendingMediaEntry->getRequiredDuration() > $entry->getLengthInMsecs()) {
             KalturaLog::info("Pending entry [" . $pendingMediaEntry->getEntryId() . "] required duration [" . $pendingMediaEntry->getRequiredDuration() . "] while entry duration [" . $entry->getLengthInMsecs() . "] is too short");
             continue;
         }
         $liveEntry->dettachPendingMediaEntry($pendingMediaEntry->getEntryId());
         $pendingEntry = entryPeer::retrieveByPK($pendingMediaEntry->getEntryId());
         if (!$pendingEntry) {
             KalturaLog::info("Pending entry [" . $pendingMediaEntry->getEntryId() . "] not found");
             continue;
         }
         $sourceAsset = assetPeer::retrieveOriginalByEntryId($entry->getId());
         if (!$sourceAsset) {
             $sourceAssets = assetPeer::retrieveReadyFlavorsByEntryId($entry->getId());
             $sourceAsset = array_pop($sourceAssets);
         }
         if (!$sourceAsset) {
             KalturaLog::info("Pending entry [" . $pendingMediaEntry->getEntryId() . "] source asset not found");
             continue;
         }
         /* @var $sourceAsset flavorAsset */
         $operationAttributes = new kClipAttributes();
         $operationAttributes->setOffset($pendingMediaEntry->getOffset());
         $operationAttributes->setDuration($pendingMediaEntry->getDuration());
         $targetAsset = assetPeer::retrieveOriginalByEntryId($pendingMediaEntry->getEntryId());
         if (!$targetAsset) {
             $targetAsset = kFlowHelper::createOriginalFlavorAsset($entry->getPartnerId(), $pendingMediaEntry->getEntryId());
         }
         $targetAsset->setFileExt($sourceAsset->getFileExt());
         $targetAsset->save();
         $sourceSyncKey = $sourceAsset->getSyncKey(asset::FILE_SYNC_ASSET_SUB_TYPE_ASSET);
         $targetSyncKey = $targetAsset->getSyncKey(asset::FILE_SYNC_ASSET_SUB_TYPE_ASSET);
         kFileSyncUtils::createSyncFileLinkForKey($targetSyncKey, $sourceSyncKey);
         $errDescription = '';
         kBusinessPreConvertDL::decideAddEntryFlavor(null, $pendingMediaEntry->getEntryId(), $operationAttributes->getAssetParamsId(), $errDescription, $targetAsset->getId(), array($operationAttributes));
     }
     $liveEntry->save();
 }
开发者ID:dozernz,项目名称:server,代码行数:52,代码来源:kBusinessConvertDL.php

示例5: setContextDataStreamerTypeAndMediaProtocol

 private function setContextDataStreamerTypeAndMediaProtocol(accessControlScope $scope, $flavorTags)
 {
     if ($this->streamerType && $this->streamerType != PlaybackProtocol::AUTO) {
         $this->mediaProtocol = $this->mediaProtocol ? $this->mediaProtocol : $this->streamerType;
     } elseif ($this->entry instanceof LiveEntry) {
         $protocols = array();
         if (!in_array($this->entry->getSource(), LiveEntry::$kalturaLiveSourceTypes)) {
             $protocols[] = PlaybackProtocol::AKAMAI_HDS;
         }
         $protocols[] = PlaybackProtocol::HDS;
         if ($this->entry->getStreamName()) {
             $this->streamerType = PlaybackProtocol::RTMP;
         }
         foreach ($protocols as $protocol) {
             $config = $this->entry->getLiveStreamConfigurationByProtocol($protocol, requestUtils::getProtocol());
             if ($config) {
                 $this->streamerType = $protocol;
                 break;
             }
         }
         if (in_array($this->entry->getSource(), array(EntrySourceType::LIVE_STREAM, EntrySourceType::LIVE_STREAM_ONTEXTDATA_CAPTIONS))) {
             $this->streamerType = PlaybackProtocol::HDS;
         }
         if ($this->entry->getSource() == EntrySourceType::AKAMAI_LIVE) {
             $this->streamerType = PlaybackProtocol::RTMP;
         }
         if ($this->entry->getSource() == EntrySourceType::AKAMAI_UNIVERSAL_LIVE) {
             $this->streamerType = PlaybackProtocol::AKAMAI_HDS;
         }
     } else {
         $this->isSecured = $this->isSecured || PermissionPeer::isValidForPartner(PermissionName::FEATURE_ENTITLEMENT_USED, $this->entry->getPartnerId());
         $forcedDeliveryTypeKey = kDeliveryUtils::getForcedDeliveryTypeKey($this->selectedTag);
         if ($forcedDeliveryTypeKey) {
             $defaultDeliveryTypeKey = $forcedDeliveryTypeKey;
         } else {
             $defaultDeliveryTypeKey = $this->partner->getDefaultDeliveryType();
         }
         if (!$defaultDeliveryTypeKey || $defaultDeliveryTypeKey == PlaybackProtocol::AUTO) {
             $deliveryType = $this->selectDeliveryTypeForAuto();
         } else {
             $deliveryType = kDeliveryUtils::getDeliveryTypeFromConfig($defaultDeliveryTypeKey);
         }
         if (!$deliveryType) {
             $deliveryType = array();
         }
         $this->streamerType = kDeliveryUtils::getStreamerType($deliveryType);
         $this->mediaProtocol = kDeliveryUtils::getMediaProtocol($deliveryType);
     }
     $httpStreamerTypes = array(PlaybackProtocol::HTTP, PlaybackProtocol::HDS, PlaybackProtocol::HLS, PlaybackProtocol::SILVER_LIGHT, PlaybackProtocol::MPEG_DASH);
     if (in_array($this->streamerType, $httpStreamerTypes)) {
         $this->mediaProtocol = infraRequestUtils::getProtocol();
     }
     if ($this->streamerType == PlaybackProtocol::AKAMAI_HD || $this->streamerType == PlaybackProtocol::AKAMAI_HDS) {
         $this->mediaProtocol = PlaybackProtocol::HTTP;
     }
     //If a plugin can determine the streamerType and mediaProtocol, prefer plugin result
     $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaContextDataHelper');
     foreach ($pluginInstances as $pluginInstance) {
         /* @var $pluginInstance IKalturaContextDataHelper */
         $this->streamerType = $pluginInstance->getContextDataStreamerType($scope, $flavorTags, $this->streamerType);
         $this->mediaProtocol = $pluginInstance->getContextDataMediaProtocol($scope, $flavorTags, $this->streamerType, $this->mediaProtocol);
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:63,代码来源:kContextDataHelper.php

示例6: addProvisionProvideJob

 public static function addProvisionProvideJob(BatchJob $parentJob = null, entry $entry)
 {
     $subType = $entry->getSource();
     if ($subType == entry::ENTRY_MEDIA_SOURCE_AKAMAI_LIVE) {
         $partner = $entry->getPartner();
         if (!is_null($partner)) {
             $jobData = new kAkamaiProvisionJobData();
             $akamaiLiveParams = $partner->getAkamaiLiveParams();
             if ($akamaiLiveParams) {
                 $jobData->setWsdlUsername($akamaiLiveParams->getAkamaiLiveWsdlUsername());
                 $jobData->setWsdlPassword($akamaiLiveParams->getAkamaiLiveWsdlPassword());
                 $jobData->setCpcode($akamaiLiveParams->getAkamaiLiveCpcode());
                 $jobData->setEmailId($akamaiLiveParams->getAkamaiLiveEmailId());
                 $jobData->setPrimaryContact($akamaiLiveParams->getAkamaiLivePrimaryContact());
                 $jobData->setSecondaryContact($akamaiLiveParams->getAkamaiLiveSecondaryContact());
             }
         }
     } else {
         $jobData = new kProvisionJobData();
     }
     $jobData->setEncoderIP($entry->getEncodingIP1());
     $jobData->setBackupEncoderIP($entry->getEncodingIP2());
     $jobData->setEncoderPassword($entry->getStreamPassword());
     $jobData->setEncoderUsername($entry->getStreamUsername());
     $jobData->setEndDate($entry->getEndDate(null));
     $jobData->setMediaType($entry->getMediaType());
     $batchJob = null;
     if ($parentJob) {
         $batchJob = $parentJob->createChild();
     } else {
         $batchJob = new BatchJob();
         $batchJob->setEntryId($entry->getId());
         $batchJob->setPartnerId($entry->getPartnerId());
     }
     return self::addJob($batchJob, $jobData, BatchJobType::PROVISION_PROVIDE, $subType);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:36,代码来源:kJobsManager.php

示例7: addProvisionProvideJob

 public static function addProvisionProvideJob(BatchJob $parentJob = null, entry $entry)
 {
     $jobData = new kProvisionJobData();
     $jobData->setEncoderIP($entry->getEncodingIP1());
     $jobData->setBackupEncoderIP($entry->getEncodingIP2());
     $jobData->setEncoderPassword($entry->getStreamPassword());
     $jobData->setEncoderUsername($entry->getStreamUsername());
     $jobData->setEndDate($entry->getEndDate(null));
     $jobData->setMediaType($entry->getMediaType());
     $batchJob = null;
     if ($parentJob) {
         $batchJob = $parentJob->createChild();
     } else {
         $batchJob = new BatchJob();
         $batchJob->setEntryId($entry->getId());
         $batchJob->setPartnerId($entry->getPartnerId());
     }
     $subType = $entry->getSource();
     return self::addJob($batchJob, $jobData, BatchJobType::PROVISION_PROVIDE, $subType);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:20,代码来源:kJobsManager.php


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