com.wowza.wms.rtp.model
Class RTPStream

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

public class RTPStream
extends Object

RTPStream: RTP Stream class which encapsulates an IMediaStream class for RTP streaming.


Field Summary
static int AVSYNCMETHODS_RTPTIMECODE
           
static int AVSYNCMETHODS_SENDERREPORT
           
static int AVSYNCMETHODS_SYSTEMCLOCK
           
static int AVSYNCMETHODS_UNKNOWN
           
static int MODE_PLAY
           
static int MODE_PUBLISH
           
static int MODE_UNKNOWN
           
static int SDPLOCATION_AUDIO
           
static int SDPLOCATION_STREAM
           
static int SDPLOCATION_VIDEO
           
static String STREAMINFO_SESSIONATTRIBUTES
           
static String STREAMINFO_SESSIONBANDWIDTH
           
static String STREAMINFO_SESSIONCONNECTIONDATA
           
static String STREAMINFO_SESSIONEMAILADDRESS
           
static String STREAMINFO_SESSIONINFORMATION
           
static String STREAMINFO_SESSIONNAME
           
static String STREAMINFO_SESSIONPHONENUMBER
           
static String STREAMINFO_SESSIONPORIGIN
           
static String STREAMINFO_SESSIONPROTOCOLVERSION
           
static String STREAMINFO_SESSIONREPEATTIMES
           
static String STREAMINFO_SESSIONTIMEZONES
           
static String STREAMINFO_SESSIONTIMING
           
static String STREAMINFO_SESSIONURI
           
 
Constructor Summary
RTPStream(RTPContext context, String streamId)
          Constructor
 
Method Summary
 void addStreamAttribute(String key, String value)
          Add a name value pair to the stream attribute collection
 void addStreamInfo(String key, String value)
          Add a name value pair to the stream info collection
 void addTrack(com.wowza.wms.rtp.model.RTPTrack track)
          Add a track
 void addTrackId(String seq, String trackId)
          Add track
 void addTrackInternal(com.wowza.wms.rtp.model.RTPTrack track)
          Add RTP track
 void announce(com.wowza.wms.rtp.model.RTPRequestStatus status)
          Execute announce command
 void attachToWMSSession(com.wowza.wms.server.RtmpSessionInfo wmsSessionInfo)
          Attach to WMS session, Internal use
