Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia
Class RecorderImpl

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.RecorderImpl
All Implemented Interfaces:
Recorder

public class RecorderImpl
extends Object
implements Recorder

The call recording implementation. Provides the capability to start and stop call recording.

Author:
Dmitri Melnikov, Lubomir Marinov

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.java.sip.communicator.service.neomedia.Recorder
Recorder.Listener
 
Field Summary
(package private) static String[] SUPPORTED_FORMATS
          The list of formats in which RecorderImpl instances support recording media.
 
Fields inherited from interface net.java.sip.communicator.service.neomedia.Recorder
FORMAT, SAVED_CALLS_PATH
 
Constructor Summary
RecorderImpl(AudioMixerMediaDevice device)
          Constructs the RecorderImpl with the provided session.
 
Method Summary
 void addListener(Recorder.Listener listener)
          Adds a new Recorder.Listener to the list of listeners interested in notifications from this Recorder.
 String getFilename()
          Returns the filename we are last started or stopped recording to, null if not started.
 List<String> getSupportedFormats()
          Gets a list of the formats in which this Recorder supports recording media.
 void removeListener(Recorder.Listener listener)
          Removes a existing Recorder.Listener from the list of listeners interested in notifications from this Recorder.
 void setMute(boolean mute)
          Put the recorder in mute state.
 void start(String format, String filename)
          Starts the recording of the media associated with this Recorder (e.g.
 void stop()
          Stops the recording of the media associated with this Recorder (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUPPORTED_FORMATS

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:
addListener in interface Recorder
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:
getSupportedFormats in interface Recorder
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:
removeListener in interface Recorder
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:
start in interface Recorder
Parameters:
format - the format into which the media associated with this Recorder is to be recorded into the specified file
filename - 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 Recorder
MediaException - 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:
stop in interface Recorder
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.

Specified by:
setMute in interface Recorder
Parameters:
mute - the new value of the mute property

getFilename

public String getFilename()
Returns the filename we are last started or stopped recording to, null if not started.

Specified by:
getFilename in interface Recorder
Returns:
the filename we are last started or stopped recording to, null if not started.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.