public interface IStreamRecorder
| Modifier and Type | Method | Description |
|---|---|---|
IStreamRecorderActionNotify |
addListener(IStreamRecorderActionNotify listener) |
Called to add a listener for IStreamRecorderActionNotify events generated by the recorder.
Multiple listeners can be added. |
void |
createRecorder() |
Called to tell the recorder to initalize itself after it has been created.
|
IApplicationInstance |
getAppInstance() |
Called to get the application Instance the recorder is associated with
|
String |
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.
|
long |
getCurrentDuration() |
Called to get the current segment duration regardless of segmentationType.
This value is updated continuously while the recorder state is RECORDER_STATE_RECORDING. |
String |
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. |
long |
getCurrentSize() |
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.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. |
String |
getErrorString() |
Called to get an error string describing the error, when the recorder state is is RECORDER_STATE_ERROR.
|
String |
getFileFormat() |
Called to get output file format being used by the recorder.
|
String |
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. |
IStreamRecorderFileVersionDelegate |
getFileVersionDelegate() |
Called to get the IStreamRecorderFileVersionDelegate being used by the recorder.
|
StreamRecorderParameters |
getRecorderParams() |
Called to get the StreamRecorderParameters for the recorder
This is typically used to check or set the StreamRecorderParameters used to configure a recorder. |
int |
getRecorderState() |
Called to get the current state of the recorder
|
String |
getRecorderStateString() |
Called to get the current state of the recorder as a text string.
|
String |
getSegmentationType() |
Called to get the SegmentationType being used by the recorder.
|
long |
getSegmentDuration() |
Called to get the segment duration used by the recorder when segmentationType is set to SEGMENT_BY_DURATION.
|
int |
getSegmentNumber() |
Called to get the current segment number regardless of segmentationType.
This value is updated continuously while the recorder state is RECORDER_STATE_RECORDING. |
String |
getSegmentScheduleString() |
Called to get the segment schedule crontab string used by the recorder when segmentationType is set to SEGMENT_BY_SCHEDULE.
|
long |
getSegmentSize() |
Called to get the segment size used by the recorder when segmentationType is set to SEGMENT_BY_SIZE.
|
org.joda.time.DateTime |
getStartTime() |
Called to get the start time of the current recording regardless of segmentationType.
|
IMediaStream |
getStream() |
Called to get the IMediaStream object being used by the recorder
|
String |
getStreamName() |
Called to get the stream name being used by the recorder
|
String |
getVersioningOption() |
Called to get the method used by the recorder to version a file when a file exists of the same name.
|
boolean |
isMoveFirstVideoFrameToZero() |
Called to check the value of MoveFirstVideoFrameToZero being used by the recorder.
|
boolean |
isRecordData() |
Called to check the value of RecordData being used by the recorder.
|
boolean |
isSplitOnTcDiscontinuity() |
Called to check the value of splitOnTcDiscontinuity being used by the recorder.
|
boolean |
isStartOnKeyFrame() |
Called to check the value of StartOnKeyFrame being used by the recorder.
|
boolean |
removeListener(IStreamRecorderActionNotify listener) |
Called to remove a listener from the the recorder.
|
void |
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 |
void |
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. |
void |
startRecorder() |
Called to tell the recorder to start recording.
|
void |
stopRecorder() |
Called to tell the recorder to stop recording.
|
void |
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. |
IStreamRecorderActionNotify addListener(IStreamRecorderActionNotify listener)
listener - An object which implements the IStreamRecorderActionNotify interfaceIStreamRecorderActionNotifyvoid createRecorder()
IApplicationInstance getAppInstance()
String getBaseFilePath()
getFilePath()long getCurrentDuration()
String getCurrentFile()
long getCurrentSize()
org.joda.time.DateTime getEndTime()
String getErrorString()
String getFileFormat()
IStreamRecorderConstants.FORMAT_MP4,
IStreamRecorderConstants.FORMAT_FLVString getFilePath()
getBaseFilePath()IStreamRecorderFileVersionDelegate getFileVersionDelegate()
IStreamRecorderFileVersionDelegate,
StreamRecorderFileVersionDelegate,
StreamRecorderSimpleFileVersionDelegateStreamRecorderParameters getRecorderParams()
StreamRecorderParametersint getRecorderState()
String getRecorderStateString()
IStreamRecorderConstants.RECORDER_STATE_ERROR_STRING,
IStreamRecorderConstants.RECORDER_STATE_PENDING_STRING,
IStreamRecorderConstants.RECORDER_STATE_WAITING_STRING,
IStreamRecorderConstants.RECORDER_STATE_RECORDING_STRINGString getSegmentationType()
StreamRecorderParameters.segmentationType,
IStreamRecorderConstants.SEGMENT_NONE,
IStreamRecorderConstants.SEGMENT_BY_DURATION,
IStreamRecorderConstants.SEGMENT_BY_SIZE,
IStreamRecorderConstants.SEGMENT_BY_SCHEDULElong getSegmentDuration()
StreamRecorderParameters.segmentDurationint getSegmentNumber()
String getSegmentScheduleString()
StreamRecorderParameters.segmentSchedulelong getSegmentSize()
StreamRecorderParameters.segmentSizeorg.joda.time.DateTime getStartTime()
IMediaStream getStream()
String getStreamName()
String getVersioningOption()
StreamRecorderParameters.versioningOption,
IStreamRecorderConstants.APPEND_FILE,
IStreamRecorderConstants.OVERWRITE_FILE,
IStreamRecorderConstants.VERSION_FILEboolean isMoveFirstVideoFrameToZero()
StreamRecorderParameters.moveFirstVideoFrameToZeroboolean isRecordData()
StreamRecorderParameters.recordDataboolean isSplitOnTcDiscontinuity()
StreamRecorderParameters.splitOnTcDiscontinuityboolean isStartOnKeyFrame()
StreamRecorderParameters.startOnKeyFrameboolean removeListener(IStreamRecorderActionNotify listener)
listener - The listener which is to be removedvoid setStream(IMediaStream stream)
stream - IMediaStream The new Stream objectvoid splitRecorder()
void startRecorder()
void stopRecorder()
void switchRecorder(IMediaStream newStream)
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.
newStream - The new IMediaStream the recorder should switch to.