net.java.sip.communicator.impl.media.transform
Class TransformOutputStream
java.lang.Object
net.java.sip.communicator.impl.media.RTPConnectorOutputStream
net.java.sip.communicator.impl.media.transform.TransformOutputStream
- All Implemented Interfaces:
- javax.media.rtp.OutputDataStream
public class TransformOutputStream
- extends RTPConnectorOutputStream
TransformOutputStream implements OutputDataStream. It is use by RTPManager
to send RTP/RTCP packet data out.
In this implementation, UDP 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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TransformOutputStream
public TransformOutputStream(DatagramSocket socket,
PacketTransformer transformer)
- Construct a TransformOutputStream based on the given UDP socket and
PacketTransformer
- Parameters:
socket - UDP socket used to send packet data outtransformer - PacketTransformer used to transform RTP/RTCP packets
createRawPacket
protected RawPacket createRawPacket(byte[] buffer,
int offset,
int length)
- Description copied from class:
RTPConnectorOutputStream
- 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. Allows extenders to intercept
the packet data and possibly filter and/or modify it.
- 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
SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.