Class RecorderImpl
- java.lang.Object
-
- org.jitsi.impl.neomedia.recording.RecorderImpl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jitsi.service.neomedia.recording.Recorder
Recorder.Listener
-
-
Field Summary
Fields Modifier and Type Field Description static String[]SUPPORTED_FORMATSThe list of formats in which RecorderImpl instances support recording media.-
Fields inherited from interface org.jitsi.service.neomedia.recording.Recorder
FORMAT, SAVED_CALLS_PATH
-
-
Constructor Summary
Constructors Constructor Description RecorderImpl(AudioMixerMediaDevice device)Constructs the RecorderImpl with the provided session.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(Recorder.Listener listener)Adds a new Recorder.Listener to the list of listeners interested in notifications from this Recorder.StringgetFilename()Returns the filename we are last started or stopped recording to, null if not started.MediaStreamgetMediaStream()Gets the MediaStream associated with this Recorder.List<String>getSupportedFormats()Gets a list of the formats in which this Recorder supports recording media.SynchronizergetSynchronizer()Gets the Synchronizer of this Recorder.voidremoveListener(Recorder.Listener listener)Removes a existing Recorder.Listener from the list of listeners interested in notifications from this Recorder.voidsetEventHandler(RecorderEventHandler eventHandler)Sets the RecorderEventHandler which this Recorder should notify when events related to recording (such as start/end of a recording) occur.voidsetMute(boolean mute)Put the recorder in mute state.voidsetSynchronizer(Synchronizer synchronizer)Sets the Synchronizer that this instance should use.voidstart(String format, String filename)Starts the recording of the media associated with this Recorder (e.g.voidstop()Stops the recording of the media associated with this Recorder (e.g.
-
-
-
Field Detail
-
SUPPORTED_FORMATS
public static final String[] SUPPORTED_FORMATS
The list of formats in which RecorderImpl instances support recording media.
-
-
Constructor Detail
-
RecorderImpl
public RecorderImpl(AudioMixerMediaDevice device)
Constructs the RecorderImpl with the provided session.- Parameters:
device- device that can create a session that provides the output data source
-
-
Method Detail
-
addListener
public void addListener(Recorder.Listener listener)
Adds a new Recorder.Listener to the list of listeners interested in notifications from this Recorder.- Specified by:
addListenerin interfaceRecorder- Parameters:
listener- the new Recorder.Listener to be added to the list of listeners interested in notifications from this Recorder- See Also:
Recorder.addListener(Recorder.Listener)
-
getSupportedFormats
public List<String> getSupportedFormats()
Gets a list of the formats in which this Recorder supports recording media.- Specified by:
getSupportedFormatsin interfaceRecorder- Returns:
- a List of the formats in which this Recorder supports recording media
- See Also:
Recorder.getSupportedFormats()
-
removeListener
public void removeListener(Recorder.Listener listener)
Removes a existing Recorder.Listener from the list of listeners interested in notifications from this Recorder.- Specified by:
removeListenerin interfaceRecorder- Parameters:
listener- the existing Recorder.Listener to be removed from the list of listeners interested in notifications from this Recorder- See Also:
Recorder.removeListener(Recorder.Listener)
-
start
public void start(String format, String filename) throws IOException, MediaException
Starts the recording of the media associated with this Recorder (e.g. the media being sent and received in a Call) into a file with a specific name.- Specified by:
startin interfaceRecorder- Parameters:
format- the format into which the media associated with this Recorder is to be recorded into the specified filefilename- the name of the file into which the media associated with this Recorder is to be recorded- Throws:
IOException- if anything goes wrong with the input and/or output performed by this RecorderMediaException- if anything else goes wrong while starting the recording of media performed by this Recorder- See Also:
Recorder.start(String, String)
-
stop
public void stop()
Stops the recording of the media associated with this Recorder (e.g. the media being sent and received in a Call) if it has been started and prepares this Recorder for garbage collection.- Specified by:
stopin interfaceRecorder- See Also:
Recorder.stop()
-
setMute
public void setMute(boolean mute)
Put the recorder in mute state. It won't record the local input. This is used when the local call is muted and we don't won't to record the local input.
-
getFilename
public String getFilename()
Returns the filename we are last started or stopped recording to, null if not started.- Specified by:
getFilenamein interfaceRecorder- Returns:
- the filename we are last started or stopped recording to, null if not started.
-
setEventHandler
public void setEventHandler(RecorderEventHandler eventHandler)
Sets the RecorderEventHandler which this Recorder should notify when events related to recording (such as start/end of a recording) occur.- Specified by:
setEventHandlerin interfaceRecorder- Parameters:
eventHandler- the RecorderEventHandler to set.
-
getSynchronizer
public Synchronizer getSynchronizer()
Gets the Synchronizer of this Recorder. This Recorder implementation does not use a Synchronizer.- Specified by:
getSynchronizerin interfaceRecorder- Returns:
- the Synchronizer of this Recorder.
-
setSynchronizer
public void setSynchronizer(Synchronizer synchronizer)
Sets the Synchronizer that this instance should use. This Recorder implementation does not use a Synchronizer.- Specified by:
setSynchronizerin interfaceRecorder- Parameters:
synchronizer- the Synchronizer to set.
-
getMediaStream
public MediaStream getMediaStream()
Gets the MediaStream associated with this Recorder.- Specified by:
getMediaStreamin interfaceRecorder- Returns:
- the MediaStream associated with this Recorder.
-
-