|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.service.neomedia.AbstractMediaStream
net.java.sip.communicator.impl.neomedia.MediaStreamImpl
net.java.sip.communicator.impl.neomedia.AudioMediaStreamImpl
public class AudioMediaStreamImpl
Extends MediaStreamImpl in order to provide an implementation of AudioMediaStream.
| Field Summary |
|---|
| Fields inherited from class net.java.sip.communicator.impl.neomedia.MediaStreamImpl |
|---|
PROPERTY_NAME_RECEIVE_BUFFER_LENGTH |
| Fields inherited from interface net.java.sip.communicator.service.neomedia.MediaStream |
|---|
PNAME_LOCAL_SSRC, PNAME_REMOTE_SSRC |
| Constructor Summary | |
|---|---|
AudioMediaStreamImpl(StreamConnector connector,
MediaDevice device,
SrtpControl srtpControl)
Initializes a new AudioMediaStreamImpl instance which will use the specified MediaDevice for both capture and playback of audio exchanged via the specified StreamConnector. |
|
| Method Summary | |
|---|---|
void |
addDTMFListener(DTMFListener listener)
Adds a DTMFListener to this AudioMediaStream which is to receive notifications when the remote party starts sending DTMF tones to us. |
void |
addRTPExtension(byte extensionID,
RTPExtension rtpExtension)
In addition to calling MediaStreamImpl.addRTPExtension(byte, RTPExtension)
this method enables sending of CSRC audio levels. |
void |
close()
Releases the resources allocated by this instance in the course of its execution and prepares it to be garbage collected. |
protected void |
configureRTPManagerBufferControl(StreamRTPManager rtpManager,
javax.media.control.BufferControl bufferControl)
Performs any optional configuration on the BufferControl of the specified RTPManager which is to be used as the RTPManager of this MediaStreamImpl. |
protected DtmfTransformEngine |
createDtmfTransformEngine()
A stub that allows audio oriented streams to create and keep a reference to a DtmfTransformEngine. |
void |
fireConferenceAudioLevelEvent(long[] audioLevels)
Delivers the audioLevels map to whoever's interested. |
void |
fireDTMFEvent(DTMFRtpTone tone,
boolean end)
Delivers the DTMF tones. |
AudioMediaDeviceSession |
getDeviceSession()
Returns the MediaDeviceSession associated with this stream after first casting it to AudioMediaDeviceSession since this is, after all, an AudioMediaStreamImpl. |
int |
getLastMeasuredAudioLevel(long ssrc)
Returns the last audio level that was measured by the underlying device session for the specified ssrc (where ssrc could also correspond to our local sync source identifier). |
protected int |
getPriority()
The priority of the audio is 3, which is meant to be higher than other threads and higher than the video one. |
protected void |
registerCustomCodecFormats(StreamRTPManager rtpManager)
Registers CUSTOM_CODEC_FORMATS with a specific
RTPManager. |
void |
removeDTMFListener(DTMFListener listener)
Removes listener from the list of DTMFListeners registered with this AudioMediaStream to receive notifications about incoming DTMF tones. |
void |
setCsrcAudioLevelListener(CsrcAudioLevelListener listener)
Registers listener as the CsrcAudioLevelListener that will receive notifications for changes in the levels of conference participants that the remote party could be mixing. |
void |
setLocalUserAudioLevelListener(SimpleAudioLevelListener listener)
Sets listener as the SimpleAudioLevelListener registered to receive notifications from our device session for changes in the levels of the audio that this stream is sending out. |
void |
setStreamAudioLevelListener(SimpleAudioLevelListener listener)
Sets listener as the SimpleAudioLevelListener registered to receive notifications from our device session for changes in the levels of the party that's at the other end of this stream. |
void |
startSendingDTMF(DTMFTone tone,
DTMFMethod dtmfMethod)
Starts sending the specified DTMFTone until the stopSendingDTMF() method is called (Excepts for INBAND DTMF, which stops by itself this is why where there is no need to call the stopSendingDTMF). |
void |
stopSendingDTMF(DTMFMethod dtmfMethod)
Interrupts transmission of a DTMFTone started with the startSendingDTMF() method. |
| Methods inherited from class net.java.sip.communicator.service.neomedia.AbstractMediaStream |
|---|
addPropertyChangeListener, firePropertyChange, getName, matches, removePropertyChangeListener, setName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.java.sip.communicator.service.neomedia.MediaStream |
|---|
addDynamicRTPPayloadType, addPropertyChangeListener, getActiveRTPExtensions, getDevice, getDirection, getDynamicRTPPayloadTypes, getFormat, getLocalSourceID, getMediaStreamStats, getName, getRemoteControlAddress, getRemoteDataAddress, getRemoteSourceID, getSrtpControl, getTarget, getTransportProtocol, isMute, isStarted, removePropertyChangeListener, setConnector, setDevice, setDirection, setFormat, setMute, setName, setRTPTranslator, setTarget, start, stop |
| Constructor Detail |
|---|
public AudioMediaStreamImpl(StreamConnector connector,
MediaDevice device,
SrtpControl srtpControl)
connector - the StreamConnector the new instance is to use
for sending and receiving audiodevice - the MediaDevice the new instance is to use for
both capture and playback of audio exchanged via the specified
StreamConnectorsrtpControl - a control which is already created, used to control
the srtp operations.| Method Detail |
|---|
protected void configureRTPManagerBufferControl(StreamRTPManager rtpManager,
javax.media.control.BufferControl bufferControl)
configureRTPManagerBufferControl in class MediaStreamImplrtpManager - the RTPManager which is to be used by this
MediaStreamImplbufferControl - the BufferControl of rtpManager on
which any optional configuration is to be performedprotected DtmfTransformEngine createDtmfTransformEngine()
createDtmfTransformEngine in class MediaStreamImplpublic void addDTMFListener(DTMFListener listener)
addDTMFListener in interface AudioMediaStreamlistener - the DTMFListener to register for notifications
about the remote party starting sending of DTM tones to this
AudioMediaStreamAudioMediaStream.addDTMFListener(DTMFListener)public void setStreamAudioLevelListener(SimpleAudioLevelListener listener)
setStreamAudioLevelListener in interface AudioMediaStreamlistener - the SimpleAudioLevelListener that we'd like to
register or null if we want to stop stream audio level
measurements.public void setCsrcAudioLevelListener(CsrcAudioLevelListener listener)
setCsrcAudioLevelListener in interface AudioMediaStreamlistener - the CsrcAudioLevelListener that we'd like to
register or null if we'd like to stop receiving notifications.protected void registerCustomCodecFormats(StreamRTPManager rtpManager)
CUSTOM_CODEC_FORMATS with a specific
RTPManager.
registerCustomCodecFormats in class MediaStreamImplrtpManager - the RTPManager to register
CUSTOM_CODEC_FORMATS withMediaStreamImpl.registerCustomCodecFormats(StreamRTPManager)public void removeDTMFListener(DTMFListener listener)
removeDTMFListener in interface AudioMediaStreamlistener - the DTMFListener to no longer be notified by
this AudioMediaStream about incoming DTMF tonesAudioMediaStream.removeDTMFListener(DTMFListener)
public void startSendingDTMF(DTMFTone tone,
DTMFMethod dtmfMethod)
startSendingDTMF in interface AudioMediaStreamtone - the DTMFTone to start sending.dtmfMethod - The kind of DTMF used (RTP, SIP-INOF or INBAND).AudioMediaStream.startSendingDTMF(DTMFTone, DTMFMethod)public void stopSendingDTMF(DTMFMethod dtmfMethod)
stopSendingDTMF in interface AudioMediaStreamdtmfMethod - The kind of DTMF used (RTP, SIP-INOF or INBAND).AudioMediaStream.stopSendingDTMF(DTMFMethod)
public void addRTPExtension(byte extensionID,
RTPExtension rtpExtension)
MediaStreamImpl.addRTPExtension(byte, RTPExtension)
this method enables sending of CSRC audio levels. The reason we are
doing this here rather than in the super class is that CSRC levels only
make sense for audio streams so we don't want them enabled in any other
kind.
addRTPExtension in interface MediaStreamaddRTPExtension in class MediaStreamImplextensionID - the ID assigned to rtpExtension for the
lifetime of this stream.rtpExtension - the RTPExtension that is being added to this stream.public void setLocalUserAudioLevelListener(SimpleAudioLevelListener listener)
setLocalUserAudioLevelListener in interface AudioMediaStreamlistener - the SimpleAudioLevelListener that we'd like to
register or null if we want to stop local audio level
measurements.public AudioMediaDeviceSession getDeviceSession()
getDeviceSession in class MediaStreamImplpublic int getLastMeasuredAudioLevel(long ssrc)
ssrc - the SSRC ID whose last measured audio level we'd like to
retrieve.
public void fireConferenceAudioLevelEvent(long[] audioLevels)
audioLevels - a array mapping CSRC IDs to audio levels in
consecutive elements.
public void fireDTMFEvent(DTMFRtpTone tone,
boolean end)
tone - the new toneend - is end or start of tone.public void close()
close in interface MediaStreamclose in class MediaStreamImplMediaStream.close()protected int getPriority()
getPriority in class MediaStreamImpl
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||