Interface IStreamRecorderActionNotify


  • public interface IStreamRecorderActionNotify
    This interface provides notifications to registered listeners throughout the life cycle of a StreamRecorder. These events are similar to the ILiveStreamRecordManageActionNotify events, however, they are called by the StreamRecorder deeper in the action processing.

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

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

      • onCreateRecorder

        void onCreateRecorder​(IStreamRecorder recorder)
        This notification occurs when a new recorder has been created, but before recording has started. Within this method, changes can be made to the StreamRecorder's StreamRecorderParameters, which will then take affect when the recorder is started.

        Called before action is taken

        Parameters:
        recorder - the new recorder
      • onStartRecorder

        void onStartRecorder​(IStreamRecorder recorder)
        This notification occurs when a recorder starts recording.

        Called after all configuration of the recorder is complete, but before the recording actually starts.

        Parameters:
        recorder - the recorder which is starting
      • onSplitRecorder

        void onSplitRecorder​(IStreamRecorder recorder)
        This notification occurs when a recorder is directed to split the active recording.

        Called after all configuration of the recorder is complete, but before the recording actually starts.

        Parameters:
        recorder - the recorder which is starting
      • onStopRecorder

        void onStopRecorder​(IStreamRecorder recorder)
        This notification occurs when a recorder stops recording.
        NOTE: Recorders are stopped whenever a stream is unpublished, or when a stream is "reset".
        Within this method, calling; getCurrentFile(), getCurrentDuration(), getCurrentSize(), segmentNumber(), getStartTime(), getEndTime() will return the values accumulated from the time the onStartRecorder notification was called, to the time this notification was called.

        Called after the recorder is stopped.

        Parameters:
        recorder - the recorder which is starting
      • onSwitchRecorder

        void onSwitchRecorder​(IStreamRecorder recorder,
                              IMediaStream newStream)
        This notification occurs when an existing stream has been replaced by a new stream of the same name. The StreamRecorder will stop the recording associated with the existing stream and start a new recording for the new stream, using the same parameters as those used to originally start the recording.

        Called before any action is taken

        Parameters:
        recorder - the current recorder for existing stream
        newStream - the new stream which will be recorded
      • onSegmentStart

        void onSegmentStart​(IStreamRecorder recorder)
        This notification occurs when a recorder starts writing to the current file

        Called after a the file has been opened for writing, but before any data is written to the file.

        Parameters:
        recorder - the recorder which is writing the segment
      • onSegmentEnd

        void onSegmentEnd​(IStreamRecorder recorder)
        This notification occurs when a recorder stops writing to the current file

        Called after all packets have been written tot he file and the file has been closed.

        Parameters:
        recorder - the recorder which is wrote the segment