Interface ILiveStreamRecordManagerActionNotify


  • public interface ILiveStreamRecordManagerActionNotify
    This interface provides notifications to registered listeners for LiveStreamRecordManager events as it operates on IStreamRecorders. These notification are sent prior to invoking the associated method for a recorder.

    Multiple Listener's can be registered for the LiveStreamRecordManager. The listeners are notified in the order in which they were added.

    See Also:
    for API's to add and remove listeners
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onCreateRecord​(IStreamRecorder recorder)
      This notification occurs when a new recorder is created due to a call to one of the ILiveStreamRecordManager startRecording API's.
      void onSplitRecord​(IStreamRecorder recorder)
      This notification occurs due to a call to the ILiveStreamRecordManager splitRecording API.
      void onStartRecord​(IStreamRecorder recorder)
      This notification occurs due to a call to one of the ILiveStreamRecordManager startRecording API's.
      void onStopRecord​(IStreamRecorder recorder)
      This notification occurs due to a call to the ILiveStreamRecordManager stopRecording API.
      void onSwitchRecord​(IStreamRecorder recorder, IMediaStream newStream)
      This notification occurs when an existing stream is replaced with a stream of the same name.
      IStreamRecorder recordFactory​(String streamName, StreamRecorderParameters recordParams)
      This notification is the first one to occur when the ILiveStreamRecordManager is requested to start a recording via any of the ILiveStreamRecordManager startRecording API's
      It gives the listener the opportunity to return a custom class which implements the IStreamRecorder interface to handle the recording.
      If the listener returns null, the LiveStreamRecordManager will internally create an new StreamRecorder to handle the recording.
    • Method Detail

      • recordFactory

        IStreamRecorder recordFactory​(String streamName,
                                      StreamRecorderParameters recordParams)
        This notification is the first one to occur when the ILiveStreamRecordManager is requested to start a recording via any of the ILiveStreamRecordManager startRecording API's
        It gives the listener the opportunity to return a custom class which implements the IStreamRecorder interface to handle the recording.
        If the listener returns null, the LiveStreamRecordManager will internally create an new StreamRecorder to handle the recording. Since multiple listeners can be registered, LiveStreamRecordManager notifies listeners in the order in which they were added, and will use the first IStreamRecorder returned which is not null, however, remaining listeners will receive the notification.

        Called before LiveStreamRecordManager internal action is taken

        Parameters:
        recordParams - the parameters passed into IStreamRecordManager startRecording API
        streamName - the stream name passed into IStreamRecordManager startRecording API
        Returns:
        the IStreamRecorder which will handled recording or null
      • onCreateRecord

        void onCreateRecord​(IStreamRecorder recorder)
        This notification occurs when a new recorder is created due to a call to one of the ILiveStreamRecordManager startRecording API's.

        Called after the recordFactory notification is called, but before LiveStreamRecordManager calls the recorders own createRecorder method.

        Parameters:
        recorder - The new recorder
      • onStartRecord

        void onStartRecord​(IStreamRecorder recorder)
        This notification occurs due to a call to one of the ILiveStreamRecordManager startRecording API's.

        Called after the onCreateRecord notification is called, but before LiveStreamRecordManager calls the recorders own startRecorder method.

        Parameters:
        recorder - The recorder which is starting
      • onSplitRecord

        void onSplitRecord​(IStreamRecorder recorder)
        This notification occurs due to a call to the ILiveStreamRecordManager splitRecording API.

        Called before LiveStreamRecordManager calls the recorders own splitRecorder method.

        Parameters:
        recorder - The recorder for which the split has been requested.
      • onStopRecord

        void onStopRecord​(IStreamRecorder recorder)
        This notification occurs due to a call to the ILiveStreamRecordManager stopRecording API.

        Called before LiveStreamRecordManager calls the recorders own stopRecorder method.

        Parameters:
        recorder - The recorder for which a stop has been requested.
      • onSwitchRecord

        void onSwitchRecord​(IStreamRecorder recorder,
                            IMediaStream newStream)
        This notification occurs when an existing stream is replaced with a stream of the same name. This can occur when a stream is published from an encoder, and then a different encoder publishes a stream using the same stream name.

        Called before LiveStreamRecordManager calls the recorders own switchRecorder method.

        Parameters:
        recorder - The recorder for the existing stream
        newStream - The new IMediaStream associated with the existing stream name