com.wowza.wms.rtp.model
Class RTPContext

Object
  extended by com.wowza.wms.rtp.model.RTPContext

public class RTPContext
extends Object

RTPContext: RTP context


Constructor Summary
RTPContext(IVHost vhost)
          Constructor
 
Method Summary
 boolean acquireSocketAddress(java.net.SocketAddress socketAddress)
          Acquire UDP socket address
 int acquireUDPPortPair()
          Acquire next available UDP port pair
 int acquireUDPPortPair(int port)
          Acquire UDP port pair
 void cacheRTPStream(RTPStream stream)
          Cache an RTP stream, Internal use.
 void doWatchdog()
          Idle events for cleanup
 boolean existsRTSPTunnelingSession(String sessionId)
          Return true if session id is valid RTSP/RTP tunneling session id
 int[] expandToPortPair(int port)
          Expand a single port to a pair.
 com.wowza.wms.rtp.model.RTPPacketizerItem getAudioPacketizerItem(IApplicationInstance appInstance, int codecId)
          Get audio packetizer for a given codec id.
 com.wowza.wms.rtp.depacketizer.RTPDePacketizerList getDePacketizerList()
          Get a list of the available depacketizers
 String getDePacketizerName(com.wowza.wms.rtp.model.RTPTrack rtpTrack)
          Get a depacketizer by name
 Object getLock()
          Get the UDP port manager lock
 Object getRTSPTunnelingLock()
          Get the RTSP/RTP tunneling lock
 com.wowza.wms.rtsp.RTSPTunnelingSession getRTSPTunnelingSession(String sessionId)
          Get RTSP/RTP tunneling session by session id
 RTPSessions getSessions()
          Get RTP sessions
 com.wowza.wms.rtp.model.RTPPacketizerItem getStreamPacketizerItem(IApplicationInstance appInstance, int codecId)
          Get stream packetizer for a given codec id.
 com.wowza.wms.rtp.transport.UDPTransportManager getUDPTransportManager()
          Get the UDP transport manager
 IVHost getVHost()
          Get vhost
 com.wowza.wms.rtp.model.RTPPacketizerItem getVideoPacketizerItem(IApplicationInstance appInstance, int codecId)
          Get video packetizer for a given codec id.
 void init()
          Initialize
 void putAudioPacketizerItem(int codecId, com.wowza.wms.rtp.model.RTPPacketizerItem rtpPacketizerInfo)
          Set the audio packetizer for a given codec id
 void putRTSPTunnelingSession(String sessionId, com.wowza.wms.rtsp.RTSPTunnelingSession rtspTunnelingSession)
          Remove RTSP/RTP tunneling session by session id
 void putStreamPacketizerItem(int codecId, com.wowza.wms.rtp.model.RTPPacketizerItem rtpPacketizerInfo)
          Set the stream packetizer for a given codec id
 void putVideoPacketizerItem(int codecId, com.wowza.wms.rtp.model.RTPPacketizerItem rtpPacketizerInfo)
          Set the video packetizer for a given codec id
 boolean releaseSocketAddress(java.net.SocketAddress socketAddress)
          Release UDP socket address
 void releaseUDPPortPair(int port)
          Release port pair
 com.wowza.wms.rtsp.RTSPTunnelingSession removeRTSPTunnelingSession(String sessionId)
          Remove RTSP/RTP tunneling session by session id
 void shutdown()
          Shutdown
 void shutdownRTPSession(RTPSession rtpSession)
          Gracefully and forcefully shutdown and RTP session
 RTPStream uncacheRTPStream(String streamId)
          UnCache an RTP stream, Internal use.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RTPContext

public RTPContext(IVHost vhost)
Constructor

Parameters:
vhost - vhost
Method Detail

acquireSocketAddress

public boolean acquireSocketAddress(java.net.SocketAddress socketAddress)
Acquire UDP socket address

Parameters:
socketAddress - UDP socket address
Returns:
true if available

acquireUDPPortPair

public int acquireUDPPortPair()
Acquire next available UDP port pair

Returns:
port

acquireUDPPortPair

public int acquireUDPPortPair(int port)
Acquire UDP port pair

Parameters:
port - starting port
Returns:
port

cacheRTPStream

public void cacheRTPStream(RTPStream stream)
Cache an RTP stream, Internal use.

Parameters:
stream - RTP stream

doWatchdog

public void doWatchdog()
Idle events for cleanup


existsRTSPTunnelingSession

public boolean existsRTSPTunnelingSession(String sessionId)
Return true if session id is valid RTSP/RTP tunneling session id

Parameters:
sessionId - session id
Returns:
true if session id is valid RTSP/RTP tunneling session id

expandToPortPair

public int[] expandToPortPair(int port)
Expand a single port to a pair. Ports are allocated in pairs always starting with even port number.

Parameters:
port - port
Returns:
port