static int avSyncNameToId(String avSyncName)
          Get audio/video sync id from name
 void checkSendMetadata(long adjTimecode)
          Check to see if we have sent onMetadata event, if not send
 void clearRTSPSessionExtraLines()
          Clear SDP extra lines
 void clearTracks()
          Clear all tracks
 boolean createStream(com.wowza.wms.rtp.model.RTPRequestStatus status)
          Create IMediaStream, Internal use.
 String describe(RTPSession rtspSession, int isStreamPacketizer, com.wowza.wms.rtp.model.RTPRequestStatus status)
          Execute describe command
 String describe(RTPSession rtspSession, com.wowza.wms.rtp.model.RTPRequestStatus status)
          Execute describe command
 void detachFromWMSSession(com.wowza.wms.server.RtmpSessionInfo wmsSessionInfo)
          Detach from WMS session, Internal use.
 void extractCodecConfigFromTrackInfo()
          Extract codec config information from SDP data
 String formatRTPInfo(long timecode, int videoSeq, int audioSeq)
          Format RTP info
 IApplicationInstance getAppInstance()
          Get application instance
 String getAppInstanceName()
          Get the application instance name
 String getAppName()
          Get the application name
 com.wowza.wms.rtp.model.RTPTrack getAudioTrack()
          Get the most likely audio track
 int getAutoAllocateInterleavePorts()
           
 int getAVSyncMethod()
          Get the audio/video sync method.
 double getDuration()
          Get the duration of the stream if video on demand
 String getHost()
          Get host
 AMFPacket[] getLastPacketsByType(IMediaReader localReader, double startTime)
          Analyzes stream to get information, Internal use.
 AMFPacket[] getLastPacketsByType(IMediaStream localStream)
          Analyzes stream to get information, Internal use.
 int getMaxRTCPWaitTime()
          Get max time to wait for RTCP sender reports (milliseconds)
 String getMediaCasterType()
          Get the media caster stream type for this stream
 IMediaReader getMediaReader()
          Get media reader if video on demand stream
 byte[] getMetadataPacket()
          Get the onMetadata packet for this RTP stream
 int getMode()
          Get the current play/publish mode
 int getMPEGTSAudioPID()
          Get the audio PID id if MPEG-TS stream
 int getMPEGTSVideoPID()
          Get the video PID id if MPEG-TS stream
 long getNormalizedNTPTimecode(long timecode)
          Turn a millisecond timcode into an NTP timecode
 String getOutHost()
          Get the out host
 RTPContext getRTPContext()
          Get the RTP context
 RTPDestination getRTPDestination()
          Get RTP destination
 String getRTPInfo(double startTime, int videoSeq, int audioSeq)
          Get the RTP info
 String getRTSPBindIpAddress()
          Get the bind RTSP bind IP address
 String getRTSPConnectionAddressType()
          Get the connection address type
 String getRTSPConnectionIpAddress()
          Get the connection IP address
 int getRTSPMaximumPendingWriteBytes()
          Get the maximum number of waiting bytes allow for this RTSP session
 String getRTSPOriginAddressType()
          Get the origin address type
 String getRTSPOriginIpAddress()
          Get the origin IP address
 String getRTSPSessionDescription()
          Get session description
 java.util.List<com.wowza.wms.rtp.model.RTPStream.RTSPExtraLine> getRTSPSessionExtraLines()
          Get extra SDP lines
 String getRTSPSessionName()
          Get session name
 int getRTSPSessionTimeout()
          Get RTP session timeout (milliseconds)
 String getSDPLang()
          Get the SDP language
 RTPSession getSession()
          Get the RTP session
 IMediaStream getStream()
          Get the IMediaStream
 java.util.Map<String,String> getStreamAttributes()
          Get all name/value pairs in the stream attributes collection
 String getStreamExt()
          Get the stream extension
 String getStreamId()
          Get the stream id
 java.util.Map<String,String> getStreamInfo()
          Get all name/value pairs in the stream info collection
 String getStreamInfo(String key)
          Get stream info by name
 Object getStreamLock()
          Get the synchronization lock for this stream
 String getStreamName()
          Get stream name
 String getStreamNameLogging()
          Get the stream name used for logging
 String getStreamQueryStr()
          Get the stream query string
 long getStreamSessionId()
          Get the stream session id
 String getStreamSessionIp()
          Get the stream session ip
 long getStreamSessionVersion()
          Get the stream session version
 com.wowza.wms.rtp.model.RTPTrack getStreamTrack()
          Get the most likely stream track
 String getStreamType()
          Get the stream type
 com.wowza.wms.rtp.model.RTPTrack getTrack(String trackId)
          Get track by id
 String getTrackId(String seq)
          Get track by sequence number
 java.util.List<String> getTrackNames()
          Get a list of track ids
 String getTransportMode()
          Get the transport mode
 com.wowza.wms.rtp.transport.IUDPTransport getUDPTransport(boolean isMulticast)
          Get the UDP transport for this stream
 IVHost getVHost()
          Get vhost
 com.wowza.wms.rtp.model.RTPTrack getVideoTrack()
          Get the most likely video track
 long getVODLastTimeTC()
          Get the last timecode (milliseconds) sent for video on demand
 long getVODPlayLen()
          Get the video on demand play duration (milliseconds)
 long getVODStartTimeTC()
          Get the video on demand start time (milliseconds)
 void idle(org.apache.mina.common.IoSession session, com.wowza.wms.server.RtmpResponseMessage resp)
          Process idle event
 void incrementMediaInBytes(long bytes)
          Increment the media bytes in, Internal use.
 boolean isAVSyncNonSR()
          Is sync method based on RTCP packets (sender report)
 boolean isCheckIpAddr()
          Are we checking the ip address of each incoming RTP packet
 boolean isCheckSSRC()
          Are we checking the ssrc values of each incoming RTP packet
 boolean isForceRTSPInterleaved()
          True if forcing RTSP interleaved
 boolean isLive()
          Is live stream
 boolean isModePlay()
          Is this a play stream
 boolean isModePublish()
          Is this a publish stream
 boolean isModeUknown()
          Is the stream mode unknown (publish vs play)
 boolean isMPEGTSOut()
          Is MPEG-TS out
 boolean isPaused()
          Is stream paused
 boolean isPublishStreamReady()
          See if a publishing stream has enough data to start playback
 boolean isResetPlayStream()
          Is reset stream trigger, Internal use.
 boolean isResyncAudioVideoOnSR()
          Reset audio/video sync on new RTCP packets (not just first packet)
 boolean isRTSP()
          Is this RTP Stream managed by RTSP session
 boolean isRTSPAlwaysUseSDPPorts()
          Force RTSP to use ports in SDP data
 boolean isSendSDESEvents()
          Send RTCP SDES events
 boolean isStreamStarted()
          Is stream started
 boolean isTimeout(long currTime, int timeout)
          Is the stream timeout out
 void lockRepeaterStreams(java.util.List<String> streamNames)
          Lock a list of live repeater stream names, Internal use.
 void pause(com.wowza.wms.rtp.model.RTPRequestStatus status)
          Execute pause
 com.wowza.wms.rtp.model.RTPStreamPlayResult play(com.wowza.wms.rtp.model.RTPRequestStatus status)
          Execute play
 com.wowza.wms.rtp.model.RTPStreamPlayResult play(com.wowza.wms.rtp.model.RTPRequestStatus status, double startTime, double stopTime)
          Execute play
 void putRTSPSessionExtraLine(int location, String line)
          Add an extra line to the SDP data
 com.wowza.wms.rtp.model.RTPStreamPlayResult record(com.wowza.wms.rtp.model.RTPRequestStatus status)
          Execute record
 com.wowza.wms.rtp.model.RTPStreamPlayResult record(com.wowza.wms.rtp.model.RTPRequestStatus status, double startTime, double stopTime)
          Execute record
 com.wowza.wms.rtp.model.RTPTrack removeTrack(String trackId)
          Remove a track by id
 com.wowza.wms.rtp.model.RTPTrack removeTrackInternal(String trackId)
          Remove track by track id
 void resetSentMetadataFlag()
          Reset sendMetadata flag
 void setAppInstanceName(String appInstanceName)
          Set the application instance name
 void setAppName(String appName)
          Get the application name
 void setAVSyncMethod(int avSyncMethod)
          Set the audio/video sync method.
 void setCheckIpAddr(boolean checkIpAddr)
          Are we checking the ip address of each incoming RTP packet
 void setCheckSSRC(boolean checkSSRC)
          Are we checking the ssrc values of each incoming RTP packet
 void setForceRTSPInterleaved(boolean isForceRTSPInterleaved)
          True if forcing RTSP interleaved
 void setHost(String host)
          Set host
 void setLive(boolean isLive)
          Is live stream
 void setMaxRTCPWaitTime(int maxRTCPWaitTime)
          Set max time to wait for RTCP sender reports (milliseconds)
 void setMode(int mode)
          Set the play/publish mode
 void setMPEGTSAudioPID(int mpegtsAudioPID)
          Set the audio PID id if MPEG-TS stream
 void setMPEGTSOut(boolean isMPEGTSOut)
          Is MPEG-TS out
 void setMPEGTSVideoPID(int mpegtsVideoPID)
          Set the video PID id if MPEG-TS stream
 void setOutHost(String outHost)
          Set out host
 void setResetPlayStream(boolean doResetPlayStream)
          Set reset stream trigger
 void setResyncAudioVideoOnSR(boolean resyncAudioVideoOnSR)
          Reset audio/video sync on new RTCP packets (not just first packet)
 void setRTPDestination(RTPDestination rtpDestination)
          Set RTP destination
 void setRTSP(boolean isRTSP)
          Is this RTP Stream managed by RTSP session
 void setRTSPAlwaysUseSDPPorts(boolean rtspAlwaysUseSDPPorts)
          Force RTSP to use ports in SDP data
 void setRTSPBindIpAddress(String rtspBindIpAddress)
          Set the bind RTSP bind IP address
 void setRTSPConnectionAddressType(String rtspConnectionAddressType)
          Set the connection address type
 void setRTSPConnectionIpAddress(String rtspConnectionIpAddress)
          Set the connection IP address
 void setRTSPMaximumPendingWriteBytes(int rtspMaximumPendingWriteBytes)
          Set the maximum number of waiting bytes allow for this RTSP session
 void setRTSPOriginAddressType(String rtspOriginAddressType)
          Set the origin address type
 void setRTSPOriginIpAddress(String rtspOriginIpAddress)
          Set the origin IP address
 void setRTSPSessionDescription(String rtspSessionDescription)
          Get session description
 void setRTSPSessionName(String rtspSessionName)
          Set session name
 void setRTSPSessionTimeout(int rtspSessionTimeout)
          Set RTP session timeout (milliseconds)
 void setSDPLang(String sdpLang)
          Set the SDP language
 void setSendSDESEvents(boolean sendSDESEvents)
          Send RTCP SDES events
 void setSession(RTPSession session)
          Set the RTP session
 void setStreamExt(String streamExt)
          Set the stream extension
 void setStreamName(String streamName)
          Set stream name
 void setStreamNameLogging(String streamNameLogging)
          Set the stream name used for logging
 void setStreamQueryStr(String streamQueryStr)
          Set the stream query string
 void setStreamSessionId(long streamSessionId)
          Set the stream session id
 void setStreamSessionIp(String streamSessionIp)
          Set the stream session ip
 void setStreamSessionVersion(long streamSessionVersion)
          Set the stream session version
 void setStreamType(String streamType)
          Set the stream type
 void setTransportMode(String transportMode)
          Set the transport mode
 void setVODLastTimeTC(long vodLastTimeTC)
          Set the last timecode (milliseconds) sent for video on demand
 void setVODPlayLen(long vodPlayLen)
          Set the video on demand play duration (milliseconds)
 void setVODStartTimeTC(long vodStartTimeTC)
          Set the video on demand start time (milliseconds)
 void shutdown(com.wowza.wms.rtp.model.RTPRequestStatus status)
          shutdown RTP stream, Internal use.
 com.wowza.wms.rtp.model.RTPTrack sloppyGetTrack(String trackId)
          Sloppy method for finding track by name, Internal use.
 boolean streamExists()
          Return true if RTP stream contains a IMediaStream
 void switchSetupToMPEGTS()
          Switch a stream to MPEG-TS, Internal use.
 void touch()
          Touch the stream so that it does not timeout
 String transportFindBestMatch(String transport)
          Based on a trasport string from SETUP command find best match
 void unlockRepeaterStreams()
          Unlock live repeater streams
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AVSYNCMETHODS_RTPTIMECODE

