當前位置: 首頁>>代碼示例>>PHP>>正文


PHP myEntryUtils::createRoughcutThumbnailFromEntry方法代碼示例

本文整理匯總了PHP中myEntryUtils::createRoughcutThumbnailFromEntry方法的典型用法代碼示例。如果您正苦於以下問題:PHP myEntryUtils::createRoughcutThumbnailFromEntry方法的具體用法?PHP myEntryUtils::createRoughcutThumbnailFromEntry怎麽用?PHP myEntryUtils::createRoughcutThumbnailFromEntry使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在myEntryUtils的用法示例。


在下文中一共展示了myEntryUtils::createRoughcutThumbnailFromEntry方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: updateEntry

 public static function updateEntry($entryId, $status)
 {
     $entry = entryPeer::retrieveByPK($entryId);
     if (!$entry) {
         KalturaLog::err("Entry was not found for id [{$entryId}]");
         return null;
     }
     // entry status didn't change - no need to send notification
     if ($entry->getStatus() == $status) {
         return $entry;
     }
     // backward compatibility
     // if entry has kshow, and this is the first entry in the mix,
     // the thumbnail of the entry should be copied into the mix entry
     if ($status == entryStatus::READY && $entry->getKshowId()) {
         myEntryUtils::createRoughcutThumbnailFromEntry($entry, false);
     }
     // entry status is ready and above, not changing status through batch job
     $unAcceptedStatuses = array(entryStatus::READY, entryStatus::DELETED);
     if (in_array($entry->getStatus(), $unAcceptedStatuses)) {
         KalturaLog::info("Entry status [" . $entry->getStatus() . "] will not be changed");
         return $entry;
     }
     $entry->setStatus($status);
     $entry->save();
     myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_UPDATE, $entry, null, null, null, null, $entry->getId());
     return $entry;
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:28,代碼來源:kBatchManager.php

示例2: updateConvertedEntry

 private function updateConvertedEntry($ok, $entry, kConversionResult $conv_res)
 {
     $file_before_conversion = $conv_res->conv_cmd->source_file;
     $file_after_conversion = $conv_res->conv_cmd->target_file;
     // TODO -get all targets
     if ($ok == true) {
         // TODO - write all targets not only primary one
         KalturaLog::debug("File [{$file_before_conversion}] converted OK to [{$file_after_conversion}]");
         try {
             // TODO - do we need to create the helpers eagerly ??
             //				$this->createFlvWrappersForTargets( $conv_res );
         } catch (Exception $ex) {
             KalturaLog::debug("Error while creating helper files for [{$file_after_conversion}]");
         }
         $entry->setStatusReady();
     } else {
         KalturaLog::debug("Problem converting file [{$file_before_conversion}]");
         $entry->setStatus(entryStatus::ERROR_CONVERTING);
     }
     $this->updateConversionInDb($entry, $conv_res);
     // loop until the file is really ready - sometimes the size of the file or the mtime is wrong
     for ($i = 0; $i < 15; $i++) {
         clearstatcache();
         if (!file_exists($file_after_conversion) || filesize($file_after_conversion) == 0) {
             //				KalturaLog::debug ( "Entry id [" . $entry->getId() . "] printing file stats: " . print_r( stat ($file_after_conversion ) , true ) );
             KalturaLog::debug("Entry id [" . $entry->getId() . "]. no such file [{$file_after_conversion}]. Sleeping for 1 second for the [{$i}] time.");
             sleep(2);
         } else {
             break;
         }
     }
     KalturaLog::debug("Entry id [" . $entry->getId() . "] setting duration");
     $entry->setLengthInMsecs(kConversionHelper::getFlvDuration($file_after_conversion));
     KalturaLog::debug("Entry id [" . $entry->getId() . "] duration [" . $entry->getLengthInMsecs() . "]");
     // how could it be otherwise ??
     if ($entry->getMediaType() == entry::ENTRY_MEDIA_TYPE_VIDEO) {
         // TODO - move out of this function if the partner is required for more configurations
         $partner = PartnerPeer::retrieveByPK($entry->getPartnerId());
         // TODO - make sure the width & height of the target are part of the kConversionReulst
         //			if ( $conversion_info ) $entry->setDimensions ( $conversion_info->video_width , $conversion_info->video_height );
         $offset = $entry->getBestThumbOffset($partner->getDefThumbOffset());
         KalturaLog::debug("Entry id [" . $entry->getId() . "] Thumb offset: [{$offset}]");
         // first create the thumb for the entry
         myEntryUtils::createThumbnailFromEntry($entry, $entry, $offset);
         // 	then make sure it will propage to the roughcut if needed
         myEntryUtils::createRoughcutThumbnailFromEntry($entry, false);
         $entry->updateVideoDimensions();
         KalturaLog::debug("Entry id [" . $entry->getId() . "] dimensions: [" . $entry->getWidth() . "x" . $entry->getHeight() . "]");
     }
     // send notification - regardless its status
     myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_UPDATE, $entry);
     $entry->save();
 }
開發者ID:EfncoPlugins,項目名稱:Media-Management-based-on-Kaltura,代碼行數:53,代碼來源:kConversionClient.class.php

示例3: updateEntry

 public static function updateEntry(BatchJob $dbBatchJob, $status)
 {
     $entry = $dbBatchJob->getEntry();
     if (!$entry) {
         KalturaLog::debug("Entry was not found for job id [{$dbBatchJob->getId}()]");
         return null;
     }
     // entry status didn't change - no need to send notification
     if ($entry->getStatus() == $status) {
         return $entry;
     }
     // backward compatibility
     // if entry has kshow, and this is the first entry in the mix,
     // the thumbnail of the entry should be copied into the mix entry
     if ($status == entryStatus::READY) {
         myEntryUtils::createRoughcutThumbnailFromEntry($entry, false);
     }
     // entry status is ready and above, not changing status through batch job
     if ($entry->getStatus() >= entryStatus::READY) {
         return $entry;
     }
     $entry->setStatus($status);
     $entry->save();
     kFlowHelper::createEntryUpdateNotification($dbBatchJob);
     return $entry;
 }
開發者ID:richhl,項目名稱:kalturaCE,代碼行數:26,代碼來源:kBatchManager.php


注:本文中的myEntryUtils::createRoughcutThumbnailFromEntry方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。