Skip to content

Commit

Permalink
Merge pull request kaltura#1286 from kaltura/IX-9.17.0-url-managers
Browse files Browse the repository at this point in the history
1. Added some default delivery profiles.
  • Loading branch information
sharonadar committed Jun 9, 2014
2 parents 94b85d6 + e843b41 commit cdaf403
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,9 @@ private function serveVodEntry()
} else if($this->deliveryAttributes->getFormat() == PlaybackProtocol::RTMP) {
if(strpos($this->deliveryAttributes->getMediaProtocol(), "rtmp") !== 0)
$this->deliveryAttributes->setMediaProtocol("rtmp");
} else if($this->deliveryAttributes->getFormat() == PlaybackProtocol::HTTP) {
if(strpos($this->deliveryAttributes->getMediaProtocol(), "http") !== 0)
$this->deliveryAttributes->setMediaProtocol("http");
}

// <--
Expand Down
2 changes: 1 addition & 1 deletion alpha/lib/model/DeliveryProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ protected function getFlavorAssetInfo($url, $urlPrefix = '', $flavor = null)
$ext = pathinfo($urlPath, PATHINFO_EXTENSION);
}

$bitrate = ($flavor ? $flavor->getBitrate() : 0);
$bitrate = ($flavor ? $flavor->getVideoBitrate() : 0);
$width = ($flavor ? $flavor->getWidth() : 0);
$height = ($flavor ? $flavor->getHeight() : 0);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[DefaultVodAppleHttp]
id=501
partnerId=0
name="Default HTTP Delivery Profile"
type=10
systemName="Default Akamai HLS direct"
description="Default Akamai HLS direct"
streamerType=applehttp
isDefault=1
parentId=0
url="http://@HOST_NAME@"
18 changes: 18 additions & 0 deletions deployment/updates/scripts/2014_05_27_create_delivery_profiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
*
* No need to re-run after server code deploy
*/
require_once (__DIR__ . '/../../bootstrap.php');

$script = realpath(dirname(__FILE__) . '/../../') . '/base/scripts/insertDefaults.php';
$cdnApiHost = kConf::get("cdn_api_host");

$config = realpath(dirname(__FILE__) . '/../../') . '/base/scripts/init_data/07.DeliveryProfileLiveAppleHttp.ini';
passthru("php $script $config");
Expand All @@ -19,5 +22,20 @@
passthru("php $script $config");


$configTemplate = realpath(dirname(__FILE__) . '/../../') . '/base/scripts/init_data/07.DeliveryProfileAkamaiHttp.template.ini';
$config = realpath(dirname(__FILE__) . '/../../') . '/base/scripts/init_data/07.DeliveryProfileAkamaiHttp.ini';
$content = file_get_contents($configTemplate);
$content = str_replace("@HOST_NAME@", $cdnApiHost, $content);
file_put_contents($config, $content);
passthru("php $script $config");
unlink($config);


$configTemplate = realpath(dirname(__FILE__) . '/../../') . '/base/scripts/init_data/07.DeliveryProfileAkamaiAppleHttp.template.ini';
$config = realpath(dirname(__FILE__) . '/../../') . '/base/scripts/init_data/07.DeliveryProfileAkamaiAppleHttp.ini';
$content = file_get_contents($configTemplate);
$content = str_replace("@HOST_NAME@", $cdnApiHost, $content);
file_put_contents($config, $content);
passthru("php $script $config");
unlink($config);

0 comments on commit cdaf403

Please sign in to comment.