Interface IStreamRecorder
- 
 public interface IStreamRecorderThis interface provides access to into a StreamRecorder.
 The StreamRecorder is responsible for performing the actual recording functionality of a live stream, as directed by the LiveStreamRecordManager.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description IStreamRecorderActionNotifyaddListener(IStreamRecorderActionNotify listener)Called to add a listener for IStreamRecorderActionNotify events generated by the recorder.
 Multiple listeners can be added.voidcreateRecorder()Called to tell the recorder to initalize itself after it has been created.IApplicationInstancegetAppInstance()Called to get the application Instance the recorder is associated withStringgetBaseFilePath()Called to get the full path and filename used by the recorder as the PRIOR to any changes made due to the selected segmentationType and versioningOption.longgetCurrentDuration()Called to get the current segment duration regardless of segmentationType.
 This value is updated continuously while the recorder state is RECORDER_STATE_RECORDING.StringgetCurrentFile()Called to get the current segments fully qualified file name regardless of segmentationType.
 This value is updated continuously while the recorder state is RECORDER_STATE_RECORDING.longgetCurrentSize()Called to get the current segment size regardless of segmentationType
 This value is updated continuously while the recorder state is RECORDER_STATE_RECORDING.org.joda.time.DateTimegetEndTime()Called to get the end time of the recording regardless of segmentationType.
 When the recording is still active, the returned value is null.
 When the recording has been stopped, the returned value is for the time when the recording stopped.StringgetErrorString()Called to get an error string describing the error, when the recorder state is is RECORDER_STATE_ERROR.StringgetFileFormat()Called to get output file format being used by the recorder.StringgetFilePath()Called to get the full path and filename used by the recorder AFTER changes made due to the selected segmentationType and versioningOption.
 NOTE: When the recorder is not in RECORDER_STATE_RECORDING state, the returned value will be the basefilePath value.IStreamRecorderFileVersionDelegategetFileVersionDelegate()Called to get the IStreamRecorderFileVersionDelegate being used by the recorder.StreamRecorderParametersgetRecorderParams()Called to get the StreamRecorderParameters for the recorder
 This is typically used to check or set the StreamRecorderParameters used to configure a recorder.intgetRecorderState()Called to get the current state of the recorderStringgetRecorderStateString()Called to get the current state of the recorder as a text string.StringgetSegmentationType()Called to get the SegmentationType being used by the recorder.longgetSegmentDuration()Called to get the segment duration used by the recorder when segmentationType is set to SEGMENT_BY_DURATION.intgetSegmentNumber()Called to get the current segment number regardless of segmentationType.
 This value is updated continuously while the recorder state is RECORDER_STATE_RECORDING.StringgetSegmentScheduleString()Called to get the segment schedule crontab string used by the recorder when segmentationType is set to SEGMENT_BY_SCHEDULE.longgetSegmentSize()Called to get the segment size used by the recorder when segmentationType is set to SEGMENT_BY_SIZE.org.joda.time.DateTimegetStartTime()Called to get the start time of the current recording regardless of segmentationType.IMediaStreamgetStream()Called to get the IMediaStream object being used by the recorderStringgetStreamName()Called to get the stream name being used by the recorderStringgetVersioningOption()Called to get the method used by the recorder to version a file when a file exists of the same name.booleanisMoveFirstVideoFrameToZero()Called to check the value of MoveFirstVideoFrameToZero being used by the recorder.booleanisRecordData()Called to check the value of RecordData being used by the recorder.booleanisSplitOnTcDiscontinuity()Called to check the value of splitOnTcDiscontinuity being used by the recorder.booleanisStartOnKeyFrame()Called to check the value of StartOnKeyFrame being used by the recorder.booleanremoveListener(IStreamRecorderActionNotify listener)Called to remove a listener from the the recorder.voidsetStream(IMediaStream stream)Called to set the IMediaStream object the recorder will use
 NOTE: This method is used by LiveStreamRecordManager to manage recorders and associated IMediaStream objects and should NOT be used directly when a StreamRecorder is under the control of LiveStreamRecordManagervoidsplitRecorder()Called to tell the recorder to stop writing to the current file, create a new file and write begin writing data to the new file.
 The recorder should start writing data to the new file beginning with a video key frame.voidstartRecorder()Called to tell the recorder to start recording.voidstopRecorder()Called to tell the recorder to stop recording.voidswitchRecorder(IMediaStream newStream)Called to tell the recorder to switch over to the data from a new IMediaStream.
 This occurs when an existing stream is replaced with a stream of the same name.
 
