net.java.sip.communicator.impl.neomedia.transform
Class ControlTransformInputStream
java.lang.Object
net.java.sip.communicator.impl.neomedia.RTPConnectorInputStream
net.java.sip.communicator.impl.neomedia.RTPConnectorUDPInputStream
net.java.sip.communicator.impl.neomedia.transform.TransformUDPInputStream
net.java.sip.communicator.impl.neomedia.transform.ControlTransformInputStream
- All Implemented Interfaces:
- Runnable, javax.media.Controls, javax.media.protocol.PushSourceStream, javax.media.protocol.SourceStream
public class ControlTransformInputStream
- extends TransformUDPInputStream
Implement control channel (RTCP) for TransformInputStream
which notify listeners when RTCP feedback messages are received.
- Author:
- Bing SU (nova.su@gmail.com), Lyubomir Marinov, Sebastien Vincent
| Fields inherited from interface javax.media.protocol.SourceStream |
LENGTH_UNKNOWN |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ControlTransformInputStream
public ControlTransformInputStream(DatagramSocket socket)
- Initializes a new ControlTransformInputStream which is to
receive packet data from a specific UDP socket.
- Parameters:
socket - the UDP socket the new instance is to receive data from
addRTCPFeedbackListener
public void addRTCPFeedbackListener(RTCPFeedbackListener listener)
- Adds an RTCPFeedbackListener.
- Parameters:
listener - the RTCPFeedbackListener to add
removeRTCPFeedbackListener
public void removeRTCPFeedbackListener(RTCPFeedbackListener listener)
- Removes an RTCPFeedbackListener.
- Parameters:
listener - the RTCPFeedbackListener to remove
read
public int read(byte[] inBuffer,
int offset,
int length)
throws IOException
- Copies the content of the most recently received packet into
inBuffer.
- Specified by:
read in interface javax.media.protocol.PushSourceStream- Overrides:
read in class RTPConnectorInputStream
- Parameters:
inBuffer - the byte[] that we'd like to copy the content
of the packet to.offset - the position where we are supposed to start writing in
inBuffer.length - the number of bytes available for writing in
inBuffer.
- Returns:
- the number of bytes read
- Throws:
IOException - if length is less than the size of the
packet.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.