Skip to content

Commit

Permalink
changes after code review
Browse files Browse the repository at this point in the history
main changes:
1) name refectory from lowLatencySettings to segmentDuration
2) replace segmentDuration type from enum to int
  • Loading branch information
lilachmaliniak committed Jan 22, 2017
1 parent ff19422 commit 64660d9
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 44 deletions.
12 changes: 0 additions & 12 deletions alpha/lib/enums/KalturaLowLatencyChunkDurationValue.php

This file was deleted.

17 changes: 0 additions & 17 deletions alpha/lib/enums/LowLatencyChunkDurationValue.php

This file was deleted.

2 changes: 1 addition & 1 deletion alpha/lib/enums/PermissionName.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ interface PermissionName extends BaseEnum
const FEATURE_BLOCK_FLVCLIPPER_ACTION = 'FEATURE_BLOCK_FLVCLIPPER_ACTION';

const FEATURE_DISABLE_NEW_USER_EMAIL = 'FEATURE_DISABLE_NEW_USER_EMAIL';
const FEATURE_LIVE_STREAM_ENABLE_LOW_LATENCY = 'FEATURE_LIVE_STREAM_ENABLE_LOW_LATENCY';
const FEATURE_LIVE_STREAM_ENABLE_SEGMENT_DURATION_UPDATE = 'FEATURE_LIVE_STREAM_ENABLE_SEGMENT_DURATION_UPDATE';

// base system permissions

Expand Down
5 changes: 3 additions & 2 deletions alpha/lib/model/LiveEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ abstract class LiveEntry extends entry
const CUSTOM_DATA_NAMESPACE_MEDIA_SERVERS = 'mediaServers';
const CUSTOM_DATA_RECORD_STATUS = 'record_status';
const CUSTOM_DATA_RECORD_OPTIONS = 'recording_options';
const DEFAULT_SEGMENT_DURATION_SECONDS = 10;
static $kalturaLiveSourceTypes = array(EntrySourceType::LIVE_STREAM, EntrySourceType::LIVE_CHANNEL, EntrySourceType::LIVE_STREAM_ONTEXTDATA_CAPTIONS);

protected $decidingLiveProfile = false;
Expand Down Expand Up @@ -747,8 +748,8 @@ public function setPublishConfigurations ($v)
$this->putInCustomData('push_publish_configurations', $v);
}

public function setLowLatencySettings ( $v ) { $this->putInCustomData ( "$lowLatencySettings" , $v ); }
public function getLowLatencySettings ( ) { return $this->getFromCustomData( "$lowLatencySettings", null, KalturaLowLatencyChunkDurationValue::TEN_SECONDS_CHUNK_DURATION); }
public function setSegmentDuration ( $v ) { $this->putInCustomData ( "segmentDuration" , $v ); }
public function getSegmentDuration ( ) { return $this->getFromCustomData( "segmentDuration", null, LiveEntry::DEFAULT_SEGMENT_DURATION_SECONDS); }

/**
* @return boolean
Expand Down
8 changes: 4 additions & 4 deletions api_v3/lib/types/entry/KalturaLiveStreamEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ class KalturaLiveStreamEntry extends KalturaLiveEntry
public $primaryServerNodeId;

/**
* The low latency flag
* The chunk duration value in seconds
* @requiresPermission all
* @var KalturaLowLatencyChunkDurationValue
* @var int
*/
public $lowLatencySettings;
public $segmentDuration;

private static $map_between_objects = array
(
Expand All @@ -137,7 +137,7 @@ class KalturaLiveStreamEntry extends KalturaLiveEntry
"streamUsername",
"bitrates" => "streamBitrates",
"primaryServerNodeId",
"lowLatencySettings",
"segmentDuration",
);

public function __construct()
Expand Down
14 changes: 7 additions & 7 deletions configurations/admin.template.ini
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ moduls.kalturaLiveStreamTranscode.basePermissionType = 2
moduls.kalturaLiveStreamTranscode.basePermissionName = FEATURE_KALTURA_LIVE_STREAM
moduls.kalturaLiveStreamTranscode.group = GROUP_ENABLE_DISABLE_FEATURES

moduls.liveStreamLowLatencySettings.enabled = true
moduls.liveStreamLowLatencySettings.permissionType = 2
moduls.liveStreamLowLatencySettings.label = Enable Low Latency
moduls.liveStreamLowLatencySettings.permissionName = FEATURE_LIVE_STREAM_ENABLE_LOW_LATENCY
moduls.liveStreamLowLatencySettings.basePermissionType = 2
moduls.liveStreamLowLatencySettings.basePermissionName = FEATURE_LIVE_STREAM
moduls.liveStreamLowLatencySettings.group = GROUP_ENABLE_DISABLE_FEATURES
moduls.liveStreamSegmentDuration.enabled = true
moduls.liveStreamSegmentDuration.permissionType = 2
moduls.liveStreamSegmentDuration.label = Enable Segment Duration Update
moduls.liveStreamSegmentDuration.permissionName = FEATURE_LIVE_STREAM_ENABLE_SEGMENT_DURATION_UPDATE
moduls.liveStreamSegmentDuration.basePermissionType = 2
moduls.liveStreamSegmentDuration.basePermissionName = FEATURE_LIVE_STREAM
moduls.liveStreamSegmentDuration.group = GROUP_ENABLE_DISABLE_FEATURES

moduls.liveChannel.enabled = true
moduls.liveChannel.permissionType = 2
Expand Down
2 changes: 1 addition & 1 deletion doc/media-server-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- FEATURE_LIVE_STREAM_RECORD
- FEATURE_KALTURA_LIVE_STREAM
- FEATURE_KALTURA_LIVE_STREAM_TRANSCODE
- FEATURE_LIVE_STREAM_ENABLE_LOW_LATENCY
- FEATURE_LIVE_STREAM_ENABLE_SEGMENT_DURATION_UPDATE



Expand Down

0 comments on commit 64660d9

Please sign in to comment.