javax.media.rtp
Interface RTPConnector


public interface RTPConnector

A programmer may abstract the underlying transport mechanism for RTP control and data from the RTPManager. This is done via the RTPConnector object. An implementation of the RTPConnector must be created and handed over to RTPManager during initialization. The RTPManager will then use it to handle the sending and receiving of the data and control packets. This replaces the deprecated RTPSocket interface.

See Also:
RTPManager

Method Summary
 void close()
          Close all the RTP, RTCP streams.
 PushSourceStream getControlInputStream()
          Returns an input stream to receive the RTCP data.
 OutputDataStream getControlOutputStream()
          Returns an output stream to send the RTCP data.
 PushSourceStream getDataInputStream()
          Returns an input stream to receive the RTP data.
 OutputDataStream getDataOutputStream()
          Returns an output stream to send the RTP data.
 int getReceiveBufferSize()
          Get the receive buffer size set on the RTP data channel.
 double getRTCPBandwidthFraction()
          Return the RTCP bandwidth fraction.
 double getRTCPSenderBandwidthFraction()
          Return the RTCP sender bandwidth fraction.
 int getSendBufferSize()
          Get the send buffer size set on the RTP data channel.
 void setReceiveBufferSize(int size)
          Set the receive buffer size of the RTP data channel.
 void setSendBufferSize(int size)
          Set the send buffer size of the RTP data channel.
 

Method Detail

getDataInputStream

public PushSourceStream getDataInputStream()
                                    throws java.io.IOException
Returns an input stream to receive the RTP data.

Returns:
an input stream for reading data from the RTP data channel.
Throws:
java.io.IOException - if an I/O error occurs when creating the input stream.

getDataOutputStream

public OutputDataStream getDataOutputStream()
                                     throws java.io.IOException
Returns an output stream to send the RTP data.

Returns:
an output stream for writing data to the RTP data channel.
Throws:
java.io.IOException - if an I/O error occurs when creating the output stream.

getControlInputStream

public PushSourceStream getControlInputStream()
                                       throws java.io.IOException
Returns an input stream to receive the RTCP data.

Returns:
an input stream for reading data from the RTCP data channel.
Throws:
java.io.IOException - if an I/O error occurs when creating the input stream.

getControlOutputStream

public OutputDataStream getControlOutputStream()
                                        throws java.io.IOException
Returns an output stream to send the RTCP data.

Returns:
an output stream for writing data to the RTCP data channel.
Throws:
java.io.IOException - if an I/O error occurs when creating the output stream.

close

public void close()
Close all the RTP, RTCP streams.


setReceiveBufferSize

public void setReceiveBufferSize(int size)
                          throws java.io.IOException
Set the receive buffer size of the RTP data channel. This is only a hint to the implementation. The actual implementation may not be able to do anything to this.

Parameters:
size - the size to which to set the receive buffer of the RTP data channel.
java.io.IOException

getReceiveBufferSize

public int getReceiveBufferSize()
Get the receive buffer size set on the RTP data channel. Return -1 if the receive buffer size is not applicable for the implementation.


setSendBufferSize

public void setSendBufferSize(int size)
                       throws java.io.IOException
Set the send buffer size of the RTP data channel. This is only a hint to the implementation. The actual implementation may not be able to do anything to this.

Parameters:
size - the size to which to set the send buffer of the RTP data channel.
java.io.IOException

getSendBufferSize

public int getSendBufferSize()
Get the send buffer size set on the RTP data channel. Return -1 if the send buffer size is not applicable for the implementation.


getRTCPBandwidthFraction

public double getRTCPBandwidthFraction()
Return the RTCP bandwidth fraction. This value is used to initialize the RTPManager. Check RTPManager for more detauls. Return -1 to use the default values.

See Also:
RTPManager.initialize(javax.media.rtp.SessionAddress)

getRTCPSenderBandwidthFraction

public double getRTCPSenderBandwidthFraction()
Return the RTCP sender bandwidth fraction. This value is used to initialize the RTPManager. Check RTPManager for more detauls. Return -1 to use the default values.

See Also:
RTPManager.initialize(javax.media.rtp.SessionAddress)