public abstract class AbstractRTPConnector
extends java.lang.Object
implements javax.media.rtp.RTPConnector
Modifier and Type | Field and Description |
---|---|
protected StreamConnector |
connector
The pair of datagram sockets for RTP and RTCP traffic that this instance
uses in the form of a StreamConnector.
|
Constructor and Description |
---|
AbstractRTPConnector(StreamConnector connector)
Initializes a new AbstractRTPConnector which is to use a given
pair of datagram sockets for RTP and RTCP traffic specified in the form
of a StreamConnector.
|
Modifier and Type | Method and Description |
---|---|
void |
addTarget(javax.media.rtp.SessionAddress target)
Add a stream target.
|
void |
close()
Closes all sockets, stream, and the StreamConnector that this
RTPConnector is using.
|
protected abstract RTPConnectorInputStream<?> |
createControlInputStream()
Creates the RTCP packet input stream to be used by RTPManager.
|
protected abstract RTPConnectorOutputStream |
createControlOutputStream()
Creates the RTCP packet output stream to be used by RTPManager.
|
protected abstract RTPConnectorInputStream<?> |
createDataInputStream()
Creates the RTP packet input stream to be used by RTPManager.
|
protected abstract RTPConnectorOutputStream |
createDataOutputStream()
Creates the RTP packet output stream to be used by RTPManager.
|
StreamConnector |
getConnector()
Gets the StreamConnector which represents the pair of datagram
sockets for RTP and RTCP traffic used by this instance.
|
RTPConnectorInputStream<?> |
getControlInputStream()
Returns the input stream that is handling incoming RTCP packets.
|
protected RTPConnectorInputStream<?> |
getControlInputStream(boolean create)
Gets the PushSourceStream which gives access to the RTCP data
received from the remote targets and optionally creates it if it does not
exist yet.
|
RTPConnectorOutputStream |
getControlOutputStream()
Returns the input stream that is handling outgoing RTCP packets.
|
protected RTPConnectorOutputStream |
getControlOutputStream(boolean create)
Gets the OutputDataStream which is used to write RTCP data to be
sent to from the remote targets and optionally creates it if it does not
exist yet.
|
RTPConnectorInputStream<?> |
getDataInputStream()
Returns the input stream that is handling incoming RTP packets.
|
protected RTPConnectorInputStream<?> |
getDataInputStream(boolean create)
Gets the PushSourceStream which gives access to the RTP data
received from the remote targets and optionally creates it if it does not
exist yet.
|
RTPConnectorOutputStream |
getDataOutputStream()
Returns the input stream that is handling outgoing RTP packets.
|
RTPConnectorOutputStream |
getDataOutputStream(boolean create)
Gets the OutputDataStream which is used to write RTP data to be
sent to from the remote targets and optionally creates it if it does not
exist yet.
|
int |
getReceiveBufferSize()
Provides a dummy implementation to
RTPConnector.getReceiveBufferSize() that always returns -1. |
double |
getRTCPBandwidthFraction()
Provides a dummy implementation to
RTPConnector.getRTCPBandwidthFraction() that always returns -1. |
double |
getRTCPSenderBandwidthFraction()
Provides a dummy implementation to
RTPConnector.getRTCPSenderBandwidthFraction() that always returns
-1. |
int |
getSendBufferSize()
Provides a dummy implementation to
RTPConnector.getSendBufferSize() that always returns -1. |
void |
removeTarget(javax.media.rtp.SessionAddress target)
Removes a target from our session.
|
void |
removeTargets()
Remove all stream targets.
|
void |
setDirection(MediaDirection direction)
Configures this AbstractRTPConnector to allow RTP in the
specified direction.
|
void |
setReceiveBufferSize(int size)
Provides a dummy implementation to
RTPConnector.setReceiveBufferSize(int) . |
void |
setSendBufferSize(int size)
Provides a dummy implementation to
RTPConnector.setSendBufferSize(int) . |
protected final StreamConnector connector
public AbstractRTPConnector(StreamConnector connector)
connector
- the pair of datagram sockets for RTP and RTCP traffic
the new instance is to usepublic void addTarget(javax.media.rtp.SessionAddress target) throws java.io.IOException
target
- Destination target addressjava.io.IOException
- if there was a socket-related error while adding the
specified targetpublic void close()
close
in interface javax.media.rtp.RTPConnector
protected abstract RTPConnectorInputStream<?> createControlInputStream() throws java.io.IOException
java.io.IOException
- if an error occurs during the creation of the RTCP
packet input streamprotected abstract RTPConnectorOutputStream createControlOutputStream() throws java.io.IOException
java.io.IOException
- if an error occurs during the creation of the RTCP
packet output streamprotected abstract RTPConnectorInputStream<?> createDataInputStream() throws java.io.IOException
java.io.IOException
- if an error occurs during the creation of the RTP
packet input streamprotected abstract RTPConnectorOutputStream createDataOutputStream() throws java.io.IOException
java.io.IOException
- if an error occurs during the creation of the RTP
packet output streampublic final StreamConnector getConnector()
public RTPConnectorInputStream<?> getControlInputStream() throws java.io.IOException
getControlInputStream
in interface javax.media.rtp.RTPConnector
java.io.IOException
- if an error occurs during the creation of the RTCP
packet input streamprotected RTPConnectorInputStream<?> getControlInputStream(boolean create) throws java.io.IOException
create
- true to create the PushSourceStream which
gives access to the RTCP data received from the remote targets if it does
not exist yet; otherwise, falsejava.io.IOException
- if creating the PushSourceStream failspublic RTPConnectorOutputStream getControlOutputStream() throws java.io.IOException
getControlOutputStream
in interface javax.media.rtp.RTPConnector
java.io.IOException
- if an error occurs during the creation of the RTCP
packet output streamprotected RTPConnectorOutputStream getControlOutputStream(boolean create) throws java.io.IOException
create
- true to create the OutputDataStream which
is to be used to write RTCP data to be sent to the remote targets if it
does not exist yet; otherwise, falsejava.io.IOException
- if creating the OutputDataStream failspublic RTPConnectorInputStream<?> getDataInputStream() throws java.io.IOException
getDataInputStream
in interface javax.media.rtp.RTPConnector
java.io.IOException
- if an error occurs during the creation of the RTP
packet input streamprotected RTPConnectorInputStream<?> getDataInputStream(boolean create) throws java.io.IOException
create
- true to create the PushSourceStream which
gives access to the RTP data received from the remote targets if it does
not exist yet; otherwise, falsejava.io.IOException
- if creating the PushSourceStream failspublic RTPConnectorOutputStream getDataOutputStream() throws java.io.IOException
getDataOutputStream
in interface javax.media.rtp.RTPConnector
java.io.IOException
- if an error occurs during the creation of the RTPpublic RTPConnectorOutputStream getDataOutputStream(boolean create) throws java.io.IOException
create
- true to create the OutputDataStream which
is to be used to write RTP data to be sent to the remote targets if it
does not exist yet; otherwise, falsejava.io.IOException
- if creating the OutputDataStream failspublic int getReceiveBufferSize()
RTPConnector.getReceiveBufferSize()
that always returns -1.getReceiveBufferSize
in interface javax.media.rtp.RTPConnector
public double getRTCPBandwidthFraction()
RTPConnector.getRTCPBandwidthFraction()
that always returns -1.getRTCPBandwidthFraction
in interface javax.media.rtp.RTPConnector
public double getRTCPSenderBandwidthFraction()
RTPConnector.getRTCPSenderBandwidthFraction()
that always returns
-1.getRTCPSenderBandwidthFraction
in interface javax.media.rtp.RTPConnector
public int getSendBufferSize()
RTPConnector.getSendBufferSize()
that always returns -1.getSendBufferSize
in interface javax.media.rtp.RTPConnector
public void removeTarget(javax.media.rtp.SessionAddress target)
target
- Destination target to be removedpublic void removeTargets()
public void setReceiveBufferSize(int size) throws java.io.IOException
RTPConnector.setReceiveBufferSize(int)
.setReceiveBufferSize
in interface javax.media.rtp.RTPConnector
size
- ignored.java.io.IOException
public void setSendBufferSize(int size) throws java.io.IOException
RTPConnector.setSendBufferSize(int)
.setSendBufferSize
in interface javax.media.rtp.RTPConnector
size
- ignored.java.io.IOException
public void setDirection(MediaDirection direction)
direction
- Specifies how to configure the data streams of this
AbstractRTPConnector. The input stream will be enabled or
disabled depending on whether direction allows receiving. The
output stream will be enabled or disabled depending on whether
direction allows sending.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.