org.mobicents.media.server.spi.rtp
Interface RtpSocket


public interface RtpSocket

Author:
kulikov

Method Summary
 void bind()
          Binds Datagram to the address sprecified.
 AVProfile getAVProfile()
          Gets currently used audio/video profile
 long getBytesReceived()
          Statistical method.
 long getBytesSent()
          Statistical method.
 java.util.Collection<Codec> getCodecs()
          Gets the list of used codecs.
 int getJitter()
          Gets the jitter for time of packet arrival
 java.lang.String getLocalAddress()
          Gets address to which this socked is bound.
 int getLocalPort()
          Returns port number to which this socked is bound.
 int getPacketsReceived()
          Gets the number of received packets
 int getPacketsSent()
          Gets the number of sent packets
 MediaSource getReceiveStream()
          (Non Java-doc).
 MediaSink getSendStream()
          (Non Java-doc).
 void release()
          Closes this socket and resets its streams; This method is called by RtpSocket user.
 void setDtmfPayload(int dtmf)
          Assigns RFC2833 DTMF playload number.
 void setFormat(int payloadId, Format format)
          Specifies format and payload id which will be used by this socket for transmission This methods should be used by other components which are responsible for SDP negotiation.
 void setJitter(int jitter)
          Assign new value of packet time arrival jitter.
 void setPeer(java.net.InetAddress address, int port)
          Assigns remote end.
 

Method Detail

getLocalAddress

java.lang.String getLocalAddress()
Gets address to which this socked is bound.

Returns:
either local address to which this socket is bound or public address in case of NAT translation.

getLocalPort

int getLocalPort()
Returns port number to which this socked is bound.

Returns:
port number or -1 if socket not bound.

getAVProfile

AVProfile getAVProfile()
Gets currently used audio/video profile

Returns:

bind

void bind()
          throws java.io.IOException,
                 ResourceUnavailableException
Binds Datagram to the address sprecified.

Throws:
java.io.IOException
ResourceUnavailableException

setPeer

void setPeer(java.net.InetAddress address,
             int port)
             throws java.io.IOException
Assigns remote end.

Parameters:
address - the address of the remote party.
port - the port number of the remote party.
Throws:
java.io.IOException

getSendStream

MediaSink getSendStream()
(Non Java-doc).

See Also:
org.mobicents.media.server.impl.rtp.RtpSocket#startSendStream(PushBufferDataSource);

getReceiveStream

MediaSource getReceiveStream()
(Non Java-doc).

See Also:
org.mobicents.media.server.impl.rtp.RtpSocket#startSendStream(PushBufferDataSource);

setFormat

void setFormat(int payloadId,
               Format format)
Specifies format and payload id which will be used by this socket for transmission This methods should be used by other components which are responsible for SDP negotiation. The socket itself can not negotiate SDP.

Parameters:
payloadId - rtp payload number
format - the format object.

setDtmfPayload

void setDtmfPayload(int dtmf)
Assigns RFC2833 DTMF playload number.

Parameters:
dtmf - the DTMF payload number.

getCodecs

java.util.Collection<Codec> getCodecs()
Gets the list of used codecs.

Returns:
list of codecs.

getJitter

int getJitter()
Gets the jitter for time of packet arrival

Returns:
the value of jitter in milliseconds.

setJitter

void setJitter(int jitter)
Assign new value of packet time arrival jitter.

Parameters:
jitter - the value of jitter in milliseconds.

getPacketsReceived

int getPacketsReceived()
Gets the number of received packets

Returns:
the number of packets received

getPacketsSent

int getPacketsSent()
Gets the number of sent packets

Returns:
the number of sent packets.

getBytesReceived

long getBytesReceived()
Statistical method.

Returns:
the number of bytes received.

getBytesSent

long getBytesSent()
Statistical method.

Returns:
the number of bytes sent.

release

void release()
Closes this socket and resets its streams; This method is called by RtpSocket user.



Copyright © 2010. All Rights Reserved.