public static final int AVSYNCMETHODS_RTPTIMECODE
See Also:
Constant Field Values

AVSYNCMETHODS_SENDERREPORT

public static final int AVSYNCMETHODS_SENDERREPORT
See Also:
Constant Field Values

AVSYNCMETHODS_SYSTEMCLOCK

public static final int AVSYNCMETHODS_SYSTEMCLOCK
See Also:
Constant Field Values

AVSYNCMETHODS_UNKNOWN

public static final int AVSYNCMETHODS_UNKNOWN
See Also:
Constant Field Values

MODE_PLAY

public static final int MODE_PLAY
See Also:
Constant Field Values

MODE_PUBLISH

public static final int MODE_PUBLISH
See Also:
Constant Field Values

MODE_UNKNOWN

public static final int MODE_UNKNOWN
See Also:
Constant Field Values

SDPLOCATION_AUDIO

public static final int SDPLOCATION_AUDIO
See Also:
Constant Field Values

SDPLOCATION_STREAM

public static final int SDPLOCATION_STREAM
See Also:
Constant Field Values

SDPLOCATION_VIDEO

public static final int SDPLOCATION_VIDEO
See Also:
Constant Field Values

STREAMINFO_SESSIONATTRIBUTES

public static final String STREAMINFO_SESSIONATTRIBUTES
See Also:
Constant Field Values

