public abstract class AbstractMediaStream extends Object implements MediaStream
| Modifier and Type | Field and Description |
|---|---|
protected RTPTranslator |
rtpTranslator
The RTPTranslator, if any, which forwards RTP and RTCP traffic
between this and other MediaStreams.
|
PNAME_LOCAL_SSRC, PNAME_REMOTE_SSRC| Constructor and Description |
|---|
AbstractMediaStream() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangelistener to this stream which is to be
notified upon property changes such as a SSRC ID which becomes known.
|
protected void |
assertDirection(MediaDirection direction,
MediaDirection deviceDirection,
String illegalArgumentExceptionMessage)
Asserts that the state of this instance will remain consistent if a
specific MediaDirection (i.e.
|
protected void |
firePropertyChange(String property,
Object oldValue,
Object newValue)
Fires a new PropertyChangeEvent to the
PropertyChangeListeners registered with this instance in order
to notify about a change in the value of a specific property which had
its old value modified to a specific new value.
|
byte |
getDynamicRTPPayloadType(String codec)
Returns the payload type number that has been negotiated for the
specified encoding or -1 if no payload type has been
negotiated for it.
|
MediaFormat |
getFormat(byte pt)
Returns the MediaFormat that is associated to the payload type
passed in as a parameter.
|
MediaStreamTrackReceiver |
getMediaStreamTrackReceiver()
Gets the
MediaStreamTrackReceiver of this MediaStream. |
String |
getName()
Returns the name of this stream or null if no name has been
set.
|
REDBlock |
getPrimaryREDBlock(org.jitsi.utils.ByteArrayBuffer baf)
Gets the primary
REDBlock that contains the payload of the RTP
packet passed in as a parameter. |
REDBlock |
getPrimaryREDBlock(RawPacket pkt)
Gets the primary
REDBlock that contains the payload of the RTP
packet passed in as a parameter. |
Object |
getProperty(String propertyName)
Gets the value of a specific opaque property of this
MediaStream.
|
RTPTranslator |
getRTPTranslator()
Gets the
RTPTranslator which forwards RTP and RTCP traffic
between this and other MediaStreams. |
TransformEngineChain |
getTransformEngineChain()
Gets the
TransformEngineChain of this MediaStream. |
protected void |
handleAttributes(MediaFormat format,
Map<String,String> attrs)
Handles attributes contained in MediaFormat.
|
void |
injectPacket(RawPacket pkt,
boolean data)
Sends a given RTP or RTCP packet to the remote peer/side.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes the specified PropertyChangeListener from this stream so
that it won't receive further property change events.
|
void |
setName(String name)
Sets the name of this stream.
|
void |
setProperty(String propertyName,
Object value)
Sets the value of a specific opaque property of this
MediaStream.
|
void |
setRTPTranslator(RTPTranslator rtpTranslator)
Sets the RTPTranslator which is to forward RTP and RTCP traffic
between this and other MediaStreams.
|
void |
setTransportCCEngine(TransportCCEngine engine)
Sets the
TransportCCEngine of this media stream. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddDynamicRTPPayloadType, addDynamicRTPPayloadTypeOverride, addRTPExtension, clearDynamicRTPPayloadTypes, clearRTPExtensions, close, getActiveRTPExtensions, getDevice, getDirection, getDynamicRTPPayloadTypes, getFormat, getLocalSourceID, getMediaStreamStats, getRemoteControlAddress, getRemoteDataAddress, getRemoteSourceID, getRemoteSourceIDs, getRetransmissionRequester, getSrtpControl, getStreamRTPManager, getTarget, getTransportProtocol, injectPacket, isKeyFrame, isKeyFrame, isMute, isStarted, removeReceiveStreamForSsrc, setConnector, setDevice, setDirection, setExternalTransformer, setFormat, setMute, setSSRCFactory, setTarget, start, stopprotected RTPTranslator rtpTranslator
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener in interface MediaStreamlistener - the PropertyChangeListener to register for
PropertyChangeEventsMediaStream.addPropertyChangeListener(PropertyChangeListener)protected void assertDirection(MediaDirection direction, MediaDirection deviceDirection, String illegalArgumentExceptionMessage) throws IllegalArgumentException
direction - the MediaDirection to validate against the
specified deviceDirectiondeviceDirection - the MediaDirection of a
MediaDevice to validate against the specified directionillegalArgumentExceptionMessage - the message of the
IllegalArgumentException to be thrown if the state of this
instance would've been compromised if direction and the
MediaDevice associated with deviceDirection were both
set on this instanceIllegalArgumentException - if the state of this instance would've
been compromised were both direction and the
MediaDevice associated with deviceDirection set on this
instanceprotected void firePropertyChange(String property, Object oldValue, Object newValue)
property - the name of the property of this instance which had its
value changedoldValue - the value of the property with the specified name before
the changenewValue - the value of the property with the specified name after
the changepublic String getName()
getName in interface MediaStreampublic Object getProperty(String propertyName)
getProperty in interface MediaStreampropertyName - the name of the opaque property of this
MediaStream the value of which is to be returnedprotected void handleAttributes(MediaFormat format, Map<String,String> attrs)
format - the MediaFormat to handle the attributes ofattrs - the attributes Map to handlepublic void injectPacket(RawPacket pkt, boolean data) throws TransmissionFailedException
pkt - the packet to send.data - true to send an RTP packet or false to send
an RTCP packet.TransmissionFailedException - if the transmission failed.public void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener in interface MediaStreamlistener - the PropertyChangeListener to removeMediaStream.removePropertyChangeListener(PropertyChangeListener)public void setName(String name)
setName in interface MediaStreamname - the name of this stream or null if no name has been
set.public void setProperty(String propertyName, Object value)
setProperty in interface MediaStreampropertyName - the name of the opaque property of this
MediaStream the value of which is to be set to the specified
valuevalue - the value of the opaque property of this
MediaStream specified by propertyName to be setpublic void setRTPTranslator(RTPTranslator rtpTranslator)
setRTPTranslator in interface MediaStreamrtpTranslator - the RTPTranslator which is to forward RTP
and RTCP traffic between this and other MediaStreamspublic RTPTranslator getRTPTranslator()
RTPTranslator which forwards RTP and RTCP traffic
between this and other MediaStreams.getRTPTranslator in interface MediaStreamRTPTranslator which forwards RTP and RTCP traffic
between this and other MediaStreams or nullpublic TransformEngineChain getTransformEngineChain()
TransformEngineChain of this MediaStream.getTransformEngineChain in interface MediaStreampublic byte getDynamicRTPPayloadType(String codec)
getDynamicRTPPayloadType in interface MediaStreamcodec - the encoding whose payload type we are trying to obtain.public MediaStreamTrackReceiver getMediaStreamTrackReceiver()
MediaStreamTrackReceiver of this MediaStream.getMediaStreamTrackReceiver in interface MediaStreamMediaStreamTrackReceiver of this MediaStream,
or null.public MediaFormat getFormat(byte pt)
getFormat in interface MediaStreampt - the payload type of the MediaFormat to get.public void setTransportCCEngine(TransportCCEngine engine)
TransportCCEngine of this media stream. Note that for
this to take effect it needs to be called early, before the transform
chain is initialized (i.e. before a connector is set).setTransportCCEngine in interface MediaStreamengine - the engine to set.public REDBlock getPrimaryREDBlock(org.jitsi.utils.ByteArrayBuffer baf)
REDBlock that contains the payload of the RTP
packet passed in as a parameter.getPrimaryREDBlock in interface MediaStreambaf - the ByteArrayBuffer that holds the RTP payload.REDBlock that contains the payload of the RTP
packet passed in as a parameter, or null if the buffer is invalid.public REDBlock getPrimaryREDBlock(RawPacket pkt)
REDBlock that contains the payload of the RTP
packet passed in as a parameter.getPrimaryREDBlock in interface MediaStreampkt - the RawPacket that holds the RTP payload.REDBlock that contains the payload of the RTP
packet passed in as a parameter, or null if the buffer is invalid.Copyright © 2021 jitsi.org. All rights reserved.