net.java.sip.communicator.impl.neomedia.transform
Class TransformTCPOutputStream
java.lang.Object
net.java.sip.communicator.impl.neomedia.RTPConnectorOutputStream
net.java.sip.communicator.impl.neomedia.RTPConnectorTCPOutputStream
net.java.sip.communicator.impl.neomedia.transform.TransformTCPOutputStream
- All Implemented Interfaces:
- javax.media.rtp.OutputDataStream
public class TransformTCPOutputStream
- extends RTPConnectorTCPOutputStream
Extends RTPConnectorOutputStream with transform logic for TCP.
In this implementation, TCP socket is used to send the data out. When a
normal RTP/RTCP packet is passed down from RTPManager, we first transform
the packet using user define PacketTransformer and then send it out through
network to all the stream targets.
- Author:
- Bing SU (nova.su@gmail.com), Lubomir Marinov
|
Constructor Summary |
TransformTCPOutputStream(Socket socket)
Initializes a new TransformOutputStream which is to send packet
data out through a specific TCP socket. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TransformTCPOutputStream
public TransformTCPOutputStream(Socket socket)
- Initializes a new TransformOutputStream which is to send packet
data out through a specific TCP socket.
- Parameters:
socket - the TCP socket used to send packet data out
createRawPacket
protected RawPacket createRawPacket(byte[] buffer,
int offset,
int length)
- Creates a new RawPacket from a specific byte[] buffer
in order to have this instance send its packet data through its
RTPConnectorOutputStream.write(byte[], int, int) method. Transforms the packet to be
sent.
- Overrides:
createRawPacket in class RTPConnectorOutputStream
- Parameters:
buffer - the packet data to be sent to the targets of this instanceoffset - the offset of the packet data in bufferlength - the length of the packet data in buffer
- Returns:
- a new RawPacket containing the packet data of the
specified byte[] buffer or possibly its modification;
null to ignore the packet data of the specified byte[]
buffer and not send it to the targets of this instance through its
RTPConnectorOutputStream.write(byte[], int, int) method - See Also:
RTPConnectorOutputStream.createRawPacket(byte[], int, int)
getTransformer
public PacketTransformer getTransformer()
- Gets the PacketTransformer which is used to transform packets.
- Returns:
- the PacketTransformer which is used to transform packets
setTransformer
public void setTransformer(PacketTransformer transformer)
- Sets the PacketTransformer which is to be used to transform
packets.
- Parameters:
transformer - the PacketTransformer which is to be used to
transform packets
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.