STREAMINFO_SESSIONBANDWIDTH

public static final String STREAMINFO_SESSIONBANDWIDTH
See Also:
Constant Field Values

STREAMINFO_SESSIONCONNECTIONDATA

public static final String STREAMINFO_SESSIONCONNECTIONDATA
See Also:
Constant Field Values

STREAMINFO_SESSIONEMAILADDRESS

public static final String STREAMINFO_SESSIONEMAILADDRESS
See Also:
Constant Field Values

STREAMINFO_SESSIONINFORMATION

public static final String STREAMINFO_SESSIONINFORMATION
See Also:
Constant Field Values

STREAMINFO_SESSIONNAME

public static final String STREAMINFO_SESSIONNAME
See Also:
Constant Field Values

STREAMINFO_SESSIONPHONENUMBER

public static final String STREAMINFO_SESSIONPHONENUMBER
See Also:
Constant Field Values

STREAMINFO_SESSIONPORIGIN

public static final String STREAMINFO_SESSIONPORIGIN
See Also:
Constant Field Values

STREAMINFO_SESSIONPROTOCOLVERSION

public static final String STREAMINFO_SESSIONPROTOCOLVERSION
See Also:
Constant Field Values

STREAMINFO_SESSIONREPEATTIMES

public static final String STREAMINFO_SESSIONREPEATTIMES
See Also:
Constant Field Values

STREAMINFO_SESSIONTIMEZONES

public static final String STREAMINFO_SESSIONTIMEZONES
See Also:
Constant Field Values

STREAMINFO_SESSIONTIMING

public static final String STREAMINFO_SESSIONTIMING
See Also:
Constant Field Values

STREAMINFO_SESSIONURI

public static final String STREAMINFO_SESSIONURI
See Also:
Constant Field Values
Constructor Detail

RTPStream

public RTPStream(RTPContext context,
                 String streamId)
Constructor

Parameters:
context - RTP context
streamId - stream id
Method Detail

addStreamAttribute

public void addStreamAttribute(String key,
                               String value)
Add a name value pair to the stream attribute collection

Parameters:
key - name
value - value

addStreamInfo

public void addStreamInfo(String key,
                          String value)
Add a name value pair to the stream info collection

Parameters:
key - name
value - value

addTrack

public void addTrack(com.wowza.wms.rtp.model.RTPTrack track)
Add a track

Parameters:
track - RTP track

addTrackId

public void addTrackId(String seq,
                       String trackId)
Add track

Parameters:
seq - sequence number
trackId - track id

addTrackInternal

public void addTrackInternal(com.wowza.wms.rtp.model.RTPTrack track)
Add RTP track

Parameters:
track - RTP track

announce

public void announce(com.wowza.wms.rtp.model.RTPRequestStatus status)
Execute announce command

Parameters:
status - RTP status

attachToWMSSession

public void attachToWMSSession(com.wowza.wms.server.RtmpSessionInfo wmsSessionInfo)
Attach to WMS session, Internal use

Parameters:
wmsSessionInfo - session info

avSyncNameToId

public static int avSyncNameToId(String avSyncName)
Get audio/video sync id from name

Parameters:
avSyncName - audio/video sync name
Returns:
audio/video sync id, see AVSYNCMETHODS_*

checkSendMetadata

public void checkSendMetadata(long adjTimecode)
Check to see if we have sent onMetadata event, if not send

Parameters:
adjTimecode - timecode (milliseconds)

clearRTSPSessionExtraLines

public void clearRTSPSessionExtraLines()
Clear SDP extra lines


clearTracks

public void clearTracks()
Clear all tracks


createStream

public boolean createStream(com.wowza.wms.rtp.model.RTPRequestStatus status)
Create IMediaStream, Internal use.

Parameters:
status - status
Returns:
true if successful

describe

public String describe(RTPSession rtspSession,
                       int isStreamPacketizer,
                       com.wowza.wms.rtp.model.RTPRequestStatus status)
Execute describe command

Parameters:
rtspSession - RTP session
isStreamPacketizer - true is stream
status - RTP status
Returns:
describe string

describe

public String describe(RTPSession rtspSession,
                       com.wowza.wms.rtp.model.RTPRequestStatus status)
Execute describe command

Parameters:
rtspSession - RTP session
status - RTP status
Returns:
describe response

detachFromWMSSession

public void detachFromWMSSession(com.wowza.wms.server.RtmpSessionInfo wmsSessionInfo)
Detach from WMS session, Internal use.

Parameters:
wmsSessionInfo - session info

extractCodecConfigFromTrackInfo

public void extractCodecConfigFromTrackInfo()
Extract codec config information from SDP data


formatRTPInfo

public String formatRTPInfo(long timecode,
                            int videoSeq,
                            int audioSeq)
