Package org.red5.server.stream
Class RecordingListener
java.lang.Object
org.red5.server.stream.RecordingListener
- All Implemented Interfaces:
IStreamListener,IRecordingListener
Stream listener for recording stream events to a file.
- Author:
- Paul Gregoire (mondain@gmail.com)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FilegetRecordFile(IScope scope, String name) Get the file we'd be recording to based on scope and given name.booleaninit(IConnection conn, String name, boolean isAppend) Initialize the listener.booleanInitialize the listener.booleanbooleanvoidpacketReceived(IBroadcastStream stream, IStreamPacket packet) A packet has been received from a stream.voidsetFileConsumer(FileConsumer recordingConsumer) voidsetFileName(String fileName) voidstart()Start the recording.voidstop()Stop the recording.
-
Constructor Details
-
RecordingListener
public RecordingListener()
-
-
Method Details
-
getRecordFile
Get the file we'd be recording to based on scope and given name.- Parameters:
scope- scopename- name- Returns:
- file
-
init
Initialize the listener.- Specified by:
initin interfaceIRecordingListener- Parameters:
conn- Stream source connectionname- Stream nameisAppend- Append mode- Returns:
- true if initialization completes and false otherwise
-
init
Initialize the listener.- Specified by:
initin interfaceIRecordingListener- Parameters:
scope- Stream source scopename- Stream nameisAppend- Append mode- Returns:
- true if initialization completes and false otherwise
-
start
public void start()Start the recording.- Specified by:
startin interfaceIRecordingListener
-
stop
public void stop()Stop the recording.- Specified by:
stopin interfaceIRecordingListener
-
packetReceived
A packet has been received from a stream.- Specified by:
packetReceivedin interfaceIRecordingListener- Specified by:
packetReceivedin interfaceIStreamListener- Parameters:
stream- the stream the packet has been received forpacket- the packet received
-
isRecording
public boolean isRecording()- Specified by:
isRecordingin interfaceIRecordingListener- Returns:
- recording state, true if recording and false otherwise
-
isAppending
public boolean isAppending()- Specified by:
isAppendingin interfaceIRecordingListener- Returns:
- appending state, true if appending and false otherwise
-
getFileConsumer
- Specified by:
getFileConsumerin interfaceIRecordingListener- Returns:
- the recordingConsumer
-
setFileConsumer
- Specified by:
setFileConsumerin interfaceIRecordingListener- Parameters:
recordingConsumer- the recordingConsumer to set
-
getFileName
- Specified by:
getFileNamein interfaceIRecordingListener- Returns:
- the fileName
-
setFileName
- Specified by:
setFileNamein interfaceIRecordingListener- Parameters:
fileName- the fileName to set
-