Interface ILiveStreamRecordManager


public interface ILiveStreamRecordManager
This interface provides access to the functionality of the LiveStreamRecordManager. The LiveStreamRecordManger is responsible for maintaining the list of IStreamRecorders as well as managing the IStreamRecorder life cycle.
  • Method Details

    • init

      void init(IVHost vhost)
      Called by vhost init to intialize the LiveStreamRecordManager
      Parameters:
      vhost - The vhost to associated with the instance of LiveStreamRecordManager
    • getRecorder

      IStreamRecorder getRecorder(IApplicationInstance appInstance, String streamName)
      Used to get a specific IStreamRecorder from the LiveStreamRecordManager Modifying the returned IStreamRecorder while a recording is active may result in undefined behavior.
      Parameters:
      appInstance - The application instance associated with the desired IStreamRecorder
      streamName - The stream name associated with the desired IStreamRecorder
      Returns:
      The requested IStreamRecorder or null if it does not exist
    • getRecordersList

      List<IStreamRecorder> getRecordersList(IApplicationInstance appInstance)
      Used to get the list of IStreamRecorders for a specific application instance. Making changes to the returned list (e.g. removing an IStreamRecorder from the list) does not affect the LiveStreamRecordManager's list, however, changes made to the IStreamRecorders themselves will be reflected in the LiveStreamRecordManager's IStreamRecorder. Therefore, changing IStreamRecorders while a recording is active may result in undefined behavior.
      Parameters:
      appInstance - The application instance associated with the desired IStreamRecorder List
      Returns:
      The requested IStreamRecorder List. The list can be empty if no IStreamRecorders are set.
    • getRecordersMap

      Map<String,IStreamRecorder> getRecordersMap(IApplicationInstance appInstance)
      Used to get the Map of stream Name to IStreamRecorder for a specific application instance. Making changes to the returned map (e.g. removing a mapping entry from the map) does not affect the LiveStreamRecordManager's map, however, changes made to the IStreamRecorders themselves will be reflected in the LiveStreamRecordManager's IStreamRecorder. Therefore, changing IStreamRecorders while a recording is active may result in undefined behavior.
      Parameters:
      appInstance - The application instance associated with the desired IStreamRecorder List
      Returns:
      The requested stream name to IStreamRecorder mappings. The map can be empty if no IStreamRecorders are set.
    • startRecording

      void startRecording(IApplicationInstance appInstance, StreamRecorderParameters params)
      Used to tell the LiveStreamRecordManager to create StreamRecorders for all streams which are published to the specified application instance. The StreamRecorderParameters specified will be used for each StreamRecorder created. If the StreamRecordParameters are null the default StreamRecordParameters will be used.
      Parameters:
      appInstance - The application instance on which to record all incoming streams
      params - The StreamRecorderParameters to use for all recorders
      See Also:
    • startRecording

      void startRecording(IApplicationInstance appInstance, String streamName, StreamRecorderParameters params)
      Used to tell the LiveStreamRecordManager to create a StreamRecorder for a specific stream in a specific application instance. The StreamRecorderParameters specified will be used for the StreamRecorder. If the StreamRecordParameters are null the default StreamRecordParameters will be used.
      Parameters:
      appInstance - The application instance on which to record the requested stream
      streamName - The stream name associated with the incoming stream to record
      params - The StreamRecorderParameters to use for the StreamRecorder
      See Also:
    • stopRecording

      void stopRecording(IApplicationInstance appInstance, String streamName)
      Used to tell the LiveStreamRecordManager to stop a StreamRecorder for a specific stream in a specific application instance. If a StreamRecorder already exists for the specified application instance and stream name, nothing is done.
      Parameters:
      appInstance - The application instance of the StreamRecorder to stop
      streamName - The stream name associated with the StreamRecorder to stop
    • stopRecording

      void stopRecording(IApplicationInstance appInstance)
      Used to tell the LiveStreamRecordManager to stop all StreamRecorders on a specific application instance. If no StreamRecorders exist for the specified application instance, nothing is done.
      Parameters:
      appInstance - The application instance on which to stop all StreamRecorders
    • splitRecording

      void splitRecording(IApplicationInstance appInstance, String streamName)
      Used to tell the LiveStreamRecordManager to split (a.k.a segment) a recording immediately for a specific stream in a specific application instance. If no StreamRecorder exists for the specified application instance and stream name, nothing is done.
      Parameters:
      appInstance - The application instance of the StreamRecorder to split
      streamName - The stream name associated with the StreamRecorder to split
    • addListener

      Used to add a listener to receive ILiveStreamRecordManagerActionNotify events from the LiveStreamRecordManager. Listeners are notified in the order in which they are added.
      Parameters:
      listener - An instance of a class which implements the ILiveStreamRecordManagerActionNotify interface
      Returns:
      The listener instance passed in
      See Also:
    • removeListener

      boolean removeListener(ILiveStreamRecordManagerActionNotify listener)
      Used to remove an ILiveStreamRecordManagerActionNotify listener from the LiveStreamRecordManager.
      Parameters:
      listener - The listener passed into the addListener method.
      Returns:
      true if the listener was found in the list otherwise false.