Format RTP info

Parameters:
timecode - timecode
videoSeq - video sequence number
audioSeq - audio sequence number
Returns:
RTP Info string

getAppInstance

public IApplicationInstance getAppInstance()
Get application instance

Returns:
application instance

getAppInstanceName

public String getAppInstanceName()
Get the application instance name

Returns:
application instance name

getAppName

public String getAppName()
Get the application name

Returns:
application name

getAudioTrack

public com.wowza.wms.rtp.model.RTPTrack getAudioTrack()
Get the most likely audio track

Returns:
RTP track

getAutoAllocateInterleavePorts

public int getAutoAllocateInterleavePorts()

getAVSyncMethod

public int getAVSyncMethod()
Get the audio/video sync method. See AVSYNCMETHODS_*

Returns:
audio/video sync method. See AVSYNCMETHODS_*

getDuration

public double getDuration()
Get the duration of the stream if video on demand

Returns:
duration in seconds

getHost

public String getHost()
Get host

Returns:
host

getLastPacketsByType

public AMFPacket[] getLastPacketsByType(IMediaReader localReader,
                                        double startTime)
Analyzes stream to get information, Internal use.

Parameters:
localReader - media reader
startTime - start time
Returns:
important packets

getLastPacketsByType

public AMFPacket[] getLastPacketsByType(IMediaStream localStream)
Analyzes stream to get information, Internal use.

Parameters:
localStream - local stream
Returns:
important packets

getMaxRTCPWaitTime

public int getMaxRTCPWaitTime()
Get max time to wait for RTCP sender reports (milliseconds)

Returns:
max time to wait for RTCP sender reports (milliseconds)

getMediaCasterType

public String getMediaCasterType()
Get the media caster stream type for this stream

Returns:
media caster stream type

getMediaReader

public IMediaReader getMediaReader()
Get media reader if video on demand stream

Returns:
media reader

getMetadataPacket

public byte[] getMetadataPacket()
Get the onMetadata packet for this RTP stream

Returns:
onMetadata packet

getMode

public int getMode()
Get the current play/publish mode

Returns:
play/publish mode

getMPEGTSAudioPID

public int getMPEGTSAudioPID()
Get the audio PID id if MPEG-TS stream

Returns:
audio PID id if MPEG-TS stream

getMPEGTSVideoPID

public int getMPEGTSVideoPID()
Get the video PID id if MPEG-TS stream

Returns:
video PID id if MPEG-TS stream

getNormalizedNTPTimecode

public long getNormalizedNTPTimecode(long timecode)
Turn a millisecond timcode into an NTP timecode

Parameters:
timecode - timecode (milliseconds)
Returns:
NTP timecode

getOutHost

public String getOutHost()
Get the out host

Returns:
out host

getRTPContext

public RTPContext getRTPContext()
Get the RTP context

Returns:
RTP context

getRTPDestination

public RTPDestination getRTPDestination()
Get RTP destination

Returns:
RTP destination

getRTPInfo

public String getRTPInfo(double startTime,
                         int videoSeq,
                         int audioSeq)
Get the RTP info

Parameters:
startTime - start time
videoSeq - video sequence number
audioSeq - audio sequence number
Returns:
RTP info string

getRTSPBindIpAddress

public String getRTSPBindIpAddress()
Get the bind RTSP bind IP address

Returns:
bind RTSP bind IP address

getRTSPConnectionAddressType

public String getRTSPConnectionAddressType()
Get the connection address type

Returns:
connection address type

getRTSPConnectionIpAddress

public String getRTSPConnectionIpAddress()
Get the connection IP address

Returns:
connection IP address

getRTSPMaximumPendingWriteBytes

public int getRTSPMaximumPendingWriteBytes()
Get the maximum number of waiting bytes allow for this RTSP session

Returns:
maximum number of waiting bytes allow for this RTSP session

getRTSPOriginAddressType

public String getRTSPOriginAddressType()
Get the origin address type

Returns:
origin address type

getRTSPOriginIpAddress

public String getRTSPOriginIpAddress()
Get the origin IP address

Returns:
origin IP address

getRTSPSessionDescription

public String getRTSPSessionDescription()
Get session description

Returns:
session description

getRTSPSessionExtraLines

public java.util.List<com.wowza.wms.rtp.model.RTPStream.RTSPExtraLine> getRTSPSessionExtraLines()
Get extra SDP lines

Returns:
extra SDP lines

getRTSPSessionName

public String getRTSPSessionName()
Get session name

Returns:
session name

getRTSPSessionTimeout

public int getRTSPSessionTimeout()
Get RTP session timeout (milliseconds)

Returns:
RTP session timeout (milliseconds)

getSDPLang

public String getSDPLang()
Get the SDP language

Returns:
SDP language

getSession

public RTPSession getSession()
Get the RTP session

Returns:
RTP session

getStream

public IMediaStream getStream()
Get the IMediaStream

Returns:
stream (IMediaStream) interface

getStreamAttributes

public java.util.Map<String,String> getStreamAttributes()
Get all name/value pairs in the stream attributes collection

Returns:
map of name/value pairs

getStreamExt

public String getStreamExt()
Get the stream extension

Returns:
stream extension

getStreamId

public String getStreamId()
Get the stream id

Returns:
stream id

getStreamInfo

