|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.media.server.impl.rtp.RtpSocket
public class RtpSocket
| Field Summary | |
|---|---|
protected java.util.Collection<org.mobicents.media.server.spi.dsp.Codec> |
codecs
|
protected org.mobicents.media.server.spi.MediaType |
media
|
protected boolean |
registered
|
protected java.net.InetSocketAddress |
remoteAddress
|
protected org.mobicents.media.server.spi.clock.Timer |
timer
|
| Constructor Summary | |
|---|---|
RtpSocket(RtpFactory factory,
java.util.Collection<org.mobicents.media.server.spi.dsp.Codec> codecs,
org.mobicents.media.server.spi.MediaType media)
Creates a new instance of RtpSocket |
|
| Method Summary | |
|---|---|
void |
bind()
|
AVProfile |
getAVProfile()
|
long |
getBytesReceived()
|
long |
getBytesSent()
|
RtpClock |
getClock()
Gets current RTP clock instance. |
java.util.Collection<org.mobicents.media.server.spi.dsp.Codec> |
getCodecs()
|
java.net.DatagramSocket |
getDatagramSocket()
|
org.mobicents.media.Format |
getFormat()
|
int |
getJitter()
Gets the jitter for time of packet arrival |
RtpSocketListener |
getListener()
Gets the currently assigned listener. |
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 |
int |
getPeriod()
|
ReceiveStream |
getReceiveStream()
Gets receiver stream. |
SendStream |
getSendStream()
(Non Java-doc). |
protected org.mobicents.media.server.spi.clock.Timer |
getTimer()
|
boolean |
isClosed()
|
boolean |
isConnected()
|
protected void |
notify(java.lang.Exception e)
|
void |
receive(RtpPacket rtpPacket)
This method is called when rtp socket receives new rtp frame. |
protected void |
register(java.nio.channels.Selector selector)
|
void |
release()
Closes this socket and resets its streams; |
void |
send(byte[] packet)
Sends rtp packet to the remote peer. |
void |
send(RtpPacket packet)
Sends media data to remote peer. |
void |
setClock(RtpClock clock)
Assign RTP clock implementation. |
void |
setDtmfPayload(int dtmf)
|
void |
setFormat(int payloadId,
org.mobicents.media.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 |
setListener(RtpSocketListener listener)
Assigns listener which will receive notifications. |
void |
setPeer(java.net.InetAddress address,
int port)
Assigns remote end. |
void |
setPeriod(int period)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.mobicents.media.server.spi.MediaType media
protected java.net.InetSocketAddress remoteAddress
protected org.mobicents.media.server.spi.clock.Timer timer
protected java.util.Collection<org.mobicents.media.server.spi.dsp.Codec> codecs
protected boolean registered
| Constructor Detail |
|---|
public RtpSocket(RtpFactory factory,
java.util.Collection<org.mobicents.media.server.spi.dsp.Codec> codecs,
org.mobicents.media.server.spi.MediaType media)
throws java.io.IOException,
org.mobicents.media.server.spi.ResourceUnavailableException
timer - used to synchronize receiver stream.rtpMap - RTP payloads list.
java.io.IOException
org.mobicents.media.server.spi.ResourceUnavailableException| Method Detail |
|---|
public void bind()
throws java.io.IOException,
org.mobicents.media.server.spi.ResourceUnavailableException
java.io.IOException
org.mobicents.media.server.spi.ResourceUnavailableException
protected void register(java.nio.channels.Selector selector)
throws java.nio.channels.ClosedChannelException
java.nio.channels.ClosedChannelExceptionpublic java.net.DatagramSocket getDatagramSocket()
public boolean isConnected()
protected org.mobicents.media.server.spi.clock.Timer getTimer()
public org.mobicents.media.Format getFormat()
public void setPeriod(int period)
public int getPeriod()
public java.util.Collection<org.mobicents.media.server.spi.dsp.Codec> getCodecs()
public void setFormat(int payloadId,
org.mobicents.media.Format format)
payloadId - rtp payload numberformat - the format object.public void setDtmfPayload(int dtmf)
public java.lang.String getLocalAddress()
public int getLocalPort()
public int getJitter()
public void setJitter(int jitter)
jitter - the value of jitter in milliseconds.public void setClock(RtpClock clock)
clock - the RTP clock instance;public RtpClock getClock()
public ReceiveStream getReceiveStream()
public AVProfile getAVProfile()
public int getPacketsReceived()
public int getPacketsSent()
public void release()
public boolean isClosed()
public RtpSocketListener getListener()
public void setListener(RtpSocketListener listener)
listener - the listener instance.
public void setPeer(java.net.InetAddress address,
int port)
throws java.io.IOException
address - the address of the remote party.port - the port number of the remote party.
java.io.IOExceptionpublic SendStream getSendStream()
org.mobicents.media.server.impl.rtp.RtpSocket#startSendStream(PushBufferDataSource);
public void send(RtpPacket packet)
throws java.io.IOException
RtpPacket - -
the packet which contains media data and rtp header
java.io.IOException
public void send(byte[] packet)
throws java.io.IOException
packet - the rtp packet as binary arrary
java.io.IOExceptionpublic void receive(RtpPacket rtpPacket)
rtpPacket - protected void notify(java.lang.Exception e)
public long getBytesReceived()
public long getBytesSent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||