Interface IDvrStreamManager
-
- All Superinterfaces:
ILiveStreamPacketizer
public interface IDvrStreamManager extends ILiveStreamPacketizer
DVR Stream manager. Manages a live stream and associated DVR stores.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addDvrRecordingListener(IDvrRecordingListener listener)
Add listener to DVR recording events.void
addDvrStoreListener(IDvrStoreListener listener)
Add listener to DVR store lifecycle events.void
addManifestEntries(String vStreamName, java.util.List<DvrManifestEntry> entries, String serverGuid)
Add to stream stores manifest.void
addRepeaterHeartBeatItem()
boolean
canRecord()
Is this stream able to record.void
deleteArchivedStore(String vStreamName)
Delete archived stream store.String
getArchiveStrategy()
Get the DVR archive strategy.String
getContextStr()
Get stream context string, useful for logging.IHTTPStreamerCupertinoLivePacketizerDataHandler
getDataHandler()
IDvrStreamStore
getDefaultStreamingStore()
Get the store to be used for streaming.String
getDvrFileSystemClass()
Get the class used for the DVR file system.String
getDvrStorageDir()
Get the storage directory.int
getDvrStorageWindowSeconds()
Get DVR window size.com.wowza.wms.dvr.DvrBaseEncryptionInfoDelegate
getEncryptionDelegate()
Get the encryption delegate for providing streaming side encryption info objects.String
getEncryptionRepeaterSharedSecret()
Get the DVR encryption shared secret.IDvrStreamStore
getHighestVersionedStore()
Return stream store that is highest known version.void
getInitialRepeaterItems(java.util.List<com.wowza.wms.httpstreamer.dvrrepeater.DvrRepeaterHolder> items)
Get initial repeater items to send to repeater receiver.int
getMinimumAvailableChunks()
Return number of chunks that must be available to stream.String
getPacketizerName()
Get live stream packetizer name.IDvrStreamStore
getRecordingStreamStore()
Get current recording storevoid
getRepeaterItemsDvr(java.util.List<com.wowza.wms.httpstreamer.dvrrepeater.DvrRepeaterHolder> items, long lastSeq)
String
getStreamBaseName()
Get input streamName (no version info).IDvrStreamStore
getStreamStore(String vStreamName)
Given a stream name containing version info, return the associated stream store.java.util.List<IDvrStreamStore>
getStreamStores()
Get list of all stream stores known to this stream manager.IDvrStreamVersionHandler
getStreamVersionHandler()
Get the stream version handler object.void
initialAttributes(String vStreamName, int dvrWindow)
void
initialManifest(String vStreamName, IDvrManifest manifest)
void
initialManifestEnd(String vStreamName)
boolean
isRecording()
Is this stream currently recording.boolean
isRecordingPaused()
Is this stream currently paused from recording.IDvrStreamStore
loadArchivedStore(String vStreamName, com.wowza.wms.dvr.io.manifest.DvrManifestHolder manifestHolder)
Load archived stream store.void
notifyDvrStreamStorageDeleted(IDvrStreamStore store, com.wowza.wms.dvr.io.IDvrFileSystem fileSystem, boolean success)
void
notifyDvrStreamStoreCreate(IDvrStreamStore store)
void
notifyDvrStreamStoreDestroy(IDvrStreamStore store)
void
notifyDvrStreamStoreInit(IDvrStreamStore store)
void
notifyDvrStreamStoreLoaded(IDvrStreamStore store)
void
notifyTimeReset(IDvrStreamStore store, long oldDvrTime, long oldPacketTime, com.wowza.wms.dvr.TimeMapRecord newTimeMapRecord)
IDvrStreamStore
pauseRecording()
Request that stream recording pause.void
purgeManifestEntries(String vStreamName, DvrManifestEntryRangeGroup rangeGroup)
Purge entries from storevoid
removeDvrRecordingListener(IDvrRecordingListener listener)
Remove listener to DVR recording events.void
removeDvrStoreListener(IDvrStoreListener listener)
Remove listener of DVR store lifecycle events.void
removeStreamStore(String vStreamName)
void
resetStream()
Reset the stream.IDvrStreamStore
resumeRecording()
Request that stream recording resume.void
setDataHandler(IHTTPStreamerCupertinoLivePacketizerDataHandler dataHandler)
void
setDefaultStreamingStore(IDvrStreamStore store)
Set the store to be used for streaming.void
setRecordingStreamStore(IDvrStreamStore store)
Set the store used for recording.void
setStreamVersionHandler(IDvrStreamVersionHandler handler)
Set the stream version handler object.IDvrStreamStore
startRecording()
Request that stream recording start.void
stateChange(String vStreamName, com.wowza.wms.dvr.DvrStreamStoreState state)
IDvrStreamStore
stopRecording()
Request that stream recording stop.com.wowza.wms.dvr.DvrChunkStorageInfo
storeChunks(int vDuration, com.wowza.wms.dvr.DvrPacketHolder vPackets, int aDuration, com.wowza.wms.dvr.DvrPacketHolder aPackets, int dDuration, com.wowza.wms.dvr.DvrPacketHolder dPackets)
boolean
storeOnMetadata(long pt, long utc, AMFPacket metaPacket)
-
Methods inherited from interface com.wowza.wms.stream.livepacketizer.ILiveStreamPacketizer
getAndSetStartStream, getApplicationInstance, getLiveStreamPacketizerId, getProperties, getRepeaterLastSeqence, getSegmentDurationTarget, getSegmentStartKeyTimecode, getSegmentStopKeyTimecode, getSessionFormat, handlePacket, init, isActive, isPacketizeAudio, isPacketizeData, isPacketizeVideo, isRepeaterEdge, resetStream, sendLastData, setLiveStreamPacketizerId, setPacketizeAudio, setPacketizeData, setPacketizeVideo, setRepeaterEdge, setSegmentStopKeyTimecode, shutdown, startStream, touch
-
-
-
-
Method Detail
-
getContextStr
String getContextStr()
Get stream context string, useful for logging.- Returns:
- stream context string
-
getStreamBaseName
String getStreamBaseName()
Get input streamName (no version info).- Returns:
- unversioned incoming stream name
-
getStreamStore
IDvrStreamStore getStreamStore(String vStreamName)
Given a stream name containing version info, return the associated stream store.- Parameters:
vStreamName
- versioned stream name- Returns:
- store or null
-
getPacketizerName
String getPacketizerName()
Get live stream packetizer name.- Returns:
- live stream packetizer name
-
getStreamStores
java.util.List<IDvrStreamStore> getStreamStores()
Get list of all stream stores known to this stream manager.- Returns:
- list of stream stores.
-
getHighestVersionedStore
IDvrStreamStore getHighestVersionedStore()
Return stream store that is highest known version.- Returns:
- stream store
-
getMinimumAvailableChunks
int getMinimumAvailableChunks()
Return number of chunks that must be available to stream.- Returns:
- minimum available chunks
-
setRecordingStreamStore
void setRecordingStreamStore(IDvrStreamStore store)
Set the store used for recording.- Parameters:
store
- stream store, or null
-
getRecordingStreamStore
IDvrStreamStore getRecordingStreamStore()
Get current recording store- Returns:
- current recording store (may be null)
-
setDefaultStreamingStore
void setDefaultStreamingStore(IDvrStreamStore store)
Set the store to be used for streaming.- Parameters:
store
- store to stream.
-
getDefaultStreamingStore
IDvrStreamStore getDefaultStreamingStore()
Get the store to be used for streaming.- Returns:
- store to stream.
-
getDvrStorageWindowSeconds
int getDvrStorageWindowSeconds()
Get DVR window size.- Returns:
- window size in seconds (0 means infinite window size)
-
getDvrStorageDir
String getDvrStorageDir()
Get the storage directory.- Returns:
- storage directory
-
getDvrFileSystemClass
String getDvrFileSystemClass()
Get the class used for the DVR file system.- Returns:
- fully qualified class name
-
getArchiveStrategy
String getArchiveStrategy()
Get the DVR archive strategy.- Returns:
- The archive strategy
-
getEncryptionRepeaterSharedSecret
String getEncryptionRepeaterSharedSecret()
Get the DVR encryption shared secret.- Returns:
- shared secret.
-
getEncryptionDelegate
com.wowza.wms.dvr.DvrBaseEncryptionInfoDelegate getEncryptionDelegate()
Get the encryption delegate for providing streaming side encryption info objects.- Returns:
- delegate
-
getStreamVersionHandler
IDvrStreamVersionHandler getStreamVersionHandler()
Get the stream version handler object.- Returns:
- stream version handler object.
-
setStreamVersionHandler
void setStreamVersionHandler(IDvrStreamVersionHandler handler)
Set the stream version handler object. Must be called after the stream manager is created and before it is initialized.- Parameters:
handler
- stream version handler object.
-
resetStream
void resetStream()
Reset the stream.
-
canRecord
boolean canRecord()
Is this stream able to record.- Returns:
- true if this stream is recordable.
-
isRecording
boolean isRecording()
Is this stream currently recording. If this stream is not recordable, the method returns false.- Returns:
- true if has a recording stream and it is recording.
-
isRecordingPaused
boolean isRecordingPaused()
Is this stream currently paused from recording. If this stream is not recording and not paused, the method returns false.- Returns:
- true if has a recording is paused.
-
startRecording
IDvrStreamStore startRecording()
Request that stream recording start.Used internally. Clients should call
ILiveStreamDvrRecorder.startRecording()
. Note that this call places the DVR stream store in the recording state. If the stream store is in the paused state, DVR recording will not occur.If there is not currently a stream store for recording, one will attempt to be created. A successful start will result in registered
IDvrRecordingListener
s to have theirIDvrRecordingListener.recordingStarted(IDvrStreamStore)
method called.Success only occurs if the stream canRecord
IDvrStreamStore.canRecord()
and the stream is not already in the recording state.- Returns:
- store if successful. null otherwise.
-
stopRecording
IDvrStreamStore stopRecording()
Request that stream recording stop.Used internally. Clients should call
ILiveStreamDvrRecorder.stopRecording()
. Note that this call places the DVR stream in the not recording state.A successful stop will result in registered
IDvrRecordingListener
s to have theirIDvrRecordingListener.recordingStopped(IDvrStreamStore)
method called.Success only occurs if the stream is already in the recording state
IDvrStreamStore.isRecording()
.- Returns:
- store if successful. null otherwise.
-
pauseRecording
IDvrStreamStore pauseRecording()
Request that stream recording pause.Used internally. Clients should call
ILiveStreamDvrRecorder.pauseRecording()
. The stream does not have to be actively recording to be paused. For example, it could be paused before packets start flowing.A successful pause will result in registered
IDvrRecordingListener
s to have theirIDvrRecordingListener.recordingPaused(IDvrStreamStore)
method called.- Returns:
- store if successful. null otherwise.
-
resumeRecording
IDvrStreamStore resumeRecording()
Request that stream recording resume.Used internally. Clients should call
ILiveStreamDvrRecorder.resumeRecording()
. The stream does not have to be actively recording to be resumed. For example, it could have been paused before the stream started, and this call would move it out of the paused state.A successful resume will result in registered
IDvrRecordingListener
s to have theirIDvrRecordingListener.recordingResumed(IDvrStreamStore)
method called.- Returns:
- store if successful. null otherwise.
-
loadArchivedStore
IDvrStreamStore loadArchivedStore(String vStreamName, com.wowza.wms.dvr.io.manifest.DvrManifestHolder manifestHolder)
Load archived stream store.- Parameters:
vStreamName
- versioned stream Name (e.g. myStream.0)manifestHolder
- manifest holder containing list of manifest properties- Returns:
- stream store
-
deleteArchivedStore
void deleteArchivedStore(String vStreamName)
Delete archived stream store.- Parameters:
vStreamName
- versioned stream Name (e.g. myStream.0)
-
addManifestEntries
void addManifestEntries(String vStreamName, java.util.List<DvrManifestEntry> entries, String serverGuid)
Add to stream stores manifest.- Parameters:
vStreamName
- versioned stream Name (e.g. myStream.0)entries
- list of manifest entries.serverGuid
-
-
purgeManifestEntries
void purgeManifestEntries(String vStreamName, DvrManifestEntryRangeGroup rangeGroup)
Purge entries from store- Parameters:
vStreamName
- versioned stream Name (e.g. myStream.0)rangeGroup
- set of ranges for purging
-
storeChunks
com.wowza.wms.dvr.DvrChunkStorageInfo storeChunks(int vDuration, com.wowza.wms.dvr.DvrPacketHolder vPackets, int aDuration, com.wowza.wms.dvr.DvrPacketHolder aPackets, int dDuration, com.wowza.wms.dvr.DvrPacketHolder dPackets)
-
storeOnMetadata
boolean storeOnMetadata(long pt, long utc, AMFPacket metaPacket)
-
addDvrStoreListener
void addDvrStoreListener(IDvrStoreListener listener)
Add listener to DVR store lifecycle events.- Parameters:
listener
- listener
-
removeDvrStoreListener
void removeDvrStoreListener(IDvrStoreListener listener)
Remove listener of DVR store lifecycle events.- Parameters:
listener
- listener
-
addDvrRecordingListener
void addDvrRecordingListener(IDvrRecordingListener listener)
Add listener to DVR recording events.- Parameters:
listener
- listener
-
removeDvrRecordingListener
void removeDvrRecordingListener(IDvrRecordingListener listener)
Remove listener to DVR recording events.- Parameters:
listener
- listener
-
notifyDvrStreamStoreCreate
void notifyDvrStreamStoreCreate(IDvrStreamStore store)
-
notifyDvrStreamStoreInit
void notifyDvrStreamStoreInit(IDvrStreamStore store)
-
notifyDvrStreamStoreDestroy
void notifyDvrStreamStoreDestroy(IDvrStreamStore store)
-
notifyDvrStreamStoreLoaded
void notifyDvrStreamStoreLoaded(IDvrStreamStore store)
-
notifyDvrStreamStorageDeleted
void notifyDvrStreamStorageDeleted(IDvrStreamStore store, com.wowza.wms.dvr.io.IDvrFileSystem fileSystem, boolean success)
-
notifyTimeReset
void notifyTimeReset(IDvrStreamStore store, long oldDvrTime, long oldPacketTime, com.wowza.wms.dvr.TimeMapRecord newTimeMapRecord)
-
getInitialRepeaterItems
void getInitialRepeaterItems(java.util.List<com.wowza.wms.httpstreamer.dvrrepeater.DvrRepeaterHolder> items)
Get initial repeater items to send to repeater receiver.When an edge initially requests the items, instead if sending the entire manifest and all repeater items up until that point, the player sends a
DvrRepeaterHolder.REPEATER_INITIAL_MANIFEST
event followed by severalDvrRepeaterHolder.REPEATER_ADD_MANIFEST_ENTRIES
events.This allows us to not bother sending any purged manifest entries.
- Parameters:
items
-
-
getRepeaterItemsDvr
void getRepeaterItemsDvr(java.util.List<com.wowza.wms.httpstreamer.dvrrepeater.DvrRepeaterHolder> items, long lastSeq)
-
initialManifest
void initialManifest(String vStreamName, IDvrManifest manifest)
-
initialManifestEnd
void initialManifestEnd(String vStreamName)
-
initialAttributes
void initialAttributes(String vStreamName, int dvrWindow)
-
stateChange
void stateChange(String vStreamName, com.wowza.wms.dvr.DvrStreamStoreState state)
-
removeStreamStore
void removeStreamStore(String vStreamName)
-
addRepeaterHeartBeatItem
void addRepeaterHeartBeatItem()
-
setDataHandler
void setDataHandler(IHTTPStreamerCupertinoLivePacketizerDataHandler dataHandler)
-
getDataHandler
IHTTPStreamerCupertinoLivePacketizerDataHandler getDataHandler()
-
-