getAudioPacketizerItem

public com.wowza.wms.rtp.model.RTPPacketizerItem getAudioPacketizerItem(IApplicationInstance appInstance,
                                                                        int codecId)
Get audio packetizer for a given codec id.

Parameters:
appInstance - application instance
codecId - codec id, see IVHost.CODEC_AUDIO_*
Returns:
packetizer info

getDePacketizerList

public com.wowza.wms.rtp.depacketizer.RTPDePacketizerList getDePacketizerList()
Get a list of the available depacketizers

Returns:
list of the available depacketizers

getDePacketizerName

public String getDePacketizerName(com.wowza.wms.rtp.model.RTPTrack rtpTrack)
Get a depacketizer by name

Parameters:
rtpTrack - track
Returns:
depacketizer

getLock

public Object getLock()
Get the UDP port manager lock

Returns:
UDP port manager lock

getRTSPTunnelingLock

public Object getRTSPTunnelingLock()
Get the RTSP/RTP tunneling lock

Returns:
RTSP/RTP tunneling lock

getRTSPTunnelingSession

public com.wowza.wms.rtsp.RTSPTunnelingSession getRTSPTunnelingSession(String sessionId)
Get RTSP/RTP tunneling session by session id

Parameters:
sessionId - session id
Returns:
RTSP/RTP tunneling session

getSessions

public RTPSessions getSessions()
Get RTP sessions

Returns:
RTP sessions

getStreamPacketizerItem

public com.wowza.wms.rtp.model.RTPPacketizerItem getStreamPacketizerItem(IApplicationInstance appInstance,
                                                                         int codecId)
Get stream packetizer for a given codec id.

Parameters:
appInstance - application instance
codecId - codec id, see IVHost.CODEC_STREAM_*
Returns:
packetizer info

getUDPTransportManager

public com.wowza.wms.rtp.transport.UDPTransportManager getUDPTransportManager()
Get the UDP transport manager

Returns:
UDP transport manager

getVHost

public IVHost getVHost()
Get vhost

Returns:
vhost

getVideoPacketizerItem

public com.wowza.wms.rtp.model.RTPPacketizerItem getVideoPacketizerItem(IApplicationInstance appInstance,
                                                                        int codecId)
Get video packetizer for a given codec id.

Parameters:
appInstance - application instance
codecId - codec id, see IVHost.CODEC_VIDEO_*
Returns:
packetizer info

init

public void init()
Initialize


putAudioPacketizerItem

public void putAudioPacketizerItem(int codecId,
                                   com.wowza.wms.rtp.model.RTPPacketizerItem rtpPacketizerInfo)
Set the audio packetizer for a given codec id

Parameters:
codecId - codec id, see IVHost.CODEC_AUDIO_*
rtpPacketizerInfo - packetizer info

putRTSPTunnelingSession

public void putRTSPTunnelingSession(String sessionId,
                                    com.wowza.wms.rtsp.RTSPTunnelingSession rtspTunnelingSession)
Remove RTSP/RTP tunneling session by session id

Parameters:
sessionId - session id
rtspTunnelingSession - RTSP/RTP tunneling session

putStreamPacketizerItem

public void putStreamPacketizerItem(int codecId,
                                    com.wowza.wms.rtp.model.RTPPacketizerItem rtpPacketizerInfo)
Set the stream packetizer for a given codec id

Parameters:
codecId - codec id, see IVHost.CODEC_STREAM_*
rtpPacketizerInfo - packetizer info

putVideoPacketizerItem

public void putVideoPacketizerItem(int codecId,
                                   com.wowza.wms.rtp.model.RTPPacketizerItem rtpPacketizerInfo)
Set the video packetizer for a given codec id

Parameters:
codecId - codec id, see IVHost.CODEC_VIDEO_*
rtpPacketizerInfo - packetizer info

releaseSocketAddress

public boolean releaseSocketAddress(java.net.SocketAddress socketAddress)
Release UDP socket address

Parameters:
socketAddress - UDP socket address
Returns:
true if available

releaseUDPPortPair

public void releaseUDPPortPair(int port)
Release port pair

Parameters:
port - first port of pair

removeRTSPTunnelingSession

public com.wowza.wms.rtsp.RTSPTunnelingSession removeRTSPTunnelingSession(String sessionId)
Remove RTSP/RTP tunneling session by session id

Parameters:
sessionId - session id
Returns:
RTSP/RTP tunneling session if removed

shutdown

public void shutdown()
Shutdown


shutdownRTPSession

public void shutdownRTPSession(RTPSession rtpSession)
Gracefully and forcefully shutdown and RTP session

Parameters:
rtpSession - RTP session

uncacheRTPStream

public RTPStream uncacheRTPStream(String streamId)
UnCache an RTP stream, Internal use.

Parameters:
streamId - stream id
Returns:
RTP Stream