Package org.jitsi.impl.neomedia.rtp
Class StreamRTPManager
- java.lang.Object
-
- org.jitsi.impl.neomedia.rtp.StreamRTPManager
-
public class StreamRTPManager extends Object
Implements the RTPManager interface as used by a MediaStream.- Author:
- Lyubomir Marinov
-
-
Constructor Summary
Constructors Constructor Description StreamRTPManager(MediaStream stream, RTPTranslator translator)Initializes a new StreamRTPManager instance which is, optionally, attached to a specific RTPTranslator which is to forward the RTP and RTCP flows of the associated MediaStream to other MediaStreams.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFormat(javax.media.Format format, int payloadType)voidaddReceiveStreamListener(javax.media.rtp.ReceiveStreamListener listener)voidaddRemoteListener(javax.media.rtp.RemoteListener listener)voidaddSendStreamListener(javax.media.rtp.SendStreamListener listener)voidaddSessionListener(javax.media.rtp.SessionListener listener)javax.media.rtp.SendStreamcreateSendStream(javax.media.protocol.DataSource dataSource, int streamIndex)voiddispose()<T> TgetControl(Class<T> controlType)Gets a control of a specific type over this instance.ObjectgetControl(String controlType)Gets a control of a specific type over this instance.javax.media.rtp.GlobalReceptionStatsgetGlobalReceptionStats()javax.media.rtp.GlobalTransmissionStatsgetGlobalTransmissionStats()longgetLocalSSRC()MediaStreamgetMediaStream()Returns the MediaStream that uses this StreamRTPManagerVectorgetReceiveStreams()VectorgetSendStreams()voidinitialize(javax.media.rtp.RTPConnector connector)voidremoveReceiveStreamListener(javax.media.rtp.ReceiveStreamListener listener)voidremoveRemoteListener(javax.media.rtp.RemoteListener listener)voidremoveSendStreamListener(javax.media.rtp.SendStreamListener listener)voidremoveSessionListener(javax.media.rtp.SessionListener listener)voidsetSSRCFactory(SSRCFactory ssrcFactory)Sets the SSRCFactory to be utilized by this instance to generate new synchronization source (SSRC) identifiers.
-
-
-
Constructor Detail
-
StreamRTPManager
public StreamRTPManager(MediaStream stream, RTPTranslator translator)
Initializes a new StreamRTPManager instance which is, optionally, attached to a specific RTPTranslator which is to forward the RTP and RTCP flows of the associated MediaStream to other MediaStreams.- Parameters:
stream- the MediaStream that created this StreamRTPManager.translator- the RTPTranslator to attach the new instance to or null if the new instance is to not be attached to any RTPTranslator
-
-
Method Detail
-
addFormat
public void addFormat(javax.media.Format format, int payloadType)
-
addReceiveStreamListener
public void addReceiveStreamListener(javax.media.rtp.ReceiveStreamListener listener)
-
addRemoteListener
public void addRemoteListener(javax.media.rtp.RemoteListener listener)
-
addSendStreamListener
public void addSendStreamListener(javax.media.rtp.SendStreamListener listener)
-
addSessionListener
public void addSessionListener(javax.media.rtp.SessionListener listener)
-
createSendStream
public javax.media.rtp.SendStream createSendStream(javax.media.protocol.DataSource dataSource, int streamIndex) throws IOException, javax.media.format.UnsupportedFormatException- Throws:
IOExceptionjavax.media.format.UnsupportedFormatException
-
dispose
public void dispose()
-
getControl
public <T> T getControl(Class<T> controlType)
Gets a control of a specific type over this instance. InvokesgetControl(String).- Parameters:
controlType- a Class which specifies the type of the control over this instance to get- Returns:
- a control of the specified controlType over this instance if this instance supports such a control; otherwise, null
-
getControl
public Object getControl(String controlType)
Gets a control of a specific type over this instance.- Parameters:
controlType- a String which specifies the type (i.e. the name of the class) of the control over this instance to get- Returns:
- a control of the specified controlType over this instance if this instance supports such a control; otherwise, null
-
getGlobalReceptionStats
public javax.media.rtp.GlobalReceptionStats getGlobalReceptionStats()
-
getGlobalTransmissionStats
public javax.media.rtp.GlobalTransmissionStats getGlobalTransmissionStats()
-
getLocalSSRC
public long getLocalSSRC()
-
getMediaStream
public MediaStream getMediaStream()
Returns the MediaStream that uses this StreamRTPManager- Returns:
- the MediaStream that uses this StreamRTPManager
-
getReceiveStreams
public Vector getReceiveStreams()
-
getSendStreams
public Vector getSendStreams()
-
initialize
public void initialize(javax.media.rtp.RTPConnector connector)
-
removeReceiveStreamListener
public void removeReceiveStreamListener(javax.media.rtp.ReceiveStreamListener listener)
-
removeRemoteListener
public void removeRemoteListener(javax.media.rtp.RemoteListener listener)
-
removeSendStreamListener
public void removeSendStreamListener(javax.media.rtp.SendStreamListener listener)
-
removeSessionListener
public void removeSessionListener(javax.media.rtp.SessionListener listener)
-
setSSRCFactory
public void setSSRCFactory(SSRCFactory ssrcFactory)
Sets the SSRCFactory to be utilized by this instance to generate new synchronization source (SSRC) identifiers.- Parameters:
ssrcFactory- the SSRCFactory to be utilized by this instance to generate new synchronization source (SSRC) identifiers or null if this instance is to employ internal logic to generate new synchronization source (SSRC) identifiers
-
-