public java.util.Map<String,String> getStreamInfo()
Get all name/value pairs in the stream info collection

Returns:
map of name/value pairs

getStreamInfo

public String getStreamInfo(String key)
Get stream info by name

Parameters:
key - name
Returns:
value

getStreamLock

public Object getStreamLock()
Get the synchronization lock for this stream

Returns:
synchronization lock for this stream

getStreamName

public String getStreamName()
Get stream name

Returns:
stream name

getStreamNameLogging

public String getStreamNameLogging()
Get the stream name used for logging

Returns:
stream name used for logging

getStreamQueryStr

public String getStreamQueryStr()
Get the stream query string

Returns:
stream query string

getStreamSessionId

public long getStreamSessionId()
Get the stream session id

Returns:
stream session id

getStreamSessionIp

public String getStreamSessionIp()
Get the stream session ip

Returns:
stream session ip

getStreamSessionVersion

public long getStreamSessionVersion()
Get the stream session version

Returns:
stream session version

getStreamTrack

public com.wowza.wms.rtp.model.RTPTrack getStreamTrack()
Get the most likely stream track

Returns:
RTP track

getStreamType

public String getStreamType()
Get the stream type

Returns:
stream type

getTrack

public com.wowza.wms.rtp.model.RTPTrack getTrack(String trackId)
Get track by id

Parameters:
trackId - track id
Returns:
RTP track

getTrackId

public String getTrackId(String seq)
Get track by sequence number

Parameters:
seq - sequence number
Returns:
RTP track

getTrackNames

public java.util.List<String> getTrackNames()
Get a list of track ids

Returns:
list of track ids

getTransportMode

public String getTransportMode()
Get the transport mode

Returns:
transport mode

getUDPTransport

public com.wowza.wms.rtp.transport.IUDPTransport getUDPTransport(boolean isMulticast)
Get the UDP transport for this stream

Parameters:
isMulticast - true if multicast
Returns:
UDP transport

getVHost

public IVHost getVHost()
Get vhost

Returns:
vhost

getVideoTrack

public com.wowza.wms.rtp.model.RTPTrack getVideoTrack()
Get the most likely video track

Returns:
RTP track

getVODLastTimeTC

public long getVODLastTimeTC()
Get the last timecode (milliseconds) sent for video on demand

Returns:
last timecode (milliseconds) sent for video on demand

getVODPlayLen

public long getVODPlayLen()
Get the video on demand play duration (milliseconds)

Returns:
video on demand play duration (milliseconds)

getVODStartTimeTC

public long getVODStartTimeTC()
Get the video on demand start time (milliseconds)

Returns:
video on demand start time (milliseconds)

idle

public void idle(org.apache.mina.common.IoSession session,
                 com.wowza.wms.server.RtmpResponseMessage resp)
Process idle event

Parameters:
session - io session
resp - idle request

incrementMediaInBytes

public void incrementMediaInBytes(long bytes)
Increment the media bytes in, Internal use.

Parameters:
bytes -

isAVSyncNonSR

public boolean isAVSyncNonSR()
Is sync method based on RTCP packets (sender report)

Returns:
true if based in RTCP sender reports

isCheckIpAddr

public boolean isCheckIpAddr()
Are we checking the ip address of each incoming RTP packet

Returns:
true if checking ip address of each incoming RTP packet

isCheckSSRC

public boolean isCheckSSRC()
Are we checking the ssrc values of each incoming RTP packet

Returns:
true if checking

isForceRTSPInterleaved

public boolean isForceRTSPInterleaved()
True if forcing RTSP interleaved

Returns:
true if forcing RTSP interleaved

isLive

public boolean isLive()
Is live stream

Returns:
true if live

isModePlay

public boolean isModePlay()
Is this a play stream

Returns:
true if play stream

isModePublish

public boolean isModePublish()
Is this a publish stream

Returns:
true if publish stream

isModeUknown

public boolean isModeUknown()
Is the stream mode unknown (publish vs play)

Returns:
true if stream mode is unknown

isMPEGTSOut

public boolean isMPEGTSOut()
Is MPEG-TS out

Returns:
true if MPEG-TS out

isPaused

public boolean isPaused()
Is stream paused

Returns:
true if stream is paused

isPublishStreamReady

public boolean isPublishStreamReady()
See if a publishing stream has enough data to start playback

Returns:
true, if the stream is ready for playback

isResetPlayStream

public boolean isResetPlayStream()
Is reset stream trigger, Internal use.

Returns:
true if reset trigger

isResyncAudioVideoOnSR

public boolean isResyncAudioVideoOnSR()
Reset audio/video sync on new RTCP packets (not just first packet)

Returns:
true if resetting audio/video on new RTCP packets

isRTSP

public boolean isRTSP()
Is this RTP Stream managed by RTSP session

Returns:
true if managed by RTSP session

isRTSPAlwaysUseSDPPorts

public boolean isRTSPAlwaysUseSDPPorts()
Force RTSP to use ports in SDP data

Returns:
true if using ports in SDP data

isSendSDESEvents

public boolean isSendSDESEvents()
Send RTCP SDES events

Returns:
true if sending RTCP SDES events

isStreamStarted

public boolean isStreamStarted()
Is stream started

Returns:
true if stream has started playback

isTimeout

public boolean isTimeout(long currTime,
                         int timeout)
