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 TypeMethodDescriptionvoidaddAllTags(Collection<? extends TagModel> tags) Add a list of tags to the MediaPlaylist and propagate context and debug settingsvoidaddRenditionReportTags(Collection<TagModelRenditionReport> renditionReports) Adds EXT-X-RENDITION-REPORT tags.voidaddSegment(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()voiddoSubs(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.intgetTags()inthashCode()voidlogTags()voidremoveMediaPlaylistTags(Collection<? extends TagModel> tagsToRemove) Remove a list of "Media Playlist Tags" (as defined by the Apple spec) in the MediaPlaylist.voidsetContextStr(String context) Specific to Playlist reader to set the context in which the playlist is reading.voidsetPlaylistCount(int playlistCount) voidskipSegments(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()voidupdateMediaPlaylistTags(Collection<? extends TagModel> tagsToUpdate) Update a list of "Media Playlist Tags" (as defined by the Apple spec) in the MediaPlaylist.voidMethods inherited from class com.wowza.wms.manifest.model.ManifestModel
setManifestMethods 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:
getManifestin 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:ManifestModelDoes variable replacement within the manifest model based on http request coming in- Overrides:
doSubsin classManifestModel
-
getContextStr
Description copied from class:ManifestModelLoggingGet the context string associated with the Model to include with the log statements- Specified by:
getContextStrin 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:
equalsin classManifestModel
-
hashCode
public int hashCode()- Overrides:
hashCodein classManifestModel
-
toString
- Overrides:
toStringin classManifestModel
-
clone
- Overrides:
clonein classManifestModelLogging- Throws:
CloneNotSupportedException
-
write
- Specified by:
writein classManifestModel- Throws:
IOException
-
getTags
-
findTag
-
getSegments
-