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
 
 public class MediaPlaylist extends ManifestModel Provides implementation of HLS media playlists This class is not thread safe.
- 
- 
Constructor SummaryConstructors Constructor Description MediaPlaylist()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAllTags(java.util.Collection<? extends TagModel> tags)Add a list of tags to the MediaPlaylist and propagate context and debug settingsvoidaddRenditionReportTags(java.util.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.TagModeladdTag(TagModel tag)Add a tag to the playlist model and propagate context and debug settingsObjectclone()voiddoSubs(java.util.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 inbooleanequals(Object obj)<T extends TagModel>
 TfindTag(Class<T> tagType)StringgetContextStr()Get the context string associated with the Model to include with the log statementsSegmentPartIdgetLastSegmentPart()Retrieves the last segment's media sequence number and its last partial segment number (if any).StringgetManifest()TagModelMapgetMapTag(long segmentIndex, long partIndex)Retrieves a partial segment tag.TagModelPartialSegmentgetPartTag(long segmentIndex, long partIndex)Retrieves a partial segment tag.intgetPlaylistCount()java.util.TreeMap<Long,Segment>getSegments()java.util.Collection<TagModel>getTags()inthashCode()voidlogTags()voidremoveMediaPlaylistTags(java.util.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 overStringtoString()voidupdateMediaPlaylistTags(java.util.Collection<? extends TagModel> tagsToUpdate)Update a list of "Media Playlist Tags" (as defined by the Apple spec) in the MediaPlaylist.voidwrite(TagWriter tagWriter)- 
Methods inherited from class com.wowza.wms.manifest.model.ManifestModelsetManifest
 - 
Methods inherited from class com.wowza.wms.manifest.model.ManifestModelLogginggetDebugLog, logDebug, logError, logError, logError, logInfo, logWarn, setDebugLog, setUseSystemOut, usingSystemOut
 
- 
 
- 
- 
- 
Method Detail- 
getManifestpublic String getManifest() - Overrides:
- getManifestin class- ManifestModel
- Returns:
- the manifest
 
 - 
doSubspublic void doSubs(java.util.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 class- ManifestModel
 
 - 
getContextStrpublic String getContextStr() Description copied from class:ManifestModelLoggingGet the context string associated with the Model to include with the log statements- Specified by:
- getContextStrin class- ManifestModelLogging
- Returns:
- String
 
 - 
setContextStrpublic void setContextStr(String context) 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
 
 - 
getPlaylistCountpublic int getPlaylistCount() - Returns:
- the playlistCount
 
 - 
setPlaylistCountpublic void setPlaylistCount(int playlistCount) - Parameters:
- playlistCount- the playlistCount to set
 
 - 
addTagpublic TagModel addTag(TagModel tag) Add a tag to the playlist model and propagate context and debug settings- Parameters:
- tag- to be added to the playlist model
- Returns:
- tag
 
 - 
addAllTagspublic void addAllTags(java.util.Collection<? extends TagModel> tags) 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
 
 - 
logTagspublic void logTags() 
 - 
updateMediaPlaylistTagspublic void updateMediaPlaylistTags(java.util.Collection<? extends TagModel> tagsToUpdate) 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-
 
 - 
removeMediaPlaylistTagspublic void removeMediaPlaylistTags(java.util.Collection<? extends TagModel> tagsToRemove) 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-
 
 - 
addSegmentpublic void addSegment(Segment segment, long segmentId) 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
 
 - 
skipSegmentspublic 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 over- Parameters:
- duration- the minimum length of remaining segments.
 
 - 
addRenditionReportTagspublic void addRenditionReportTags(java.util.Collection<TagModelRenditionReport> renditionReports) 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.
 
 - 
getLastSegmentPartpublic SegmentPartId getLastSegmentPart() Retrieves the last segment's media sequence number and its last partial segment number (if any).- Returns:
- the segment/part Id
 
 - 
getPartTagpublic TagModelPartialSegment getPartTag(long segmentIndex, long partIndex) Retrieves a partial segment tag.- Returns:
- the tag
 
 - 
getMapTagpublic TagModelMap getMapTag(long segmentIndex, long partIndex) Retrieves a partial segment tag.- Returns:
- the tag
 
 - 
equalspublic boolean equals(Object obj) - Overrides:
- equalsin class- ManifestModel
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- ManifestModel
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- ManifestModel
 
 - 
clonepublic Object clone() throws CloneNotSupportedException- Overrides:
- clonein class- ManifestModelLogging
- Throws:
- CloneNotSupportedException
 
 - 
writepublic void write(TagWriter tagWriter) throws java.io.IOException - Specified by:
- writein class- ManifestModel
- Throws:
- java.io.IOException
 
 - 
getTagspublic java.util.Collection<TagModel> getTags() 
 - 
findTagpublic <T extends TagModel> T findTag(Class<T> tagType) 
 - 
getSegmentspublic java.util.TreeMap<Long,Segment> getSegments() 
 
- 
 
-