Is the stream timeout out

Parameters:
currTime - current time
timeout - timeout value
Returns:
true if timed out

lockRepeaterStreams

public void lockRepeaterStreams(java.util.List<String> streamNames)
Lock a list of live repeater stream names, Internal use.

Parameters:
streamNames - stream names

pause

public void pause(com.wowza.wms.rtp.model.RTPRequestStatus status)
Execute pause

Parameters:
status - RTP status

play

public com.wowza.wms.rtp.model.RTPStreamPlayResult play(com.wowza.wms.rtp.model.RTPRequestStatus status)
Execute play

Parameters:
status - RTP status
Returns:
status

play

public com.wowza.wms.rtp.model.RTPStreamPlayResult play(com.wowza.wms.rtp.model.RTPRequestStatus status,
                                                        double startTime,
                                                        double stopTime)
Execute play

Parameters:
status - RTP status
startTime - playback start time
stopTime - playback stop time
Returns:
status

putRTSPSessionExtraLine

public void putRTSPSessionExtraLine(int location,
                                    String line)
Add an extra line to the SDP data

Parameters:
location - location of line, see SDPLOCATION_
line - line to add

record

public com.wowza.wms.rtp.model.RTPStreamPlayResult record(com.wowza.wms.rtp.model.RTPRequestStatus status)
Execute record

Parameters:
status - RTP status
Returns:
status

record

public com.wowza.wms.rtp.model.RTPStreamPlayResult record(com.wowza.wms.rtp.model.RTPRequestStatus status,
                                                          double startTime,
                                                          double stopTime)
Execute record

Parameters:
status - RTP status
startTime - playback start time
stopTime - playback stop time
Returns:
status

removeTrack

public com.wowza.wms.rtp.model.RTPTrack removeTrack(String trackId)
Remove a track by id

Parameters:
trackId - track id
Returns:
RTP track

removeTrackInternal

public com.wowza.wms.rtp.model.RTPTrack removeTrackInternal(String trackId)
Remove track by track id

Parameters:
trackId - track id
Returns:
RTP track that was removed

resetSentMetadataFlag

public void resetSentMetadataFlag()
Reset sendMetadata flag


setAppInstanceName

public void setAppInstanceName(String appInstanceName)
Set the application instance name

Parameters:
appInstanceName - application instance name

setAppName

public void setAppName(String appName)
Get the application name

Parameters:
appName - application name

setAVSyncMethod

public void setAVSyncMethod(int avSyncMethod)
Set the audio/video sync method. See AVSYNCMETHODS_*

Parameters:
avSyncMethod - audio/video sync method. See AVSYNCMETHODS_*

setCheckIpAddr

public void setCheckIpAddr(boolean checkIpAddr)
Are we checking the ip address of each incoming RTP packet

Parameters:
checkIpAddr - true if checking ip address of each incoming RTP packet

setCheckSSRC

public void setCheckSSRC(boolean checkSSRC)
Are we checking the ssrc values of each incoming RTP packet

Parameters:
checkSSRC - true if checking

setForceRTSPInterleaved

public void setForceRTSPInterleaved(boolean isForceRTSPInterleaved)
True if forcing RTSP interleaved

Parameters:
isForceRTSPInterleaved - true if forcing RTSP interleaved

setHost

public void setHost(String host)
Set host

Parameters:
host - host

setLive

public void setLive(boolean isLive)
Is live stream

Parameters:
isLive - true if live

setMaxRTCPWaitTime

public void setMaxRTCPWaitTime(int maxRTCPWaitTime)
Set max time to wait for RTCP sender reports (milliseconds)

Parameters:
maxRTCPWaitTime - max time to wait for RTCP sender reports (milliseconds)

setMode

public void setMode(int mode)
Set the play/publish mode

Parameters:
mode - play/publish mode

setMPEGTSAudioPID

public void setMPEGTSAudioPID(int mpegtsAudioPID)
Set the audio PID id if MPEG-TS stream

Parameters:
mpegtsAudioPID - audio PID id if MPEG-TS stream

setMPEGTSOut

public void setMPEGTSOut(boolean isMPEGTSOut)
Is MPEG-TS out

Parameters:
isMPEGTSOut - true if MPEG-TS out

setMPEGTSVideoPID

public void setMPEGTSVideoPID(int mpegtsVideoPID)
Set the video PID id if MPEG-TS stream

Parameters:
mpegtsVideoPID - video PID id if MPEG-TS stream

setOutHost

public void setOutHost(String outHost)
Set out host

Parameters:
outHost - out host

setResetPlayStream

public void setResetPlayStream(boolean doResetPlayStream)
Set reset stream trigger

Parameters:
doResetPlayStream - true if reset trigger

setResyncAudioVideoOnSR

public void setResyncAudioVideoOnSR(boolean resyncAudioVideoOnSR)
Reset audio/video sync on new RTCP packets (not just first packet)

Parameters:
resyncAudioVideoOnSR - true if resetting audio/video on new RTCP packets

setRTPDestination

public void setRTPDestination(RTPDestination rtpDestination)
Set RTP destination

Parameters:
rtpDestination - RTP destination

setRTSP

public void setRTSP(boolean isRTSP)
Is this RTP Stream managed by RTSP session

Parameters:
isRTSP - true if managed by RTSP session

