Package com.wowza.wms.rtp.model
Class RTPContext
Object
com.wowza.wms.rtp.model.RTPContext
RTPContext: RTP context
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
acquireSocketAddress
(SocketAddress socketAddress) Acquire UDP socket addressint
Acquire next available UDP port pairint
acquireUDPPortPair
(int port) Acquire UDP port pairvoid
cacheRTPStream
(RTPStream stream) Cache an RTP stream, Internal use.void
Idle events for cleanupboolean
existsRTSPTunnelingSession
(String sessionId) Return true if session id is valid RTSP/RTP tunneling session idint[]
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
Get a list of the available depacketizersgetDePacketizerName
(com.wowza.wms.rtp.model.RTPTrack rtpTrack) Get a depacketizer by namegetLock()
Get the UDP port manager lockGet the RTSP/RTP tunneling lockcom.wowza.wms.rtsp.RTSPTunnelingSession
getRTSPTunnelingSession
(String sessionId) Get RTSP/RTP tunneling session by session idGet RTP sessionscom.wowza.wms.rtp.model.RTPPacketizerItem
getStreamPacketizerItem
(IApplicationInstance appInstance, int codecId) Get stream packetizer for a given codec id.com.wowza.wms.rtp.transport.UDPTransportManager
Get the UDP transport managergetVHost()
Get vhostcom.wowza.wms.rtp.model.RTPPacketizerItem
getVideoPacketizerItem
(IApplicationInstance appInstance, int codecId) Get video packetizer for a given codec id.void
init()
Initializeboolean
void
putAudioPacketizerItem
(int codecId, com.wowza.wms.rtp.model.RTPPacketizerItem rtpPacketizerInfo) Set the audio packetizer for a given codec idvoid
putRTSPTunnelingSession
(String sessionId, com.wowza.wms.rtsp.RTSPTunnelingSession rtspTunnelingSession) Remove RTSP/RTP tunneling session by session idvoid
putStreamPacketizerItem
(int codecId, com.wowza.wms.rtp.model.RTPPacketizerItem rtpPacketizerInfo) Set the stream packetizer for a given codec idvoid
putVideoPacketizerItem
(int codecId, com.wowza.wms.rtp.model.RTPPacketizerItem rtpPacketizerInfo) Set the video packetizer for a given codec idboolean
releaseSocketAddress
(SocketAddress socketAddress) Release UDP socket addressvoid
releaseUDPPortPair
(int port) Release port paircom.wowza.wms.rtsp.RTSPTunnelingSession
removeRTSPTunnelingSession
(String sessionId) Remove RTSP/RTP tunneling session by session idvoid
shutdown()
Shutdownvoid
shutdownRTPSession
(RTPSession rtpSession) Gracefully and forcefully shutdown and RTP sessionvoid
shutdownRTPSession
(String sessionId) Gracefully and forcefully shutdown and RTP sessionuncacheRTPStream
(String streamId) UnCache an RTP stream, Internal use.
-
Constructor Details
-
RTPContext
Constructor- Parameters:
vhost
- vhost
-
-
Method Details
-
doWatchdog
public void doWatchdog()Idle events for cleanup -
init
public void init()Initialize -
shutdown
public void shutdown()Shutdown -
getAudioPacketizerItem
public com.wowza.wms.rtp.model.RTPPacketizerItem getAudioPacketizerItem(IApplicationInstance appInstance, int codecId) Get audio packetizer for a given codec id.- Parameters:
appInstance
- application instancecodecId
- codec id, see IVHost.CODEC_AUDIO_*- Returns:
- packetizer info
-
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
-
getVideoPacketizerItem
public com.wowza.wms.rtp.model.RTPPacketizerItem getVideoPacketizerItem(IApplicationInstance appInstance, int codecId) Get video packetizer for a given codec id.- Parameters:
appInstance
- application instancecodecId
- codec id, see IVHost.CODEC_VIDEO_*- Returns:
- 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
-
getStreamPacketizerItem
public com.wowza.wms.rtp.model.RTPPacketizerItem getStreamPacketizerItem(IApplicationInstance appInstance, int codecId) Get stream packetizer for a given codec id.- Parameters:
appInstance
- application instancecodecId
- codec id, see IVHost.CODEC_STREAM_*- Returns:
- packetizer info
-
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
-
getSessions
Get RTP sessions- Returns:
- RTP sessions
-
getVHost
Get vhost- Returns:
- vhost
-
getUDPTransportManager
public com.wowza.wms.rtp.transport.UDPTransportManager getUDPTransportManager()Get the UDP transport manager- Returns:
- UDP transport manager
-
getLock
Get the UDP port manager lock- Returns:
- UDP port manager lock
-
acquireSocketAddress
Acquire UDP socket address- Parameters:
socketAddress
- UDP socket address- Returns:
- true if available
-
releaseSocketAddress
Release UDP socket address- Parameters:
socketAddress
- UDP socket address- Returns:
- true if available
-
acquireUDPPortPair
public int acquireUDPPortPair(int port) Acquire UDP port pair- Parameters:
port
- starting port- Returns:
- port
-
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
-
acquireUDPPortPair
public int acquireUDPPortPair()Acquire next available UDP port pair- Returns:
- port
-
releaseUDPPortPair
public void releaseUDPPortPair(int port) Release port pair- Parameters:
port
- first port of pair
-
isUDPPortDebugLog
public boolean isUDPPortDebugLog() -
cacheRTPStream
Cache an RTP stream, Internal use.- Parameters:
stream
- RTP stream
-
uncacheRTPStream
UnCache an RTP stream, Internal use.- Parameters:
streamId
- stream id- Returns:
- RTP Stream
-
getDePacketizerList
public com.wowza.wms.rtp.depacketizer.RTPDePacketizerList getDePacketizerList()Get a list of the available depacketizers- Returns:
- list of the available depacketizers
-
getDePacketizerName
Get a depacketizer by name- Parameters:
rtpTrack
- track- Returns:
- depacketizer
-
getRTSPTunnelingLock
Get the RTSP/RTP tunneling lock- Returns:
- RTSP/RTP tunneling lock
-
getRTSPTunnelingSession
Get RTSP/RTP tunneling session by session id- Parameters:
sessionId
- session id- Returns:
- RTSP/RTP tunneling session
-
removeRTSPTunnelingSession
Remove RTSP/RTP tunneling session by session id- Parameters:
sessionId
- session id- Returns:
- RTSP/RTP tunneling session if removed
-
existsRTSPTunnelingSession
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
-
putRTSPTunnelingSession
public void putRTSPTunnelingSession(String sessionId, com.wowza.wms.rtsp.RTSPTunnelingSession rtspTunnelingSession) Remove RTSP/RTP tunneling session by session id- Parameters:
sessionId
- session idrtspTunnelingSession
- RTSP/RTP tunneling session
-
shutdownRTPSession
Gracefully and forcefully shutdown and RTP session- Parameters:
sessionId
-
-
shutdownRTPSession
Gracefully and forcefully shutdown and RTP session- Parameters:
rtpSession
- RTP session
-