Class MediaPlaylist
Object
com.wowza.wms.manifest.model.ManifestModelLogging
com.wowza.wms.manifest.model.ManifestModel
com.wowza.wms.manifest.model.m3u8.MediaPlaylist
- All Implemented Interfaces:
Cloneable
Provides implementation of HLS media playlists
This class is not thread safe.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllTags
(Collection<? extends TagModel> tags) Add a list of tags to the MediaPlaylist and propagate context and debug settingsvoid
addRenditionReportTags
(Collection<TagModelRenditionReport> renditionReports) Adds EXT-X-RENDITION-REPORT tags.void
addSegment
(Segment segment, long segmentId) Add a new segment to the end of the segment list.Add a tag to the playlist model and propagate context and debug settingsclone()
void
doSubs
(Map<String, Object> params, IHTTPStreamerSession httpStreamerSession, IHTTPRequest req, com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.RequestInfo requestInfo) Does variable replacement within the manifest model based on http request coming inboolean
<T extends TagModel>
TGet the context string associated with the Model to include with the log statementsRetrieves the last segment's media sequence number and its last partial segment number (if any).getMapTag
(long segmentIndex, long partIndex) Retrieves a partial segment tag.getPartTag
(long segmentIndex, long partIndex) Retrieves a partial segment tag.int
getTags()
int
hashCode()
void
logTags()
void
removeMediaPlaylistTags
(Collection<? extends TagModel> tagsToRemove) Remove a list of "Media Playlist Tags" (as defined by the Apple spec) in the MediaPlaylist.void
setContextStr
(String context) Specific to Playlist reader to set the context in which the playlist is reading.void
setPlaylistCount
(int playlistCount) void
skipSegments
(Float duration) Trims segments off the beginning of the list to the point that the duration of the remaining segments is @duration or slightly overtoString()
void
updateMediaPlaylistTags
(Collection<? extends TagModel> tagsToUpdate) Update a list of "Media Playlist Tags" (as defined by the Apple spec) in the MediaPlaylist.void
Methods inherited from class com.wowza.wms.manifest.model.ManifestModel
setManifest
Methods inherited from class com.wowza.wms.manifest.model.ManifestModelLogging
getDebugLog, logDebug, logError, logError, logError, logInfo, logWarn, setDebugLog, setUseSystemOut, usingSystemOut
-
Constructor Details
-
MediaPlaylist
public MediaPlaylist()
-
-
Method Details
-
getManifest
- Overrides:
getManifest
in classManifestModel
- Returns:
- the manifest
-
doSubs
public void doSubs(Map<String, Object> params, IHTTPStreamerSession httpStreamerSession, IHTTPRequest req, com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.RequestInfo requestInfo) Description copied from class:ManifestModel
Does variable replacement within the manifest model based on http request coming in- Overrides:
doSubs
in classManifestModel
-
getContextStr
Description copied from class:ManifestModelLogging
Get the context string associated with the Model to include with the log statements- Specified by:
getContextStr
in classManifestModelLogging
- Returns:
- String
-
setContextStr
Specific to Playlist reader to set the context in which the playlist is reading. Intent would be this would be the Source stream name to associate the log entries with- Parameters:
context
- context of the reader
-
getPlaylistCount
public int getPlaylistCount()- Returns:
- the playlistCount
-
setPlaylistCount
public void setPlaylistCount(int playlistCount) - Parameters:
playlistCount
- the playlistCount to set
-
addTag
Add a tag to the playlist model and propagate context and debug settings- Parameters:
tag
- to be added to the playlist model- Returns:
- tag
-
addAllTags
Add a list of tags to the MediaPlaylist and propagate context and debug settings- Parameters:
tags
- - list of tags to be added to the playlist model
-
logTags
public void logTags() -
updateMediaPlaylistTags
Update a list of "Media Playlist Tags" (as defined by the Apple spec) in the MediaPlaylist. It is assumed that both the list of tags provided and the list of tags in the current MediaPlaylist contain no repeated tags (i.e. no more than one of any one TagModel type), as should be the case for Media Playlist tags. Media Segment tags should not be included since those are stored in the segment entries themselves.- Parameters:
tagsToUpdate
-
-
removeMediaPlaylistTags
Remove a list of "Media Playlist Tags" (as defined by the Apple spec) in the MediaPlaylist. It is assumed that both the list of tags provided and the list of tags in the current MediaPlaylist contain no repeated tags (i.e. no more than one of any one TagModel type), as should be the case for Media Playlist tags. Media Segment tags should not be included since those are stored in the segment entries themselves.- Parameters:
tagsToRemove
-
-
addSegment
Add a new segment to the end of the segment list. If the list exceeds the maximum number of segments, the first segment in the list is removed.- Parameters:
segment
- - new segment to add. Should be fully setup before calling this method
-
skipSegments
Trims segments off the beginning of the list to the point that the duration of the remaining segments is @duration or slightly over- Parameters:
duration
- the minimum length of remaining segments.
-
addRenditionReportTags
Adds EXT-X-RENDITION-REPORT tags. This can only be called from a request context where the ABR groupings are known.- Parameters:
renditionReports
- - ordered list of the variant rendition report tag models to add.
-
getLastSegmentPart
Retrieves the last segment's media sequence number and its last partial segment number (if any).- Returns:
- the segment/part Id
-
getPartTag
Retrieves a partial segment tag.- Returns:
- the tag
-
getMapTag
Retrieves a partial segment tag.- Returns:
- the tag
-
equals
- Overrides:
equals
in classManifestModel
-
hashCode
public int hashCode()- Overrides:
hashCode
in classManifestModel
-
toString
- Overrides:
toString
in classManifestModel
-
clone
- Overrides:
clone
in classManifestModelLogging
- Throws:
CloneNotSupportedException
-
write
- Specified by:
write
in classManifestModel
- Throws:
IOException
-
getTags
-
findTag
-
getSegments
-