Class DefaultDvrStreamVersionHandler

    • Constructor Detail

      • DefaultDvrStreamVersionHandler

        public DefaultDvrStreamVersionHandler()
    • Method Detail

      • determineExistingStoreForRecording

        public IDvrStreamStore determineExistingStoreForRecording​(IDvrStreamManager dvrMgr,
                                                                  String baseStreamName)
        Description copied from interface: IDvrStreamVersionHandler
        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.

        Specified by:
        determineExistingStoreForRecording in interface IDvrStreamVersionHandler
        Parameters:
        dvrMgr - The DVR Stream Manager
        baseStreamName - 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

        public IDvrStreamStore determineExistingStoreForPlaying​(IDvrStreamManager dvrMgr,
                                                                String baseStreamName)
        Description copied from interface: IDvrStreamVersionHandler
        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.

        Specified by:
        determineExistingStoreForPlaying in interface IDvrStreamVersionHandler
        Parameters:
        dvrMgr - The DVR Stream Manager
        baseStreamName - 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
      • handleArchivedStream

        public boolean handleArchivedStream​(IDvrStreamManager dvrMgr,
                                            String baseStreamName,
                                            String vStreamName,
                                            java.util.SortedSet<Integer> versions,
                                            com.wowza.wms.dvr.io.manifest.DvrManifestHolder manifestHolder)
        Description copied from interface: IDvrStreamVersionHandler
        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.

        Specified by:
        handleArchivedStream in interface IDvrStreamVersionHandler
        Parameters:
        dvrMgr - The DVR Stream Manager
        baseStreamName - The base stream name (no version info). e.g. myStream
        vStreamName - The version of the stream to be loaded.
        versions - A sorted set of all the versions that are attempting to be loaded
        manifestHolder - The main manifest info of the stream
        Returns:
        true if handled in some manner, false if ignored (unhandled)
        See Also:
        DefaultDvrStreamVersionHandler
      • shouldLoadArchivedStream

        public boolean shouldLoadArchivedStream​(IDvrStreamManager dvrMgr,
                                                String baseStreamName,
                                                String vStreamName,
                                                java.util.SortedSet<Integer> versions,
                                                com.wowza.wms.dvr.io.manifest.DvrManifestHolder manifest)
        Description copied from interface: IDvrStreamVersionHandler
        Determine if a given stream store version should be loaded into WMS.
        Specified by:
        shouldLoadArchivedStream in interface IDvrStreamVersionHandler
        Parameters:
        dvrMgr - The DVR Stream Manager
        baseStreamName - The base stream name (no version info). e.g. myStream
        vStreamName - The version of the stream to be loaded.
        versions - A sorted set of all the versions that are attempting to be loaded
        manifest - The main manifest info of the stream
        Returns:
        true if should be loaded. false if not.
        See Also:
        DefaultDvrStreamVersionHandler