public class RTCPConnectorInputStream extends RTPConnectorUDPInputStream
PACKET_RECEIVE_BUFFER_LENGTH, socket
Constructor and Description |
---|
RTCPConnectorInputStream(java.net.DatagramSocket socket)
Initializes a new RTCPConnectorInputStream which is to receive
packet data from a specific UDP socket.
|
Modifier and Type | Method and Description |
---|---|
void |
addRTCPFeedbackMessageListener(RTCPFeedbackMessageListener listener)
Add an RTCPFeedbackMessageListener.
|
static void |
fireRTCPFeedbackMessageReceived(java.lang.Object source,
byte[] buffer,
int offset,
int length,
java.util.List<RTCPFeedbackMessageListener> listeners)
Notifies a specific list of RTCPFeedbackMessageListeners about a
specific RTCP feedback message if such a message can be parsed out of a
specific byte buffer.
|
protected int |
read(javax.media.Buffer buffer,
byte[] data,
int offset,
int length)
Copies the content of the most recently received packet into
data.
|
void |
removeRTCPFeedbackMessageListener(RTCPFeedbackMessageListener listener)
Remove an RTCPFeedbackMessageListener.
|
doLogPacket, receive, setReceiveBufferSize
createRawPacket, getTransformer, setTransformer
addDatagramPacketFilter, close, endOfStream, getContentDescriptor, getContentLength, getControl, getControls, getDatagramPacketFilters, getMinimumTransferSize, getNumberOfReceivedBytes, getPacketLoggingService, read, setEnabled, setPriority, setThreadPriority, setTransferHandler
public RTCPConnectorInputStream(java.net.DatagramSocket socket)
socket
- the UDP socket the new instance is to receive data frompublic void addRTCPFeedbackMessageListener(RTCPFeedbackMessageListener listener)
listener
- object that will listen to incoming RTCP feedback
messages.public static void fireRTCPFeedbackMessageReceived(java.lang.Object source, byte[] buffer, int offset, int length, java.util.List<RTCPFeedbackMessageListener> listeners)
source
- the object to be reported as the source of the
RTCPFeedbackMessageEvent to be firedbuffer
- the byte buffer which may specific an RTCP
feedback messageoffset
- the offset in buffer at which the reading of bytes
is to beginlength
- the number of bytes in buffer to be read for the
purposes of parsing an RTCP feedback message and firing an
RTPCFeedbackEventlisteners
- the list of RTCPFeedbackMessageListeners to be
notified about the specified RTCP feedback message if such a message can
be parsed out of the specified bufferpublic void removeRTCPFeedbackMessageListener(RTCPFeedbackMessageListener listener)
listener
- object to remove from listening RTCP feedback messages.protected int read(javax.media.Buffer buffer, byte[] data, int offset, int length) throws java.io.IOException
read
in class RTPConnectorInputStream<java.net.DatagramSocket>
buffer
- an optional Buffer instance associated with the
specified data, offset and length and
provided to the method in case the implementation would like to provide
additional Buffer properties such as flagsdata
- 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
data.length
- the number of bytes available for writing in
data.java.io.IOException
- if length is less than the size of the
packet.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.