Package com.wowza.wms.dvr
Interface IDvrStreamVersionHandler
-
- All Known Implementing Classes:
DefaultDvrStreamVersionHandler
public interface IDvrStreamVersionHandler
Callback to manage (archival) versions of DVR stream stores
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IDvrStreamStore
determineExistingStoreForPlaying(IDvrStreamManager dvrManager, String baseStreamName)
When a session requests a stream store w/o specifying the version, we need gto determine the version of the stream to store.IDvrStreamStore
determineExistingStoreForRecording(IDvrStreamManager dvrManager, String baseStreamName)
After a set of versioned streams are loaded from disk, one of them may be designated the stream that will be recorded to (i.e.String
getArchiveStrategy(IDvrStreamManager dvrManager, String baseStreamName)
Determine the archive strategy for a given set of streams.boolean
handleArchivedStream(IDvrStreamManager dvrManager, String baseStreamName, String version, java.util.SortedSet<Integer> versions, com.wowza.wms.dvr.io.manifest.DvrManifestHolder manifest)
When a stream group inits, the file system is checked for older versions of the streams.boolean
shouldDeleteArchivedStream(IDvrStreamManager dvrManager, IDvrStreamStore store)
Determine if a given stream store version should be deleted.boolean
shouldLoadArchivedStream(IDvrStreamManager dvrManager, String baseStreamName, String version, java.util.SortedSet<Integer> versions, com.wowza.wms.dvr.io.manifest.DvrManifestHolder manifest)
Determine if a given stream store version should be loaded into WMS.
-
-
-
Method Detail
-
determineExistingStoreForRecording
IDvrStreamStore determineExistingStoreForRecording(IDvrStreamManager dvrManager, String baseStreamName)
After a set of versioned streams are loaded from disk, one of them may be designated the stream that will be recorded to (i.e. append mode).The default implementation says that if append mode, then the highest versioned stream that has canRecord set to true is used. But this API, allows for a more detailed logic.
- Parameters:
dvrManager
- The DVR Stream ManagerbaseStreamName
- The base stream name (no version info). e.g. myStream- Returns:
- stream store to append to, null if no stream in the stream group is to be appended to.
- See Also:
DefaultDvrStreamVersionHandler
-
determineExistingStoreForPlaying
IDvrStreamStore determineExistingStoreForPlaying(IDvrStreamManager dvrManager, String baseStreamName)
When a session requests a stream store w/o specifying the version, we need gto determine the version of the stream to store.The default implementation first checks the recording stream. If it 'canPlay(), it is returned. Otherwise, the highest versioned stream that canRecord set to true is used.
- Parameters:
dvrManager
- The DVR Stream ManagerbaseStreamName
- The base stream name (no version info). e.g. myStream- Returns:
- stream store to stream, null if no stream in the stream group can be played.
- See Also:
DefaultDvrStreamVersionHandler
-
getArchiveStrategy
String getArchiveStrategy(IDvrStreamManager dvrManager, String baseStreamName)
Determine the archive strategy for a given set of streams.Typically, this returns the archive strategy as specified in Application.xml, but this API provides a hook for more detailed logic in determining the strategy.
- Parameters:
dvrManager
- The DVR App Instance ManagerbaseStreamName
- The base stream name (no version info). e.g. myStream- Returns:
- the archive strategy
- See Also:
DefaultDvrStreamVersionHandler
,IDvrConstants.ARCHIVE_STRATEGY_APPEND
,IDvrConstants.ARCHIVE_STRATEGY_DELETE
,IDvrConstants.ARCHIVE_STRATEGY_VERSION
-
handleArchivedStream
boolean handleArchivedStream(IDvrStreamManager dvrManager, String baseStreamName, String version, java.util.SortedSet<Integer> versions, com.wowza.wms.dvr.io.manifest.DvrManifestHolder manifest)
When a stream group inits, the file system is checked for older versions of the streams. This method is called to handle the streams.Typically, 3 things can happen: The stream is ignored, loaded, or deleted.
- Parameters:
dvrManager
- The DVR Stream ManagerbaseStreamName
- The base stream name (no version info). e.g. myStreamversion
- The version of the stream to be loaded.versions
- A sorted set of all the versions that are attempting to be loadedmanifest
- The main manifest info of the stream- Returns:
- true if handled in some manner, false if ignored (unhandled)
- See Also:
DefaultDvrStreamVersionHandler
-
shouldLoadArchivedStream
boolean shouldLoadArchivedStream(IDvrStreamManager dvrManager, String baseStreamName, String version, java.util.SortedSet<Integer> versions, com.wowza.wms.dvr.io.manifest.DvrManifestHolder manifest)
Determine if a given stream store version should be loaded into WMS.- Parameters:
dvrManager
- The DVR Stream ManagerbaseStreamName
- The base stream name (no version info). e.g. myStreamversion
- The version of the stream to be loaded.versions
- A sorted set of all the versions that are attempting to be loadedmanifest
- The main manifest info of the stream- Returns:
- true if should be loaded. false if not.
- See Also:
DefaultDvrStreamVersionHandler
-
shouldDeleteArchivedStream
boolean shouldDeleteArchivedStream(IDvrStreamManager dvrManager, IDvrStreamStore store)
Determine if a given stream store version should be deleted.- Parameters:
dvrManager
- The DVR Stream Managerstore
- The DVR store- Returns:
- true if should be deleted. false if not.
- See Also:
DefaultDvrStreamVersionHandler
-
-