- 
- 
- 
Method Detail- 
createRecordervoid createRecorder() Called to tell the recorder to initalize itself after it has been created. This API should be called prior to calling the startRecorder() method.
 - 
startRecordervoid startRecorder() Called to tell the recorder to start recording. This API should be called after createRecorder() method has been called to ensure the recorder has been properly initialized
 - 
switchRecordervoid switchRecorder(IMediaStream newStream) Called to tell the recorder to switch over to the data from a new IMediaStream.
 This occurs when an existing stream is replaced with a stream of the same name.For example: 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:
- newStream- The new IMediaStream the recorder should switch to.
 
 - 
stopRecordervoid stopRecorder() Called to tell the recorder to stop recording.
 - 
splitRecordervoid splitRecorder() Called to tell the recorder to stop writing to the current file, create a new file and write begin writing data to the new file.
 The recorder should start writing data to the new file beginning with a video key frame.
 - 
getRecorderParamsStreamRecorderParameters getRecorderParams() Called to get the StreamRecorderParameters for the recorder
 This is typically used to check or set the StreamRecorderParameters used to configure a recorder. To get the actual value used by the recorder, use the appropriate get method found below.- See Also:
- StreamRecorderParameters
 
 - 
getAppInstanceIApplicationInstance getAppInstance() Called to get the application Instance the recorder is associated with
 - Returns:
- IApplicationInstance
 
 - 
getStreamNameString getStreamName() Called to get the stream name being used by the recorder
 - Returns:
- String Stream name
 
 - 
getStreamIMediaStream getStream() Called to get the IMediaStream object being used by the recorder
 - Returns:
- IMediaStream Stream object
 
 - 
setStreamvoid setStream(IMediaStream stream) Called to set the IMediaStream object the recorder will use
 NOTE: This method is used by LiveStreamRecordManager to manage recorders and associated IMediaStream objects and should NOT be used directly when a StreamRecorder is under the control of LiveStreamRecordManager
 - Parameters:
- stream- IMediaStream The new Stream object
 
 - 
getRecorderStateint getRecorderState() Called to get the current state of the recorder
 
 - 
getRecorderStateStringString getRecorderStateString() Called to get the current state of the recorder as a text string.
 - Returns:
- String Current state as a string
- See Also:
- IStreamRecorderConstants.RECORDER_STATE_ERROR_STRING,- IStreamRecorderConstants.RECORDER_STATE_PENDING_STRING,- IStreamRecorderConstants.RECORDER_STATE_WAITING_STRING,- IStreamRecorderConstants.RECORDER_STATE_RECORDING_STRING
 
 - 
getFileFormatString getFileFormat() Called to get output file format being used by the recorder.
 - Returns:
- String Output file format
- See Also:
- IStreamRecorderConstants.FORMAT_MP4,- IStreamRecorderConstants.FORMAT_FLV
 
 - 
isStartOnKeyFrameboolean isStartOnKeyFrame() Called to check the value of StartOnKeyFrame being used by the recorder.
 - Returns:
- boolean true, false
- See Also:
- StreamRecorderParameters.startOnKeyFrame
 
 - 
isRecordDataboolean isRecordData() Called to check the value of RecordData being used by the recorder.
 - Returns:
- boolean true, false
- See Also:
- StreamRecorderParameters.recordData
 
 - 
isSplitOnTcDiscontinuityboolean isSplitOnTcDiscontinuity() Called to check the value of splitOnTcDiscontinuity being used by the recorder.
 - Returns:
- boolean true, false
- See Also:
- StreamRecorderParameters.splitOnTcDiscontinuity
 
 - 
isMoveFirstVideoFrameToZeroboolean isMoveFirstVideoFrameToZero() Called to check the value of MoveFirstVideoFrameToZero being used by the recorder.
 - Returns:
- boolean true, false
- See Also:
- StreamRecorderParameters.moveFirstVideoFrameToZero
 
 - 
getSegmentationTypeString getSegmentationType() Called to get the SegmentationType being used by the recorder.
 - Returns:
- String Segmentation type
- See Also:
- StreamRecorderParameters.segmentationType,- IStreamRecorderConstants.SEGMENT_NONE,- IStreamRecorderConstants.SEGMENT_BY_DURATION,- IStreamRecorderConstants.SEGMENT_BY_SIZE,- IStreamRecorderConstants.SEGMENT_BY_SCHEDULE
 
 - 
getVersioningOptionString getVersioningOption() Called to get the method used by the recorder to version a file when a file exists of the same name.
 - Returns:
