Interface IDvrManifest
- Audio manifest
- Video manifest
- data manifest
- time map manifest, to map DVR, packet and real time
- codec manifest to track codec information
- onMetadata manifest
The difference between retrieving 'recorded entries' and 'live entries' is an important one. Recorded Entries means every current manifest entry. Live Entries refers to a subset of these because a playlist will not include the very last entries, as some chunks must be available for buffering.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Constant for codec manifest type.static final String
static final String
static final String
static final String
static final String
static final String
static final int
Constant for 'onMetadata' manifest type.static final int
Constant for time map manifest type. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToManifest
(List<DvrManifestEntry> entries) Add manifest entries to the manifestvoid
deserialize
(byte[] bytes) Deserialize the manifest.long
expandEndTime
(int type, long dvrEndTime) long
expandStartTime
(int type, long dvrStartTime) long
getClosestStartTime
(int type, long dvrTime) Given a dvrTime and a manifest type, find the closest chunk starting time.getCodecEntryForTime
(long dvrTime) Return most recent codec entry for a given DVR time.long
getDvrTime
(int type) getEntriesToPurge
(long purgeTime) Given a purge time, return a group of manifest ranges to purge.getFirstEntry
(int type) Given manifest type, get the first playlist manifest entry.getLastLiveEntry
(int type) Given manifest type, get the last playlist manifest entry.getLastRecordedEntry
(int type) Given manifest type and DVR time, get last entry.long
getLastRecordedIndex
(int type) Return last index of DVR entry for given type.long
getLiveDuration
(int type) Given manifest type, return DVR live duration in secondsgetLiveEntries
(int type, long dvrStart) Given manifest type and DVR time, get a list of the live entries.getLiveEntriesWithLimit
(int type, long dvrTime, int limit) Given manifest type and DVR time, get a list of the live entries limiting number of returned items.com.wowza.wms.dvr.DvrChannelManifest
getManifestChannel
(int type) For a given manifest type, return the channel manifest.getMetadataEntryForTime
(long dvrTime) Return most recent metadataEntry for a given DVR time.long
getNextChunkIndex
(String streamName, com.wowza.wms.dvr.DvrPacketHolder vPackets, com.wowza.wms.dvr.DvrPacketHolder aPackets) long
long
long
int
getNumberLiveEntries
(int type, long dvrStart) Given manifest type and DVR time, get the number of live entries at the given time.int
getNumberLiveEntries
(int type, long dvrStart, long dvrEnd) Given manifest type and DVR time, get the number of live entries at the given time.int
getNumberRecordedEntries
(int type, long dvrStart) Given manifest type and DVR time, get the number of entries at the given time.int
getNumberRecordedEntries
(int type, long dvrStart, long dvrEnd) Given manifest type and DVR time, get the number of live entries at the given time.long
getRecordedDuration
(int type) Given manifest type, return DVR recorded duration in secondsgetRecordedEntries
(int type) Get a copy of all manifest entries of a given type.getRecordedEntries
(int type, long dvrStartTime) Given manifest type and DVR time, get a list of recorded entries.getRecordedEntries
(int type, long dvrStartTime, long dvrEndTime) Given manifest type and DVR time, get a list of recorded entries.Given a DvrManifestEntryRange, get a list of recorded entries in this range.getRecordedEntriesMap
(int type) Get a copy of all manifest entries of a given type as a Map of indices.getRecordedEntriesWithLimit
(int type, long dvrTime, int limit) Given manifest type and DVR time, get a list of recorded entries limiting number of returned items.getRecordedEntryByIndex
(int type, long index) Get the manifest entry given a manifest type and an index.getRecordedEntryByTimeKey
(int type, long dvrTime) Get the manifest entry given a manifest type and a time (in DVR units)boolean
hasAudio()
Does manifest contain audio.boolean
Does manifest contain codec data.boolean
hasData()
Does manifest contain data.boolean
Does manifest contain onMetadata.boolean
Does manifest contain time map info.boolean
hasVideo()
Does manifest contain video.void
importManifest
(IDvrManifest manifest, boolean persist) Import the specified manifest into this manifestvoid
Initialize the manifest.Given a group of ranges, purge the manifest entries.void
Refresh the mainfest.byte[]
serialize
(boolean ignoreEntries) Serialize the manifest.
-
Field Details
-
ON_METADATA_TYPE
static final int ON_METADATA_TYPEConstant for 'onMetadata' manifest type.- See Also:
-
CODEC_TYPE
static final int CODEC_TYPEConstant for codec manifest type.- See Also:
-
TIME_MAP_TYPE
static final int TIME_MAP_TYPEConstant for time map manifest type.- See Also:
-
MANIFEST_TAGNAME_CAN_RECORD
- See Also:
-
MANIFEST_TAGNAME_CAN_PLAY
- See Also:
-
MANIFEST_TAGNAME_HAS_ENCRYPTION
- See Also:
-
MANIFEST_TAGNAME_CHUNK_GROUPING
- See Also:
-
MANIFEST_TAGNAME_PURGE_TIME
- See Also:
-
MANIFEST_TAGNAME_CURRENT_TIME
- See Also:
-
-
Method Details
-
initialize
void initialize()Initialize the manifest. Called after the previous storage has been loaded but before any chunks are added. -
refreshManifest
void refreshManifest()Refresh the mainfest. -
addToManifest
Add manifest entries to the manifest- Parameters:
entries
- list of entries.
-
getRecordedEntries
Get a copy of all manifest entries of a given type. Valid types include:IVHost.CONTENTTYPE_AUDIO
,IVHost.CONTENTTYPE_VIDEO
,IVHost.CONTENTTYPE_DATA
,ON_METADATA_TYPE
,CODEC_TYPE
, orTIME_MAP_TYPE
- Parameters:
type
- The manifest type.- Returns:
- list of entries
-
getRecordedEntriesMap
Get a copy of all manifest entries of a given type as a Map of indices. Valid types include:IVHost.CONTENTTYPE_AUDIO
,IVHost.CONTENTTYPE_VIDEO
,IVHost.CONTENTTYPE_DATA
,ON_METADATA_TYPE
,CODEC_TYPE
, orTIME_MAP_TYPE
- Parameters:
type
- the manifest type.- Returns:
- map of entries
-
getRecordedEntriesInRange
Given a DvrManifestEntryRange, get a list of recorded entries in this range.- Parameters:
range
- a range (which consists of a manifest type and a start and end index)- Returns:
- list of entries
-
getLastRecordedEntry
Given manifest type and DVR time, get last entry."Recorded Entries" includes those entries after the end of the playlist.
- Parameters:
type
- the manifest type.- Returns:
- manifest entry
-
getRecordedEntryByTimeKey
Get the manifest entry given a manifest type and a time (in DVR units)- Parameters:
type
- the manifest type.dvrTime
- DVR time- Returns:
- manifest entry
-
getRecordedEntryByIndex
Get the manifest entry given a manifest type and an index.- Parameters:
type
- the manifest type.index
- the index into the manifest- Returns:
- manifest entry
-
getEntriesToPurge
Given a purge time, return a group of manifest ranges to purge. This method ensures that the purge entries are aligned by index so that audio and video always remain index aligned.- Parameters:
purgeTime
- The DVR time to purge- Returns:
- a group of ranges.
-
purgeEntries
Given a group of ranges, purge the manifest entries.- Parameters:
ranges
- Group of ranges- Returns:
- A list of the purged items.
-
getMetadataEntryForTime
Return most recent metadataEntry for a given DVR time. The manifest for metadata entries is sparse-- it only stores items periodically. So for a given time t, the returned entry will exist at or before time t.- Parameters:
dvrTime
- DVR time- Returns:
- onMetadata Entry
-
getCodecEntryForTime
Return most recent codec entry for a given DVR time. The manifest for codec entries is sparse-- it only stores items periodically. So for a given time t, the returned entry will exist at or before time t.- Parameters:
dvrTime
- DVR time- Returns:
- Codec Entry
-
getNumberLiveEntries
int getNumberLiveEntries(int type, long dvrStart) Given manifest type and DVR time, get the number of live entries at the given time."Live Entries" means that a couple of the last entries will not be included as they are too close to the live point to be part of the playlist.
- Parameters:
type
- the manifest type.dvrStart
- DVR time- Returns:
- number of entries.
-
getNumberLiveEntries
int getNumberLiveEntries(int type, long dvrStart, long dvrEnd) Given manifest type and DVR time, get the number of live entries at the given time."Live Entries" means that a couple of the last entries will not be included as they are too close to the live point to be part of the playlist.
- Parameters:
type
- the manifest type.dvrStart
- DVR timedvrEnd
- end DVR time- Returns:
- number of entries.
-
getNumberRecordedEntries
int getNumberRecordedEntries(int type, long dvrStart) Given manifest type and DVR time, get the number of entries at the given time."Recorded Entries" includes those entries after the end of the playlist.
- Parameters:
type
- the manifest type.dvrStart
- DVR time- Returns:
- number of entries.
-
getNumberRecordedEntries
int getNumberRecordedEntries(int type, long dvrStart, long dvrEnd) Given manifest type and DVR time, get the number of live entries at the given time."Recorded Entries" includes those entries after the end of the playlist.
- Parameters:
type
- the manifest type.dvrStart
- DVR timedvrEnd
- end DVR time- Returns:
- number of entries.
-
getFirstEntry
Given manifest type, get the first playlist manifest entry.- Parameters:
type
- the manifest type.- Returns:
- manifest entry
-
getLastLiveEntry
Given manifest type, get the last playlist manifest entry."Live Entries" means that a couple of the last entries will not be included as they are too close to the live point to be part of the playlist.
- Parameters:
type
- the manifest type.- Returns:
- manifest entry
-
getLiveEntries
Given manifest type and DVR time, get a list of the live entries."Live Entries" means that a couple of the last entries will not be included as they are too close to the live point to be part of the playlist.
- Parameters:
type
- the manifest type.dvrStart
- DVR time- Returns:
- list of entries.
-
getLiveEntriesWithLimit
Given manifest type and DVR time, get a list of the live entries limiting number of returned items."Live Entries" means that a couple of the last entries will not be included as they are too close to the live point to be part of the playlist.
- Parameters:
type
- the manifest type.dvrTime
- DVR timelimit
- maximum number of returned items- Returns:
- list of entries.
-
getRecordedEntriesWithLimit
Given manifest type and DVR time, get a list of recorded entries limiting number of returned items."Recorded Entries" includes those entries after the end of the playlist.
- Parameters:
type
- the manifest type.dvrTime
- DVR timelimit
- maximum number of returned items- Returns:
- list of entries.
-
getRecordedEntries
Given manifest type and DVR time, get a list of recorded entries."Recorded Entries" includes those entries after the end of the playlist.
- Parameters:
type
- the manifest type.dvrStartTime
- DVR time- Returns:
- list of entries.
-
getRecordedEntries
Given manifest type and DVR time, get a list of recorded entries."Recorded Entries" includes those entries after the end of the playlist.
- Parameters:
type
- the manifest type.dvrStartTime
- DVR timedvrEndTime
- DVR end time- Returns:
- list of entries.
-
getRecordedDuration
long getRecordedDuration(int type) Given manifest type, return DVR recorded duration in seconds"Recorded Entries" includes those entries after the end of the "live" playlist.
- Parameters:
type
- the manifest type.- Returns:
- duration in seconds
-
getLiveDuration
long getLiveDuration(int type) Given manifest type, return DVR live duration in seconds"Recorded Entries" includes those entries after the end of the "live" playlist.
- Parameters:
type
- the manifest type.- Returns:
- duration in seconds
-
getDvrTime
long getDvrTime(int type) -
getLastRecordedIndex
long getLastRecordedIndex(int type) Return last index of DVR entry for given type.- Parameters:
type
-- Returns:
- index, or -1 if type does not exist
-
getNextChunkIndex
long getNextChunkIndex(String streamName, com.wowza.wms.dvr.DvrPacketHolder vPackets, com.wowza.wms.dvr.DvrPacketHolder aPackets) -
getNextMetadataIndex
long getNextMetadataIndex() -
getNextCodecIndex
long getNextCodecIndex() -
getNextTimeMapIndex
long getNextTimeMapIndex() -
getManifestChannel
com.wowza.wms.dvr.DvrChannelManifest getManifestChannel(int type) For a given manifest type, return the channel manifest.- Parameters:
type
-- Returns:
- channel manifest
-
importManifest
Import the specified manifest into this manifest- Parameters:
manifest
-persist
-
-
getClosestStartTime
long getClosestStartTime(int type, long dvrTime) Given a dvrTime and a manifest type, find the closest chunk starting time.- Parameters:
type
- manifest typedvrTime
- DVR time- Returns:
- time that corresponds to the closest start time of the given manifest type
-
expandEndTime
long expandEndTime(int type, long dvrEndTime) -
expandStartTime
long expandStartTime(int type, long dvrStartTime) -
hasVideo
boolean hasVideo()Does manifest contain video.- Returns:
- true if it contains video.
-
hasAudio
boolean hasAudio()Does manifest contain audio.- Returns:
- true if it contains audio.
-
hasData
boolean hasData()Does manifest contain data.- Returns:
- true if it contains data.
-
hasOnMetadata
boolean hasOnMetadata()Does manifest contain onMetadata.- Returns:
- true if it contains onMetadata.
-
hasCodecData
boolean hasCodecData()Does manifest contain codec data.- Returns:
- true if it contains codec data
-
hasTimeMapData
boolean hasTimeMapData()Does manifest contain time map info.- Returns:
- true if it contains time map info.
-
serialize
byte[] serialize(boolean ignoreEntries) Serialize the manifest.- Parameters:
ignoreEntries
- If true, the individual manifest entries are not serialized.- Returns:
- byte array of serialized data
-
deserialize
void deserialize(byte[] bytes) Deserialize the manifest. Should be called after default constructor for manifest has been called.- Parameters:
bytes
- buffer of bytes to deserialize
-
getTimeMap
IDvrTimeMap getTimeMap() -
getChunkIDHandler
IDvrChunkIDHandler3 getChunkIDHandler()
-