Class RTPTransformTCPConnector
- java.lang.Object
-
- org.jitsi.impl.neomedia.AbstractRTPConnector
-
- org.jitsi.impl.neomedia.RTPConnectorTCPImpl
-
- org.jitsi.impl.neomedia.transform.RTPTransformTCPConnector
-
- All Implemented Interfaces:
javax.media.rtp.RTPConnector
public class RTPTransformTCPConnector extends RTPConnectorTCPImpl
TransformConnector implements the RTPConnector interface. RTPConnector is originally designed for programmers to abstract the underlying transport mechanism for RTP control and data from the RTPManager. However, it provides the possibility to modify / transform the RTP and RTCP packets before they are sent to network, or after the have been received from the network. The RTPConnector interface is very powerful. But just to perform packets transformation, we do not need all the flexibility. So, we designed this TransformConnector, which uses UDP to transfer RTP/RTCP packets just like normal RTP stack, and then provides the TransformInputStream interface for people to define their own transformation. With TransformConnector, people can implement RTP/RTCP packets transformation and/or manipulation by implementing the TransformEngine interface.- Author:
- Bing SU (nova.su@gmail.com), Lubomir Marinov
- See Also:
TransformEngine,RTPConnector,RTPManager
-
-
Field Summary
-
Fields inherited from class org.jitsi.impl.neomedia.AbstractRTPConnector
connector
-
-
Constructor Summary
Constructors Constructor Description RTPTransformTCPConnector(StreamConnector connector)Initializes a new TransformConnector which is to use a given pair of datagram sockets for RTP and RTCP traffic specified in the form of a StreamConnector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RTPConnectorTCPInputStreamcreateControlInputStream()Overrides RTPConnectorImpl#createControlInputStream() to use TransformInputStream.protected TransformTCPOutputStreamcreateControlOutputStream()Overrides RTPConnectorImpl#createControlOutputStream() to use TransformOutputStream.protected RTPConnectorTCPInputStreamcreateDataInputStream()Overrides RTPConnectorImpl#createDataInputStream() to use TransformInputStream.protected TransformTCPOutputStreamcreateDataOutputStream()Overrides RTPConnectorImpl#createDataOutputStream() to use TransformOutputStream.TransformEnginegetEngine()Gets the customized TransformEngine which contains the concrete transform logic.voidsetEngine(TransformEngine engine)Sets the customized TransformEngine which contains the concrete transform logic.-
Methods inherited from class org.jitsi.impl.neomedia.RTPConnectorTCPImpl
getControlSocket, getDataSocket
-
Methods inherited from class org.jitsi.impl.neomedia.AbstractRTPConnector
addTarget, close, getConnector, getControlInputStream, getControlInputStream, getControlOutputStream, getControlOutputStream, getDataInputStream, getDataInputStream, getDataOutputStream, getDataOutputStream, getReceiveBufferSize, getRTCPBandwidthFraction, getRTCPSenderBandwidthFraction, getSendBufferSize, removeTarget, removeTargets, setDirection, setReceiveBufferSize, setSendBufferSize
-
-
-
-
Constructor Detail
-
RTPTransformTCPConnector
public RTPTransformTCPConnector(StreamConnector connector)
Initializes a new TransformConnector which is to use a given pair of datagram sockets for RTP and RTCP traffic specified in the form of a StreamConnector.- Parameters:
connector- the pair of datagram sockets for RTP and RTCP traffic the new instance is to use
-
-
Method Detail
-
createControlInputStream
protected RTPConnectorTCPInputStream createControlInputStream() throws IOException
Overrides RTPConnectorImpl#createControlInputStream() to use TransformInputStream.- Overrides:
createControlInputStreamin classRTPConnectorTCPImpl- Returns:
- a new RTCP packet input stream to be used by RTPManager
- Throws:
IOException- if an error occurs during the creation of the RTCP packet input stream
-
createControlOutputStream
protected TransformTCPOutputStream createControlOutputStream() throws IOException
Overrides RTPConnectorImpl#createControlOutputStream() to use TransformOutputStream.- Overrides:
createControlOutputStreamin classRTPConnectorTCPImpl- Returns:
- a new RTCP packet output stream to be used by RTPManager
- Throws:
IOException- if an error occurs during the creation of the RTCP packet output stream
-
createDataInputStream
protected RTPConnectorTCPInputStream createDataInputStream() throws IOException
Overrides RTPConnectorImpl#createDataInputStream() to use TransformInputStream.- Overrides:
createDataInputStreamin classRTPConnectorTCPImpl- Returns:
- a new RTP packet input stream to be used by RTPManager
- Throws:
IOException- if an error occurs during the creation of the RTP packet input stream
-
createDataOutputStream
protected TransformTCPOutputStream createDataOutputStream() throws IOException
Overrides RTPConnectorImpl#createDataOutputStream() to use TransformOutputStream.- Overrides:
createDataOutputStreamin classRTPConnectorTCPImpl- Returns:
- a new RTP packet output stream to be used by RTPManager
- Throws:
IOException- if an error occurs during the creation of the RTP packet output stream
-
getEngine
public TransformEngine getEngine()
Gets the customized TransformEngine which contains the concrete transform logic.- Returns:
- the TransformEngine which contains the concrete transform logic
-
setEngine
public void setEngine(TransformEngine engine)
Sets the customized TransformEngine which contains the concrete transform logic.- Parameters:
engine- the TransformEngine which contains the concrete transform logic
-
-