public class RecorderRtpImpl extends java.lang.Object implements Recorder, javax.media.rtp.ReceiveStreamListener, ActiveSpeakerChangedListener, javax.media.ControllerListener
Recorder.Listener
Modifier and Type | Field and Description |
---|---|
(package private) StreamRTPManager |
streamRTPManager |
FORMAT, SAVED_CALLS_PATH
Constructor and Description |
---|
RecorderRtpImpl(RTPTranslator translator)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
activeSpeakerChanged(long ssrc)
|
void |
addListener(Recorder.Listener listener)
Implements
Recorder.addListener(Recorder.Listener) . |
void |
connect(Recorder recorder) |
void |
controllerUpdate(javax.media.ControllerEvent ev)
Implements
ControllerListener.controllerUpdate(ControllerEvent) . |
java.lang.String |
getFilename()
Implements
Recorder.getFilename() . |
MediaStream |
getMediaStream()
Gets the MediaStream associated with this Recorder.
|
java.util.List<java.lang.String> |
getSupportedFormats()
Implements
Recorder.getSupportedFormats() . |
SynchronizerImpl |
getSynchronizer()
Gets the Synchronizer of this Recorder.
|
void |
removeListener(Recorder.Listener listener)
Implements
Recorder.removeListener(Recorder.Listener) . |
void |
setEventHandler(RecorderEventHandler eventHandler)
Sets the instance which should be notified when events related to
recordings (such as the start or end of a recording) occur.
|
void |
setMute(boolean mute)
Implements
Recorder.setMute(boolean) . |
void |
setSynchronizer(Synchronizer synchronizer)
Sets the Synchronizer that this instance should use.
|
void |
start(java.lang.String format,
java.lang.String dirname)
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.
|
void |
update(javax.media.rtp.event.ReceiveStreamEvent event)
Implements
ReceiveStreamListener.update(ReceiveStreamEvent) . |
StreamRTPManager streamRTPManager
public RecorderRtpImpl(RTPTranslator translator)
translator
- the RTPTranslator to which this instance will
attach in order to record media.public void addListener(Recorder.Listener listener)
Recorder.addListener(Recorder.Listener)
.addListener
in interface Recorder
listener
- the new Listener to be added to the list of
listeners interested in notifications from this Recorderpublic void removeListener(Recorder.Listener listener)
Recorder.removeListener(Recorder.Listener)
.removeListener
in interface Recorder
listener
- the existing Listener to be removed from the
list of listeners interested in notifications from this Recorderpublic java.util.List<java.lang.String> getSupportedFormats()
Recorder.getSupportedFormats()
.getSupportedFormats
in interface Recorder
public void setMute(boolean mute)
Recorder.setMute(boolean)
.public java.lang.String getFilename()
Recorder.getFilename()
. Returns null, since we don't
have a (single) associated filename.getFilename
in interface Recorder
public void setEventHandler(RecorderEventHandler eventHandler)
setEventHandler
in interface Recorder
eventHandler
- the RecorderEventHandler to set.public void start(java.lang.String format, java.lang.String dirname) throws java.io.IOException, MediaException
start
in interface Recorder
format
- unused, since this implementation records multiple streams
using potentially different formats.dirname
- the path to the directory into which this Recorder
will store the recorded media files.java.io.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 Recorderpublic MediaStream getMediaStream()
getMediaStream
in interface Recorder
public void stop()
Recorder
public void update(javax.media.rtp.event.ReceiveStreamEvent event)
ReceiveStreamListener.update(ReceiveStreamEvent)
.
rtpManager
will use this to notify us of
ReceiveStreamEvents.update
in interface javax.media.rtp.ReceiveStreamListener
public void controllerUpdate(javax.media.ControllerEvent ev)
ControllerListener.controllerUpdate(ControllerEvent)
.
Handles events from the Processors that this instance uses to
transcode media.controllerUpdate
in interface javax.media.ControllerListener
ev
- the event to handle.public void activeSpeakerChanged(long ssrc)
ActiveSpeakerChangedListener.activeSpeakerChanged(long)
.
Notifies this RecorderRtpImpl that the audio
ReceiveStream considered active has changed, and that the new
active stream has SSRC ssrc.activeSpeakerChanged
in interface ActiveSpeakerChangedListener
ssrc
- the SSRC of the new active stream.public SynchronizerImpl getSynchronizer()
Recorder
getSynchronizer
in interface Recorder
public void setSynchronizer(Synchronizer synchronizer)
Recorder
setSynchronizer
in interface Recorder
synchronizer
- the Synchronizer to set.public void connect(Recorder recorder)
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.