setRTSPAlwaysUseSDPPorts

public void setRTSPAlwaysUseSDPPorts(boolean rtspAlwaysUseSDPPorts)
Force RTSP to use ports in SDP data

Parameters:
rtspAlwaysUseSDPPorts - true if using ports in SDP data

setRTSPBindIpAddress

public void setRTSPBindIpAddress(String rtspBindIpAddress)
Set the bind RTSP bind IP address

Parameters:
rtspBindIpAddress - bind RTSP bind IP address

setRTSPConnectionAddressType

public void setRTSPConnectionAddressType(String rtspConnectionAddressType)
Set the connection address type

Parameters:
rtspConnectionAddressType - connection address type

setRTSPConnectionIpAddress

public void setRTSPConnectionIpAddress(String rtspConnectionIpAddress)
Set the connection IP address

Parameters:
rtspConnectionIpAddress - connection IP address

setRTSPMaximumPendingWriteBytes

public void setRTSPMaximumPendingWriteBytes(int rtspMaximumPendingWriteBytes)
Set the maximum number of waiting bytes allow for this RTSP session

Parameters:
rtspMaximumPendingWriteBytes - maximum number of waiting bytes allow for this RTSP session

setRTSPOriginAddressType

public void setRTSPOriginAddressType(String rtspOriginAddressType)
Set the origin address type

Parameters:
rtspOriginAddressType - origin address type

setRTSPOriginIpAddress

public void setRTSPOriginIpAddress(String rtspOriginIpAddress)
Set the origin IP address

Parameters:
rtspOriginIpAddress - origin IP address

setRTSPSessionDescription

public void setRTSPSessionDescription(String rtspSessionDescription)
Get session description

Parameters:
rtspSessionDescription - session description

setRTSPSessionName

public void setRTSPSessionName(String rtspSessionName)
Set session name

Parameters:
rtspSessionName - session name

setRTSPSessionTimeout

public void setRTSPSessionTimeout(int rtspSessionTimeout)
Set RTP session timeout (milliseconds)

Parameters:
rtspSessionTimeout - RTP session timeout (milliseconds)

setSDPLang

public void setSDPLang(String sdpLang)
Set the SDP language

Parameters:
sdpLang - SDP language

setSendSDESEvents

public void setSendSDESEvents(boolean sendSDESEvents)
Send RTCP SDES events

Parameters:
sendSDESEvents - true if sending RTCP SDES events

setSession

public void setSession(RTPSession session)
Set the RTP session

Parameters:
session - RTP session

setStreamExt

public void setStreamExt(String streamExt)
Set the stream extension

Parameters:
streamExt - stream extension

setStreamName

public void setStreamName(String streamName)
Set stream name

Parameters:
streamName - stream name

setStreamNameLogging

public void setStreamNameLogging(String streamNameLogging)
Set the stream name used for logging

Parameters:
streamNameLogging - stream name used for logging

setStreamQueryStr

public void setStreamQueryStr(String streamQueryStr)
Set the stream query string

Parameters:
streamQueryStr - stream query string

setStreamSessionId

public void setStreamSessionId(long streamSessionId)
Set the stream session id

Parameters:
streamSessionId - stream session id

setStreamSessionIp

public void setStreamSessionIp(String streamSessionIp)
Set the stream session ip

Parameters:
streamSessionIp - stream session ip

setStreamSessionVersion

public void setStreamSessionVersion(long streamSessionVersion)
Set the stream session version

Parameters:
streamSessionVersion - stream session version

setStreamType

public void setStreamType(String streamType)
Set the stream type

Parameters:
streamType - stream type

setTransportMode

public void setTransportMode(String transportMode)
Set the transport mode

Parameters:
transportMode - transport mode

setVODLastTimeTC

public void setVODLastTimeTC(long vodLastTimeTC)
Set the last timecode (milliseconds) sent for video on demand

Parameters:
vodLastTimeTC - last timecode (milliseconds) sent for video on demand

setVODPlayLen

public void setVODPlayLen(long vodPlayLen)
Set the video on demand play duration (milliseconds)

Parameters:
vodPlayLen - video on demand play duration (milliseconds)

setVODStartTimeTC

public void setVODStartTimeTC(long vodStartTimeTC)
Set the video on demand start time (milliseconds)

Parameters:
vodStartTimeTC - video on demand start time (milliseconds)

shutdown

public void shutdown(com.wowza.wms.rtp.model.RTPRequestStatus status)
shutdown RTP stream, Internal use.

Parameters:
status - status

sloppyGetTrack

public com.wowza.wms.rtp.model.RTPTrack sloppyGetTrack(String trackId)
Sloppy method for finding track by name, Internal use.

Parameters:
trackId - track name
Returns:
RTP track

streamExists

public boolean streamExists()
Return true if RTP stream contains a IMediaStream

Returns:
true if RTP stream contains a IMediaStream

switchSetupToMPEGTS

public void switchSetupToMPEGTS()
Switch a stream to MPEG-TS, Internal use.


touch

public void touch()
Touch the stream so that it does not timeout


transportFindBestMatch

public String transportFindBestMatch(String transport)
Based on a trasport string from SETUP command find best match

Parameters:
transport - trasport string
Returns:
best match

unlockRepeaterStreams

public void unlockRepeaterStreams()
Unlock live repeater streams