- String Versioning option
- See Also:
- StreamRecorderParameters.versioningOption,- IStreamRecorderConstants.APPEND_FILE,- IStreamRecorderConstants.OVERWRITE_FILE,- IStreamRecorderConstants.VERSION_FILE
 
 - 
getSegmentSizelong getSegmentSize() Called to get the segment size used by the recorder when segmentationType is set to SEGMENT_BY_SIZE.
 - Returns:
- long Segment size in bytes
- See Also:
- StreamRecorderParameters.segmentSize
 
 - 
getSegmentDurationlong getSegmentDuration() Called to get the segment duration used by the recorder when segmentationType is set to SEGMENT_BY_DURATION.
 - Returns:
- long Segment duration in milliseconds
- See Also:
- StreamRecorderParameters.segmentDuration
 
 - 
getSegmentScheduleStringString getSegmentScheduleString() Called to get the segment schedule crontab string used by the recorder when segmentationType is set to SEGMENT_BY_SCHEDULE.
 - Returns:
- String Segment schedule
- See Also:
- StreamRecorderParameters.segmentSchedule
 
 - 
getFilePathString getFilePath() Called to get the full path and filename used by the recorder AFTER changes made due to the selected segmentationType and versioningOption.
 NOTE: When the recorder is not in RECORDER_STATE_RECORDING state, the returned value will be the basefilePath value.- Returns:
- String Full path and filename
- See Also:
- getBaseFilePath()
 
 - 
getBaseFilePathString getBaseFilePath() Called to get the full path and filename used by the recorder as the PRIOR to any changes made due to the selected segmentationType and versioningOption.
 - Returns:
- String Full path and filename
- See Also:
- getFilePath()
 
 - 
getCurrentSizelong getCurrentSize() Called to get the current segment size regardless of segmentationType
 This value is updated continuously while the recorder state is RECORDER_STATE_RECORDING.- Returns:
- long Segment size in bytes
 
 - 
getCurrentDurationlong getCurrentDuration() Called to get the current segment duration regardless of segmentationType.
 This value is updated continuously while the recorder state is RECORDER_STATE_RECORDING.- Returns:
- long Segment duration in milliseconds
 
 - 
getCurrentFileString getCurrentFile() Called to get the current segments fully qualified file name regardless of segmentationType.
 This value is updated continuously while the recorder state is RECORDER_STATE_RECORDING.- Returns:
- String The current fully qualified file name, packets are being written to.
 
 - 
getSegmentNumberint getSegmentNumber() Called to get the current segment number regardless of segmentationType.
 This value is updated continuously while the recorder state is RECORDER_STATE_RECORDING.- Returns:
- int Current segment number.
 
 - 
getStartTimeorg.joda.time.DateTime getStartTime() Called to get the start time of the current recording regardless of segmentationType.
 - Returns:
- DateTime Current segment's start time.
 
 - 
getEndTimeorg.joda.time.DateTime getEndTime() Called to get the end time of the recording regardless of segmentationType.
 When the recording is still active, the returned value is null.
 When the recording has been stopped, the returned value is for the time when the recording stopped.- Returns:
- DateTime Segment end time.
 
 - 
getErrorStringString getErrorString() Called to get an error string describing the error, when the recorder state is is RECORDER_STATE_ERROR.
 - Returns:
- String Error description string
 
 - 
getFileVersionDelegateIStreamRecorderFileVersionDelegate getFileVersionDelegate() Called to get the IStreamRecorderFileVersionDelegate being used by the recorder.
 - Returns:
- IStreamRecorderFileVersionDelegate
- See Also:
- IStreamRecorderFileVersionDelegate,- StreamRecorderFileVersionDelegate,- StreamRecorderSimpleFileVersionDelegate
 
 - 
addListenerIStreamRecorderActionNotify addListener(IStreamRecorderActionNotify listener) Called to add a listener for IStreamRecorderActionNotify events generated by the recorder.
 Multiple listeners can be added. All listeners will be called for each event, in the order in which they were added.- Parameters:
- listener- An object which implements the IStreamRecorderActionNotify interface
- Returns:
- IStreamRecorderActionNotify The listener object passed in.
- See Also:
- IStreamRecorderActionNotify
 
 - 
removeListenerboolean removeListener(IStreamRecorderActionNotify listener) Called to remove a listener from the the recorder.
 - Parameters:
- listener- The listener which is to be removed
- Returns:
- boolean true, if listener was found in list, else false
 
 
- 
 
-