|
||||||||||
| 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 static int |
READ_PERIOD
|
protected org.mobicents.media.server.spi.Timer |
timer
|
| Constructor Summary | |
|---|---|
RtpSocket(org.mobicents.media.server.spi.Timer timer,
java.util.Map<java.lang.Integer,org.mobicents.media.Format> rtpMap,
RtpFactory rtpFactory)
Creates a new instance of RtpSocket |
|
| Method Summary | |
|---|---|
void |
close()
Closes socket |
int |
getJitter()
Gets the jitter for time of packet arrival |
RtpSocketListener |
getListener()
|
java.lang.String |
getLocalAddress()
Gets address to which this socked is bound. |
int |
getLocalPort()
Returns port number to which this socked is bound. |
protected int |
getPayloadType(org.mobicents.media.Format format)
Determines payload type for specified format. |
org.mobicents.media.MediaSource |
getReceiveStream()
Gets receiver stream. |
java.util.HashMap<java.lang.Integer,org.mobicents.media.Format> |
getRtpMap()
Gets relations between payload number and format used by this socket. |
SendStream |
getSendStream()
(Non Java-doc). |
java.lang.String |
getStunAddress()
Gets the address of stun server if present. |
int |
init(java.net.InetAddress localAddress,
int lowPort,
int highPort)
(Non Java-doc). |
boolean |
isChannelOpen()
|
void |
release()
|
void |
resetRtpMap()
|
void |
run()
|
void |
send(org.mobicents.media.Buffer buffer)
Sends media data to remote peer. |
void |
setJitter(int jitter)
Assign new value of packet time arrival jitter. |
void |
setListener(RtpSocketListener listener)
|
void |
setPeer(java.net.InetAddress address,
int port)
Assigns remote end. |
void |
setRtpMap(java.util.HashMap<java.lang.Integer,org.mobicents.media.Format> rtpMap)
|
void |
setStunAddress(java.lang.String address)
Assigns address of the STUN server. |
protected void |
startReceiver()
|
protected void |
stopReceiver()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static int READ_PERIOD
protected org.mobicents.media.server.spi.Timer timer
| Constructor Detail |
|---|
public RtpSocket(org.mobicents.media.server.spi.Timer timer,
java.util.Map<java.lang.Integer,org.mobicents.media.Format> rtpMap,
RtpFactory rtpFactory)
timer - used to synchronize receiver stream.rtpMap - RTP payloads list.| Method Detail |
|---|
public int init(java.net.InetAddress localAddress,
int lowPort,
int highPort)
throws java.net.SocketException,
java.io.IOException,
net.java.stun4j.StunException
java.net.SocketException
java.io.IOException
net.java.stun4j.StunExceptionorg.mobicents.media.server.impl.rtp.RtpSocket#init(InetAddress,
int);public java.lang.String getStunAddress()
public void setStunAddress(java.lang.String address)
address - the address of the stun server in format host[:port]. if port
is not set then default port is used.public java.lang.String getLocalAddress()
public int getLocalPort()
public int getJitter()
public void setJitter(int jitter)
jitter - the value of jitter in milliseconds.public org.mobicents.media.MediaSource getReceiveStream()
protected void startReceiver()
protected void stopReceiver()
public void release()
public RtpSocketListener getListener()
public void setListener(RtpSocketListener listener)
public boolean isChannelOpen()
public void close()
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 java.util.HashMap<java.lang.Integer,org.mobicents.media.Format> getRtpMap()
Format objectpublic void setRtpMap(java.util.HashMap<java.lang.Integer,org.mobicents.media.Format> rtpMap)
public void resetRtpMap()
protected int getPayloadType(org.mobicents.media.Format format)
format - the object representing format.
public SendStream getSendStream()
org.mobicents.media.server.impl.rtp.RtpSocket#startSendStream(PushBufferDataSource);
public void send(org.mobicents.media.Buffer buffer)
throws java.io.IOException
buffer - the buffer which contains media data
java.io.IOExceptionpublic void run()
run in interface java.lang.Runnable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||