Package com.wowza.wms.stream
Interface IMediaStream
-
- All Known Implementing Classes:
com.wowza.wms.stream.MediaStream
,MediaStreamBase
public interface IMediaStream
IMediaStream: public, generic interface to mediaStream object. Upon creation of a new mediaStream, the client connection's default streamType value will be used to dynamically create a mediaStream object based on the definitions available in the vHosts.mediaStreamMap. All mediaStream implementations implement this interface.
-
-
Field Summary
Fields Modifier and Type Field Description static int
AUDIOSAMPLEACCESS
static int
PACKET_COUNTS_AUDIO
static int
PACKET_COUNTS_DATA
static int
PACKET_COUNTS_SIZE
static int
PACKET_COUNTS_VIDEO
static int
PACKET_COUNTS_VIDEOKEY
static int
PUBLISH_BITRATE_SOURCE_LASTGOP
static int
PUBLISH_BITRATE_SOURCE_MEASURE
static int
PUBLISH_BITRATE_SOURCE_METADATA
static int
PUBLISH_FRAMERATE_SOURCE_MEASURE
static int
PUBLISH_FRAMERATE_SOURCE_METADATA
static int
READACCESS
static int
VIDEOSAMPLEACCESS
static int
WRITEACCESS
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
addAudioCodecConfigPacket(long timecode, AMFPacket packet)
Set audio codec configuration packet (needed for H.264/AAC playback)void
addAudioData(byte[] data, int offset, int size)
Add data to current audio packetvoid
addAudioExtraData(java.util.Map<String,IAMFPacketExtraData> extraData)
Add extra data to the current audio packetvoid
addCalbackListener(IMediaStreamCallback callbackListener)
Add a callback listener to listen for all stream metadatavoid
addClientListener(IMediaStreamActionNotify actionListener)
Add client listener.void
addClientListener(IMediaStreamActionNotify2 actionListener)
Add client listener.void
addClientListener(IMediaStreamActionNotify3 actionListener)
Add client listener.void
addDataData(byte[] data, int offset, int size)
Add data to current data packetvoid
addDataExtraData(java.util.Map<String,IAMFPacketExtraData> extraData)
Add extra data to the current data packetvoid
addLivePacketListener(IMediaStreamLivePacketNotify listener)
Add a listener to receiver notification of new live AMF packetsvoid
addVideoCodecConfigPacket(long timecode, AMFPacket packet)
Set video codec configuration packet (needed for H.264/AAC playback)void
addVideoData(byte[] data, int offset, int size)
Add data to current video packetvoid
addVideoExtraData(java.util.Map<String,IAMFPacketExtraData> extraData)
Add extra data to the current video packetvoid
addVideoH264SEIListener(IMediaStreamH264SEINotify h264SEIListener)
Add an H.264 SEI listener.void
clear()
Delete media file pointed to by this mediaStream (be careful)void
clearFastPlaySettings()
Clear fastPlay settingsvoid
clearLoggingValues()
void
close()
Close mediaStreamvoid
flush()
Force publishing packets to be flushed from the input buffers to the output buffersboolean[]
getAccess(IClient client, String name)
Get the read/write access to this stream for this clientAMFPacket
getAudioCodecConfigPacket(long timecode)
Get audio codec configuration packet (needed for H.264/AAC playback)int
getAudioMissing()
Get number of audio bytes missing from current audio packetint
getAudioSize()
Get the size of the current audio packet that is being streamed from the client to the serverlong
getAudioTC()
Get last absolute audio timecode (milliseconds) sent to mediaStreamint
getBufferTime()
Get buffer time for mediaStream (milliseconds)byte[]
getBurstStartStop(boolean isStart)
Get the dynamic streaming burst start/stop AMF packetString
getCacheName()
not usedIClient
getClient()
Get parent client connectionint
getClientId()
Get parent client connection (id)String
getContextStr()
Returns the stream context string in the form [application]/[appInstance]/[streamName].int
getDataMissing()
Get number of data bytes missing from current data packetint
getDataSize()
Get the size of the current data packet that is being streamed from the client to the serverlong
getDataTC()
Get last absolute data timecode (milliseconds) sent to mediaStreamint
getDataType()
Get the data packet type: (IVHost.CONTENTTYPE_DATA0 or IVHost.CONTENTTYPE_DATA3)String
getDvrRecorder()
Get the DVR Recorder for this streamILiveStreamDvrRecorder
getDvrRecorder(String name)
Get the DVR Recorder interface to a stream by nameString
getDvrRecorderList()
Get the comma separated list of DVR Recorder names being used by this stream (see conf/Dvr.xml)String
getDvrRepeater()
Get the DVR repeater name for this streamElapsedTimer
getElapsedTime()
Get the interface to the elapse timerString
getExt()
Get media file extensioncom.wowza.wms.stream.FastPlaySettings
getFastPlaySettings()
Get current fastPlay settingsint
getHeaderSize()
Get the last packet header size (debugging)IHTTPStreamerSession
getHTTPStreamerSession()
Get the HTTPStreamer session associated with this streamdefault boolean
getIsSRT()
boolean
getIsWebRTC()
AMFPacket
getLastKeyFrame()
Get most recent video key frameAMFPacket
getLastPacket()
Get most recent live packetString
getLiveStreamPacketizer()
Get the live stream packetizer that this stream is usingILiveStreamPacketizer
getLiveStreamPacketizer(String name)
Get the LiveStreamPacketizer interface to a stream by nameString
getLiveStreamPacketizerList()
Get the comma separated list of LiveStreamPacketizers names being used by this stream (see conf/LiveStreamPacketizers.xml)String
getLiveStreamRepeater()
Get the live stream repeater name for the streamILiveStreamTranscoder
getLiveStreamTranscoder(String name)
Get a live stream transcoder for this stream by nameString
getLiveStreamTranscoderList()
Get the comma separated list of LiveStreamTranscoders names being used by this stream (see conf/LiveStreamTranscoders.xml)java.util.Map<String,ILiveStreamTranscoder>
getLiveStreamTranscoders()
Get the list of transcoders for this stream.long
getMaxTimecode()
Get the timecode of the latest received packetIOPerformanceCounter
getMediaIOPerformance()
Get IO performance counterIMediaStreamMetaDataProvider
getMetaDataProvider()
Get the metaData providerString
getName()
Get stream nameINetConnection
getNetConnection()
Get parent netConnection (future server to server communication)IMediaStreamPlay
getPlayer()
Get underlying player (IMediaStreamPlay) objectjava.util.List<AMFPacket>
getPlayPackets()
Get all available live packetsWMSProperties
getProperties()
Get mediaStream propertiesint
getPublishAudioCodecId()
Get the codec id of the most recently published audio packetint
getPublishBitrateAudio()
Get the audio bitrate of an incoming live published stream (bits per second).int
getPublishBitrateAudio(int source)
Get the audio bitrate of an incoming live published stream (bits per second).int
getPublishBitrateVideo()
Get the video bitrate of an incoming live published stream (bits per second).int
getPublishBitrateVideo(int source)
Get the video bitrate of an incoming live published stream (bits per second).long
getPublishFrameCountAudio()
Get the total number of audio frames received for an incoming live stream.long
getPublishFrameCountData()
Get the total number of data frames received for an incoming live stream.long
getPublishFrameCounts(long[] counts)
Get the total number of frames received for an incoming live stream.long
getPublishFrameCountVideo()
Get the total number of video frames received for an incoming live stream.long
getPublishFrameCountVideoKey()
Get the total number of video key frames received for an incoming live stream.double
getPublishFramerateVideo()
Get the video framerate of an incoming live published stream (frames per second).double
getPublishFramerateVideo(int source)
Get the video framerate of an incoming live published stream (frames per second).int[]
getPublishKeyFrameIntervalsVideo()
Get the last n key frame intervals for an incoming publish stream (frames per GOP), Most recent GOPs are first in the list.int
getPublishVideoCodecId()
Get the codec id of the most recently published video packetString
getQueryStr()
Get play/publish name query string.int
getReceiveVideoFPS()
Set frame per seconds for video (not currently implemented)AMFObj
getRespAMFAudioObj()
Get audio response channel objectAMFObj
getRespAMFDataObj()
Get data response channel objectAMFObj
getRespAMFVideoObj()
Get video response channel objectRTPStream
getRTPStream()
Get the RTP based stream this stream is associated withint
getSrc()
Get the stream idjava.io.File
getStreamFileForRead()
Get the File object to read from a stream (get stream name, ext and query from stream object)java.io.File
getStreamFileForRead(String name, String ext, String query)
Get the File object to read from a stream (specify name, ext and query)java.io.File
getStreamFileForWrite()
Get the File object to write to a stream (get stream name, ext and query from stream object)java.io.File
getStreamFileForWrite(String name, String ext, String query)
Get the File object to write to a stream (specify name, ext and query)MediaStreamMap
getStreams()
Get parent mediaStreamMap (owned by applicationInstance)String
getStreamType()
Get mediaStream streamTypecom.wowza.wms.transcoder.encoder.TranscoderEncoderStreamInfo
getTranscoderEncoderStreamInfo()
Get the transcoder encoder context information for this stream.com.wowza.wms.transcoder.model.TranscoderSessionDestination
getTranscoderSessionDestination()
If stream is result of transcode get the transcoder stream session for this stream.String
getUniqueStreamIdStr()
Get a string that uniquely identifies this streamAMFPacket
getVideoCodecConfigPacket(long timecode)
Get video codec configuration packet (needed for H.264/AAC playback)int
getVideoMissing()
Get number of video bytes missing from current video packetint
getVideoSize()
Get the size of the current video packet that is being streamed from the client to the serverlong
getVideoTC()
Get last absolute video timecode (milliseconds) sent to mediaStreamvoid
handleCallback(com.wowza.wms.request.RequestFunction function)
Routes request function to callback handler onStatus, onPlayStatus or [method/handler]boolean
idle()
Allow the mediaStream to perform idle work (not currently in use)long
incrementMediaInBytes(long increment)
Increment the number of mediaStream bytes receivedlong
incrementMediaLossBytes(long bytes, long count)
Increment the number of mediaStream loss bytes sent and number of packets sentlong
incrementMediaOutBytes(long bytes, long count)
Increment the number of mediaStream bytes sent and number of packets sentvoid
init(MediaStreamMap parent, int src, WMSProperties properties)
Initialize the mediaStream object after creation.void
initLiveStreamRepeating(String liveStreamPacketizer, String liveStreamRepeater)
Initialize this stream for live stream repeatingboolean
isAppend()
Is append to media file (only valid if isRecord)boolean
isClustered()
not usedboolean
isMediaCasterPlay()
Is MediaCaster play enabled (if true, will trigger MediaCaster startup)boolean
isMergeOnMetadata()
If true, merge incoming onMetadata events with the current onMetdata event data.boolean
isOpen()
Is mediaStream openboolean
isPlay()
Is the stream a play stream (vs a publish stream)boolean
isPlaying()
Is mediaStream playing (or paused - false)boolean
isPublisherStream()
Returns true if stream was created by stream publisher API.boolean
isPublishStreamReady(boolean checkAudio, boolean checkVideo)
Returns true if the publishing stream contains enough video/audio data to start playbackboolean
isReceiveAudio()
Is client currently receiving audio.boolean
isReceiveVideo()
Is client currently receiving video.boolean
isRecord()
Is set to true if second parameter of NetStream.publish is "record"boolean
isSendPlayStopLogEvent()
Get need to send a log event for stopboolean
isSendPublishStopLogEvent()
Get need to send a log event for publishingboolean
isSendRecordStopLogEvent()
Get need to send a log event for recordingboolean
isTranscoderEncoderStreamRoot()
True if this stream object is a transcoder encoder stream root.boolean
isTranscodeResult()
Is this stream the result of a transcode operation.boolean
isVideoH264SEIListenerEmpty()
Is H.264 SEI listener list empty.double
length()
Get length/duration (seconds) of media file pointed to by mediaStreamvoid
notifyActionOnCodecInfoAudio(com.wowza.wms.media.model.MediaCodecInfoAudio codecInfoAudio)
Notify client listeners of audio codec information changevoid
notifyActionOnCodecInfoVideo(com.wowza.wms.media.model.MediaCodecInfoVideo codecInfoVideo)
Notify client listeners of video codec information changevoid
notifyActionOnMetaData(AMFPacket metaDataPacket)
Notify client listeners of onMetaData changevoid
notifyActionPause(boolean isPause, long location)
Notify client listeners of pause actionvoid
notifyActionPauseRaw(boolean isPause, long location)
Notify client listeners of pauseRaw actionvoid
notifyActionPlay(String streamName, double playStart, double playLen, int playReset)
Notify client listeners of play actionvoid
notifyActionPublish(String streamName, boolean isRecord, boolean isAppend)
Notify client listeners of publish actionvoid
notifyActionSeek(double location)
Notify client listeners of seek actionvoid
notifyActionStop()
Notify client listeners of stop actionvoid
notifyActionUnPublish(String streamName, boolean isRecord, boolean isAppend)
Notify client listeners of unpublish actionvoid
notifyLivePacket(AMFPacket packet)
Notify new live AMF packetvoid
notifyVideoH264Packet(AMFPacket packet, com.wowza.wms.media.h264.H264SEIMessages seiMessages)
Notify H.264 SEI listener.void
packetComplete()
Invoked by requestAdapter when at the end of a set of packetsvoid
publish()
Publish mediaStreamvoid
putDvrRecorder(String name, ILiveStreamDvrRecorder dvr)
Add a live stream dvr to this streamvoid
putLiveStreamTranscoder(String name, ILiveStreamTranscoder liveStreamTranscoder)
Add a live stream transcoder to this streamvoid
registerCallback(String handlerName, IMediaStreamCallback callback)
Register a callback handlervoid
registerOnPlayStatus(IMediaStreamCallback callback)
Register onPlayStatus handlervoid
registerOnStatus(IMediaStreamCallback callback)
Register onStatus handlervoid
removeCalbackListener(IMediaStreamCallback callbackListener)
Remove a callback listener to listen for all stream metadatavoid
removeClientListener(IMediaStreamActionNotify actionListener)
Remove client listener.void
removeClientListener(IMediaStreamActionNotify2 actionListener)
Remove client listener.void
removeClientListener(IMediaStreamActionNotify3 actionListener)
Remove client listener.ILiveStreamDvrRecorder
removeDvrRecorder(String name)
Remove a live stream dvr by namevoid
removeLivePacketListener(IMediaStreamLivePacketNotify listener)
Remove a listener to receiver notification of new live AMF packetsILiveStreamTranscoder
removeLiveStreamTranscoder(String name)
Remove a live stream transcoder by namevoid
removeVideoH264SEIListener(IMediaStreamH264SEINotify h264SEIListener)
Remove an H.264 SEI listener.void
send(String handlerName)
Call client side NetStream method/handler with no parametersvoid
send(String handlerName, Object... params)
Call client side NetStream method/handlervoid
sendAMF3(String handlerName)
Call client side NetStream method/handler with no parameters.void
sendAMF3(String handlerName, Object... params)
Call client side NetStream method/handler.int
sendControlBytes(int controlType, java.io.OutputStream out)
Send playback control bytes.void
sendDirect(String handlerName)
Call client side NetStream method/handler and send event to underlying stream (will record event)void
sendDirect(String handlerName, Object... params)
Call client side NetStream method/handler and send event to underlying stream (will record event)void
sendDirectAMF3(String handlerName)
Call client side NetStream method/handler and send event to underlying stream (will record event).void
sendDirectAMF3(String handlerName, Object... params)
Call client side NetStream method/handler and send event to underlying stream (will record event).int
sendLivePlaySeek(java.io.OutputStream out, String name, long timecode)
Send onStatus(NetStream.Seek.Notify) eventint
sendLivePlayStart(java.io.OutputStream out, String name, long timecode, long timecodeOffset)
Send onStatus(NetStream.Play.Start) eventint
sendLivePlaySwitch(java.io.OutputStream out, String name, long timecode)
Send onStatus(NetStream.Play.Transition) eventint
sendPauseNotify(long timecode, String name)
Send onStatus(NetStream.Pause.Notify) eventint
sendPauseNotify(java.io.OutputStream out, long timecode, String name)
Send onStatus(NetStream.Pause.Notify) event.int
sendPlayReset(java.io.OutputStream out, String name)
Send onStatus(NetStream.Play.Reset) event.int
sendPlayReset(String name)
Send onStatus(NetStream.Play.Reset) eventint
sendPlaySeek(long location, long seekLocation, String name)
Send onStatus(NetStream.Seek.Notify) event.int
sendPlaySeek(java.io.OutputStream out, long location, long seekLocation, String name)
Send onStatus(NetStream.Seek.Notify) event.int
sendPlaySeek(java.io.OutputStream out, long location, long seekLocation, String name, java.util.List<Integer> seekTypes)
Send onStatus(NetStream.Seek.Notify) event.int
sendPlayStart(java.io.OutputStream out, String name, boolean isSwitch, boolean isLive, long timecode, java.util.List<Integer> seekTypes)
Send onStatus(NetStream.Play.Start) event (it is not a typo, this also send play start but with different control codes for media switch).int
sendPlayStart(java.io.OutputStream out, String name, boolean isSwitch, long timecode)
Send onStatus(NetStream.Play.Start) event (it is not a typo, this also send play start but with different control codes for media switch).int
sendPlayStart(java.io.OutputStream out, String name, boolean isSwitch, long timecode, java.util.List<Integer> seekTypes)
Send onStatus(NetStream.Play.Start) event (it is not a typo, this also send play start but with different control codes for media switch).int
sendPlayStart(String name, long timecode)
Send onStatus(NetStream.Play.Start) eventint
sendPlayStatus(long timecode, int statusType, double duration, double bytesSent)
Send onPlayStatus(NetStream.Play.Switch, NetStream.Play.Complete, NetStream.Play.Stop) eventint
sendPlayStatus(java.io.OutputStream out, long timecode, int statusType, double duration, double bytesSent)
Send onPlayStatus(NetStream.Play.Switch, NetStream.Play.Complete, NetStream.Play.Stop) event.int
sendPlayStop(long location, String name)
Send onStatus(NetStream.Play.Stop) eventint
sendPlayStop(java.io.OutputStream out, long location, String name)
Send onStatus(NetStream.Play.Stop) event.int
sendPlaySwitch(java.io.OutputStream out, String name, boolean isSwitch, long timecode)
Send onStatus(NetStream.Play.Start) event (it is not a typo, this also send play start but with different control codes for media switch).int
sendPlaySwitch(String name, long timecode)
Send onStatus(NetStream.Play.Start) event (it is not a typo, this also send play start but with different control codes for media switch).int
sendStreamNotFound(java.io.OutputStream out, String name)
Send onStatus(NetStream.Play.StreamNotFound) event.int
sendStreamNotFound(String name)
Send onStatus(NetStream.Play.StreamNotFound) eventint
sendUnpauseNotify(long location, String name)
Send onStatus(NetStream.Unpause.Notify) eventint
sendUnpauseNotify(java.io.OutputStream out, long location, String name)
Send onStatus(NetStream.Unpause.Notify) event.int
sendUnpauseNotify(java.io.OutputStream out, long location, String name, java.util.List<Integer> seekTypes)
Send onStatus(NetStream.Unpause.Notify) eventint
sendVODPlaySwitch(java.io.OutputStream out, String name, long timecode)
Send onStatus(NetStream.Play.Transition) eventvoid
setAppend(boolean isAppend)
Set is append to media file (only valid if isRecord)void
setAudioSize(int audioSize)
Set the size of the current audio packet that is being streamed from the client to the servervoid
setAudioTC(long audioTC)
Set last absolute audio timecode (milliseconds) sent to mediaStreamvoid
setAudioTC(long audioTC, boolean isAbsolute)
Set last absolute audio timecode (milliseconds) sent to mediaStreamvoid
setBufferTime(int bufferTime)
Set buffer time for mediaStream (milliseconds)void
setClient(IClient client)
Set parent client connectionvoid
setClustered(boolean isClustered)
not usedvoid
setDataSize(int dataSize)
Set the size of the current data packet that is being streamed from the client to the servervoid
setDataTC(long dataTC)
Set last absolute data timecode (milliseconds) sent to mediaStreamvoid
setDataTC(long dataTC, boolean isAbsolute)
Set last absolute data timecode (milliseconds) sent to mediaStreamvoid
setDataType(int dataType)
Set the data packet type: (IVHost.CONTENTTYPE_DATA0 or IVHost.CONTENTTYPE_DATA3)void
setDvrRecorder(String recorderName)
Set the DVR Recorder that this stream is usingvoid
setDvrRecorderList(String recorderList)
Set the comma separated list of DVR Recorder names being used by this stream (see conf/Dvr.xml)void
setExt(String ext)
Set media file extensionvoid
setFastPlaySettings(com.wowza.wms.stream.FastPlaySettings fastPlaySettings)
Set fastPlay settingsvoid
setHeaderSize(int headerSize)
Set the last packet header size (debugging)void
setHTTPStreamerSession(IHTTPStreamerSession httpStreamerSession)
Set the HTTPStreamer session associated with this streamvoid
setIsPlaying(boolean isPlaying)
Set is mediaStream playingdefault void
setIsSRT(boolean isSRT)
void
setIsWebRTC(boolean isWebRTC)
void
setLiveStreamPacketizer(String liveStreamPacketizer)
Set the live stream packetizer that this stream is usingvoid
setLiveStreamPacketizerList(String liveStreamPacketizerList)
Set the comma separated list of LiveStreamPacketizers names being used by this stream (see conf/LiveStreamPacketizers.xml)void
setLiveStreamRepeater(String liveStreamRepeater)
Set the live stream repeater name for the streamvoid
setLiveStreamTranscoderList(String liveStreamTranscoderList)
Set the comma separated list of LiveStreamTranscoders names being used by this stream (see conf/LiveStreamTranscoders.xml)void
setMediaCasterPlay(boolean isMediaCasterPlay)
Is MediaCaster play enabled (if true, will trigger MediaCaster startup)void
setMergeOnMetadata(boolean mergeOnMetadata)
If true, merge incoming onMetadata events with the current onMetdata event data.void
setMetaDataProvider(IMediaStreamMetaDataProvider metaDataProvider)
Set the metaData providervoid
setName(String name)
Set stream namevoid
setName(String name, String ext)
Set stream name and extension.void
setName(String name, String oldName, String ext, String queryStr, double playStart, double playLen, int playTransition)
Set stream name, extension, query string, play start, play len and play reset from play command.void
setNetConnection(INetConnection netConnection)
Set parent netConnection (future server to server communication)void
setOpen(boolean isOpen)
Set mediaStream openvoid
setPlay(boolean isPlay)
Set is the stream a play stream (vs a publish stream)void
setPlayer(IMediaStreamPlay player)
Set underlying player (IMediaStreamPlay) objectvoid
setPublishAudioCodecId(int publishAudioCodecId)
Set the codec id of the most recently published audio packetvoid
setPublisherStream(boolean isPublisherStream)
Set stream was created by stream publisher.void
setPublishVideoCodecId(int publishVideoCodecId)
Set the codec id of the most recently published video packetvoid
setQueryStr(String queryStr)
Set play/publish name query string.void
setReceiveAudio(boolean receiveAudio)
Set receive audiovoid
setReceiveVideo(boolean receiveVideo)
Set receive videovoid
setReceiveVideoFPS(int receiveVideoFPS)
Set frame per second for video (not currently implemented)void
setRecord(boolean isRecord)
Set to true if second parameter of NetStream.publish is "record"void
setRTPStream(RTPStream rtpStream)
Set the RTP based stream this stream is associated withvoid
setSendPlayStopLogEvent(boolean sendPlayStopLogEvent)
Set need to send a log event for stopvoid
setSendPublishStopLogEvent(boolean sendPlayStopLogEvent)
Set need to send a log event for publishingvoid
setSendRecordStopLogEvent(boolean sendPlayStopLogEvent)
Set need to send a log event for recordingvoid
setSrc(int src)
Set stream idvoid
setStreamType(String streamType)
Set mediaStream streamType.void
setTranscoderEncoderStreamInfo(com.wowza.wms.transcoder.encoder.TranscoderEncoderStreamInfo transcoderEncoderStreamInfo)
Set the transcoder encoder context information for this stream.void
setTranscodeResult(boolean isTranscodeResult)
Is this stream the result of a transcode operation.void
setVideoSize(int videoSize)
Set the size of the current video packet that is being streamed from the client to the servervoid
setVideoTC(long videoTC)
Set last absolute video timecode (milliseconds) sent to mediaStreamvoid
setVideoTC(long videoTC, boolean isAbsolute)
Set last absolute video timecode (milliseconds) sent to mediaStreamvoid
shutdown()
shutdown or close this mediaStreamlong
size()
Get size (bytes) of media file pointed to by mediaStreamvoid
startAudioPacket()
Called when an audio packet is first being populated with datavoid
startDataPacket()
Called when a data packet is first being populated with datavoid
startPublishing()
Start publishing live streamvoid
startVideoPacket()
Called when a video packet is first being populated with datavoid
stopName(String name, String oldName, String ext, String queryStr, double playStart, double playLen, int playTransition)
Stop stream namevoid
stopPublishing()
Stop publishing live streamvoid
switchName(String name, String oldName, String ext, String queryStr, double playStart, double playLen, int playTransition)
Switch to stream namevoid
trim()
Trim mediaStream.void
unregisterCallback(String handlerName)
Unregister a callback handlervoid
unregisterOnPlayStatus(IMediaStreamCallback callback)
Unregister onPlayStatus handlervoid
unregisterOnStatus(IMediaStreamCallback callback)
Unregister onStatus handlervoid
updateLoggingDuration()
Update logging.MDC with mediaStream logging informationvoid
updateLoggingValues()
Update logging.MDC with mediaStream logging information
-
-
-
Field Detail
-
READACCESS
static final int READACCESS
- See Also:
- Constant Field Values
-
WRITEACCESS
static final int WRITEACCESS
- See Also:
- Constant Field Values
-
AUDIOSAMPLEACCESS
static final int AUDIOSAMPLEACCESS
- See Also:
- Constant Field Values
-
VIDEOSAMPLEACCESS
static final int VIDEOSAMPLEACCESS
- See Also:
- Constant Field Values
-
PUBLISH_BITRATE_SOURCE_MEASURE
static final int PUBLISH_BITRATE_SOURCE_MEASURE
- See Also:
- Constant Field Values
-
PUBLISH_BITRATE_SOURCE_METADATA
static final int PUBLISH_BITRATE_SOURCE_METADATA
- See Also:
- Constant Field Values
-
PUBLISH_BITRATE_SOURCE_LASTGOP
static final int PUBLISH_BITRATE_SOURCE_LASTGOP
- See Also:
- Constant Field Values
-
PUBLISH_FRAMERATE_SOURCE_MEASURE
static final int PUBLISH_FRAMERATE_SOURCE_MEASURE
- See Also:
- Constant Field Values
-
PUBLISH_FRAMERATE_SOURCE_METADATA
static final int PUBLISH_FRAMERATE_SOURCE_METADATA
- See Also:
- Constant Field Values
-
PACKET_COUNTS_AUDIO
static final int PACKET_COUNTS_AUDIO
- See Also:
- Constant Field Values
-
PACKET_COUNTS_VIDEO
static final int PACKET_COUNTS_VIDEO
- See Also:
- Constant Field Values
-
PACKET_COUNTS_VIDEOKEY
static final int PACKET_COUNTS_VIDEOKEY
- See Also:
- Constant Field Values
-
PACKET_COUNTS_DATA
static final int PACKET_COUNTS_DATA
- See Also:
- Constant Field Values
-
PACKET_COUNTS_SIZE
static final int PACKET_COUNTS_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
void init(MediaStreamMap parent, int src, WMSProperties properties)
Initialize the mediaStream object after creation. Creation and initialization are separated due to the order of the creation events.- Parameters:
parent
- parent mediaStreamMap of the parent applicationInstancesrc
- stream id for this streamproperties
- initial properties as defined in Streams.xml
-
getBufferTime
int getBufferTime()
Get buffer time for mediaStream (milliseconds)- Returns:
- buffer time (millseconds)
-
setBufferTime
void setBufferTime(int bufferTime)
Set buffer time for mediaStream (milliseconds)- Parameters:
bufferTime
- buffer time (millseconds)
-
isPlaying
boolean isPlaying()
Is mediaStream playing (or paused - false)- Returns:
- is playing
-
setIsPlaying
void setIsPlaying(boolean isPlaying)
Set is mediaStream playing- Parameters:
isPlaying
-
-
getAudioSize
int getAudioSize()
Get the size of the current audio packet that is being streamed from the client to the server- Returns:
- size
-
getVideoSize
int getVideoSize()
Get the size of the current video packet that is being streamed from the client to the server- Returns:
- size
-
getDataSize
int getDataSize()
Get the size of the current data packet that is being streamed from the client to the server- Returns:
- size
-
setAudioSize
void setAudioSize(int audioSize)
Set the size of the current audio packet that is being streamed from the client to the server- Parameters:
audioSize
-
-
setVideoSize
void setVideoSize(int videoSize)
Set the size of the current video packet that is being streamed from the client to the server- Parameters:
videoSize
-
-
setDataSize
void setDataSize(int dataSize)
Set the size of the current data packet that is being streamed from the client to the server- Parameters:
dataSize
-
-
addAudioExtraData
void addAudioExtraData(java.util.Map<String,IAMFPacketExtraData> extraData)
Add extra data to the current audio packet- Parameters:
extraData
- extra data
-
addVideoExtraData
void addVideoExtraData(java.util.Map<String,IAMFPacketExtraData> extraData)
Add extra data to the current video packet- Parameters:
extraData
- extra data
-
addDataExtraData
void addDataExtraData(java.util.Map<String,IAMFPacketExtraData> extraData)
Add extra data to the current data packet- Parameters:
extraData
- extra data
-
getSrc
int getSrc()
Get the stream id- Returns:
- stream id
-
setSrc
void setSrc(int src)
Set stream id- Parameters:
src
- stream id
-
getName
String getName()
Get stream name- Returns:
- stream name
-
setName
void setName(String name)
Set stream name- Parameters:
name
- stream name
-
setName
void setName(String name, String ext)
Set stream name and extension. Example: if play command sent flv:test name=test, ext=flv.- Parameters:
name
- stream nameext
- stream extension
-
setName
void setName(String name, String oldName, String ext, String queryStr, double playStart, double playLen, int playTransition)
Set stream name, extension, query string, play start, play len and play reset from play command.- Parameters:
name
- stream nameoldName
- old stream nameext
- stream extensionqueryStr
- query stringplayStart
- play startplayLen
- play lenplayTransition
- play transition (see MediaBase.PLAYTRANSITION_*)
-
switchName
void switchName(String name, String oldName, String ext, String queryStr, double playStart, double playLen, int playTransition)
Switch to stream name- Parameters:
name
- stream nameoldName
- old stream nameext
- stream extensionqueryStr
- query stringplayStart
- play startplayLen
- play lenplayTransition
- play transition (see MediaBase.PLAYTRANSITION_*)
-
stopName
void stopName(String name, String oldName, String ext, String queryStr, double playStart, double playLen, int playTransition)
Stop stream name- Parameters:
name
- stream nameoldName
- old stream nameext
- stream extensionqueryStr
- query stringplayStart
- play startplayLen
- play lenplayTransition
- play transition (see MediaBase.PLAYTRANSITION_*)
-
shutdown
void shutdown()
shutdown or close this mediaStream
-
getAudioTC
long getAudioTC()
Get last absolute audio timecode (milliseconds) sent to mediaStream- Returns:
- last absolute audio timecode (milliseconds)
-
setAudioTC
void setAudioTC(long audioTC, boolean isAbsolute)
Set last absolute audio timecode (milliseconds) sent to mediaStream- Parameters:
audioTC
- timecode (millseconds)isAbsolute
- is the timecode value relative to last timecode or absolute
-
setAudioTC
void setAudioTC(long audioTC)
Set last absolute audio timecode (milliseconds) sent to mediaStream- Parameters:
audioTC
- timecode (millseconds)
-
getVideoTC
long getVideoTC()
Get last absolute video timecode (milliseconds) sent to mediaStream- Returns:
- last absolute video timecode (milliseconds)
-
setVideoTC
void setVideoTC(long videoTC, boolean isAbsolute)
Set last absolute video timecode (milliseconds) sent to mediaStream- Parameters:
videoTC
- timecode (millseconds)isAbsolute
- is the timecode value relative to last timecode or absolute
-
setVideoTC
void setVideoTC(long videoTC)
Set last absolute video timecode (milliseconds) sent to mediaStream- Parameters:
videoTC
- timecode (millseconds)
-
getDataTC
long getDataTC()
Get last absolute data timecode (milliseconds) sent to mediaStream- Returns:
- last absolute data timecode (milliseconds)
-
setDataTC
void setDataTC(long dataTC, boolean isAbsolute)
Set last absolute data timecode (milliseconds) sent to mediaStream- Parameters:
dataTC
- timecode (millseconds)isAbsolute
- is the timecode value relative to last timecode or absolute
-
getDataType
int getDataType()
Get the data packet type: (IVHost.CONTENTTYPE_DATA0 or IVHost.CONTENTTYPE_DATA3)- Returns:
- data packet type
-
setDataType
void setDataType(int dataType)
Set the data packet type: (IVHost.CONTENTTYPE_DATA0 or IVHost.CONTENTTYPE_DATA3)- Parameters:
dataType
- data packet type
-
setDataTC
void setDataTC(long dataTC)
Set last absolute data timecode (milliseconds) sent to mediaStream- Parameters:
dataTC
- timecode (millseconds)
-
isRecord
boolean isRecord()
Is set to true if second parameter of NetStream.publish is "record"- Returns:
- is true if second parameter of NetStream.publish is "record"
-
setRecord
void setRecord(boolean isRecord)
Set to true if second parameter of NetStream.publish is "record"- Parameters:
isRecord
- true if second parameter of NetStream.publish is "record"
-
isPlay
boolean isPlay()
Is the stream a play stream (vs a publish stream)- Returns:
- is play stream (has nothing to do with if its playing just that its play vs publish)
-
setPlay
void setPlay(boolean isPlay)
Set is the stream a play stream (vs a publish stream)- Parameters:
isPlay
- is play stream (has nothing to do with if its playing just that its play vs publish)
-
idle
boolean idle()
Allow the mediaStream to perform idle work (not currently in use)- Returns:
- true if it did some work
-
getClientId
int getClientId()
Get parent client connection (id)- Returns:
- parent client connection (id)
-
getClient
IClient getClient()
Get parent client connection- Returns:
- parent client connection
-
getNetConnection
INetConnection getNetConnection()
Get parent netConnection (future server to server communication)- Returns:
- parent netConnection connection
-
setNetConnection
void setNetConnection(INetConnection netConnection)
Set parent netConnection (future server to server communication)- Parameters:
netConnection
- netConnection connection
-
setClient
void setClient(IClient client)
Set parent client connection- Parameters:
client
- parent client connection
-
getStreams
MediaStreamMap getStreams()
Get parent mediaStreamMap (owned by applicationInstance)- Returns:
- parent mediaStreamMap
-
packetComplete
void packetComplete()
Invoked by requestAdapter when at the end of a set of packets
-
sendStreamNotFound
int sendStreamNotFound(String name)
Send onStatus(NetStream.Play.StreamNotFound) event- Parameters:
name
- stream name- Returns:
- bytes sent to client
-
sendStreamNotFound
int sendStreamNotFound(java.io.OutputStream out, String name)
Send onStatus(NetStream.Play.StreamNotFound) event. Send directly to OutputStream.- Parameters:
out
- OutputStreamname
- stream name- Returns:
- bytes sent to client
-
sendLivePlayStart
int sendLivePlayStart(java.io.OutputStream out, String name, long timecode, long timecodeOffset)
Send onStatus(NetStream.Play.Start) event- Parameters:
out
- OutputStreamname
- stream nametimecode
- timecodetimecodeOffset
- timecode offset- Returns:
- bytes sent to client
-
sendVODPlaySwitch
int sendVODPlaySwitch(java.io.OutputStream out, String name, long timecode)
Send onStatus(NetStream.Play.Transition) event- Parameters:
out
- OutputStreamname
- stream nametimecode
- timecode- Returns:
- bytes sent to client
-
sendLivePlaySwitch
int sendLivePlaySwitch(java.io.OutputStream out, String name, long timecode)
Send onStatus(NetStream.Play.Transition) event- Parameters:
out
- OutputStreamname
- stream nametimecode
- timecode- Returns:
- bytes sent to client
-
sendLivePlaySeek
int sendLivePlaySeek(java.io.OutputStream out, String name, long timecode)
Send onStatus(NetStream.Seek.Notify) event- Parameters:
out
- OutputStreamname
- stream nametimecode
- timecode- Returns:
- bytes sent to client
-
sendPlayReset
int sendPlayReset(String name)
Send onStatus(NetStream.Play.Reset) event- Parameters:
name
- stream name- Returns:
- bytes sent to client
-
sendPlayReset
int sendPlayReset(java.io.OutputStream out, String name)
Send onStatus(NetStream.Play.Reset) event. Send directly to OutputStream.- Parameters:
out
- OutputStreamname
- stream name- Returns:
- bytes sent to client
-
sendPlayStop
int sendPlayStop(long location, String name)
Send onStatus(NetStream.Play.Stop) event- Parameters:
location
- timecode where play stoppedname
- stream name- Returns:
- bytes sent to client
-
sendPlayStop
int sendPlayStop(java.io.OutputStream out, long location, String name)
Send onStatus(NetStream.Play.Stop) event. Send directly to OutputStream- Parameters:
out
- OutputStreamlocation
- timecode where play stoppedname
- stream name- Returns:
- bytes sent to client
-
sendPlaySeek
int sendPlaySeek(java.io.OutputStream out, long location, long seekLocation, String name, java.util.List<Integer> seekTypes)
Send onStatus(NetStream.Seek.Notify) event.- Parameters:
out
- OutputStreamlocation
- request location of seekseekLocation
- result location of seekname
- stream nameseekTypes
- list of commands to respond to (seek, unpause, play)- Returns:
- bytes sent to client
-
sendPlaySeek
int sendPlaySeek(long location, long seekLocation, String name)
Send onStatus(NetStream.Seek.Notify) event.- Parameters:
location
- request location of seekseekLocation
- result location of seekname
- stream name- Returns:
- bytes sent to client
-
sendPlaySeek
int sendPlaySeek(java.io.OutputStream out, long location, long seekLocation, String name)
Send onStatus(NetStream.Seek.Notify) event. Send directly to OutputStream- Parameters:
out
- OutputStreamlocation
- request location of seekseekLocation
- result location of seekname
- stream name- Returns:
- bytes sent to client
-
sendPlayStart
int sendPlayStart(String name, long timecode)
Send onStatus(NetStream.Play.Start) event- Parameters:
name
- stream name- Returns:
- bytes sent to client
-
sendPlaySwitch
int sendPlaySwitch(String name, long timecode)
Send onStatus(NetStream.Play.Start) event (it is not a typo, this also send play start but with different control codes for media switch).- Parameters:
name
- stream nametimecode
- timecode of event- Returns:
- bytes sent to client
-
sendPlaySwitch
int sendPlaySwitch(java.io.OutputStream out, String name, boolean isSwitch, long timecode)
Send onStatus(NetStream.Play.Start) event (it is not a typo, this also send play start but with different control codes for media switch). Send directly to OutputStream- Parameters:
out
- OutputStreamname
- stream nameisSwitch
- is this a switch or a starttimecode
- timecode of event- Returns:
- bytes sent to client
-
sendPlayStart
int sendPlayStart(java.io.OutputStream out, String name, boolean isSwitch, boolean isLive, long timecode, java.util.List<Integer> seekTypes)
Send onStatus(NetStream.Play.Start) event (it is not a typo, this also send play start but with different control codes for media switch). Send directly to OutputStream- Parameters:
out
- OutputStreamname
- stream nameisSwitch
- is this a switch or a startisLive
- is the stream livetimecode
- timecode of eventseekTypes
- commands to respond to (seek, unpause, play)
-
sendPlayStart
int sendPlayStart(java.io.OutputStream out, String name, boolean isSwitch, long timecode, java.util.List<Integer> seekTypes)
Send onStatus(NetStream.Play.Start) event (it is not a typo, this also send play start but with different control codes for media switch). Send directly to OutputStream- Parameters:
out
- OutputStreamname
- stream nameisSwitch
- is this a switch or a starttimecode
- timecode of eventseekTypes
- commands to respond to (seek, unpause, play)- Returns:
- bytes sent to client
-
sendPlayStart
int sendPlayStart(java.io.OutputStream out, String name, boolean isSwitch, long timecode)
Send onStatus(NetStream.Play.Start) event (it is not a typo, this also send play start but with different control codes for media switch). Send directly to OutputStream- Parameters:
out
- OutputStreamname
- stream nameisSwitch
- is this a switch or a starttimecode
- timecode of event- Returns:
- bytes sent to client
-
sendPlayStatus
int sendPlayStatus(long timecode, int statusType, double duration, double bytesSent)
Send onPlayStatus(NetStream.Play.Switch, NetStream.Play.Complete, NetStream.Play.Stop) event- Parameters:
timecode
- timecode of eventstatusType
- status type IMediaStreamPlay.PLAYSTATUSTYPE_*duration
- (not used)bytesSent
- (not used)- Returns:
- bytes sent to client
-
sendPlayStatus
int sendPlayStatus(java.io.OutputStream out, long timecode, int statusType, double duration, double bytesSent)
Send onPlayStatus(NetStream.Play.Switch, NetStream.Play.Complete, NetStream.Play.Stop) event. Send directly to OutputStream.- Parameters:
out
- OutputStreamtimecode
- timecode of eventstatusType
- status type IMediaStreamPlay.PLAYSTATUSTYPE_*duration
- (not used)bytesSent
- (not used)- Returns:
- bytes sent to client
-
sendPauseNotify
int sendPauseNotify(long timecode, String name)
Send onStatus(NetStream.Pause.Notify) event- Parameters:
timecode
- timecode of eventname
- stream name- Returns:
- bytes sent to client
-
sendPauseNotify
int sendPauseNotify(java.io.OutputStream out, long timecode, String name)
Send onStatus(NetStream.Pause.Notify) event. Send directly to OutputStream.- Parameters:
out
- OutputStreamtimecode
- timecode of eventname
- stream name- Returns:
- bytes sent to client
-
sendUnpauseNotify
int sendUnpauseNotify(java.io.OutputStream out, long location, String name, java.util.List<Integer> seekTypes)
Send onStatus(NetStream.Unpause.Notify) event- Parameters:
out
- OutputStreamlocation
- timecode of eventname
- stream nameseekTypes
- list of operations to respond to (seek, play, unpause)- Returns:
- bytes sent to client
-
sendUnpauseNotify
int sendUnpauseNotify(long location, String name)
Send onStatus(NetStream.Unpause.Notify) event- Parameters:
location
- timecode of eventname
- stream name- Returns:
- bytes sent to client
-
sendUnpauseNotify
int sendUnpauseNotify(java.io.OutputStream out, long location, String name)
Send onStatus(NetStream.Unpause.Notify) event. Send directly to OutputStream.- Parameters:
out
- OutputStreamlocation
- timecode of eventname
- stream name- Returns:
- bytes sent to client
-
isAppend
boolean isAppend()
Is append to media file (only valid if isRecord)- Returns:
- is appending or rewriting media file
-
setAppend
void setAppend(boolean isAppend)
Set is append to media file (only valid if isRecord)- Parameters:
isAppend
- is appending or rewriting media file
-
setPlayer
void setPlayer(IMediaStreamPlay player)
Set underlying player (IMediaStreamPlay) object- Parameters:
player
- underlying player (IMediaStreamPlay) object
-
getPlayer
IMediaStreamPlay getPlayer()
Get underlying player (IMediaStreamPlay) object- Returns:
- underlying player (IMediaStreamPlay) object
-
getAudioMissing
int getAudioMissing()
Get number of audio bytes missing from current audio packet- Returns:
- number of bytes missing
-
getVideoMissing
int getVideoMissing()
Get number of video bytes missing from current video packet- Returns:
- number of bytes missing
-
getDataMissing
int getDataMissing()
Get number of data bytes missing from current data packet- Returns:
- number of bytes missing
-
addVideoData
void addVideoData(byte[] data, int offset, int size)
Add data to current video packet- Parameters:
data
- byte arrayoffset
- offset in byte arraysize
- size of data to add
-
addAudioData
void addAudioData(byte[] data, int offset, int size)
Add data to current audio packet- Parameters:
data
- byte arrayoffset
- offset in byte arraysize
- size of data to add
-
addDataData
void addDataData(byte[] data, int offset, int size)
Add data to current data packet- Parameters:
data
- byte arrayoffset
- offset in byte arraysize
- size of data to add
-
getProperties
WMSProperties getProperties()
Get mediaStream properties- Returns:
- properties
-
getPlayPackets
java.util.List<AMFPacket> getPlayPackets()
Get all available live packets- Returns:
- play packets
-
getMaxTimecode
long getMaxTimecode()
Get the timecode of the latest received packet- Returns:
- timecode of the latest received packet
-
getLastKeyFrame
AMFPacket getLastKeyFrame()
Get most recent video key frame- Returns:
- play packets
-
getLastPacket
AMFPacket getLastPacket()
Get most recent live packet- Returns:
- most recent live packet or null or no live packets
-
getStreamType
String getStreamType()
Get mediaStream streamType- Returns:
- streamType
-
setStreamType
void setStreamType(String streamType)
Set mediaStream streamType. This method will not change the type of the current stream.- Parameters:
streamType
-
-
sendDirectAMF3
void sendDirectAMF3(String handlerName, Object... params)
Call client side NetStream method/handler and send event to underlying stream (will record event). Force AMF3 encoding.- Parameters:
handlerName
- handler nameparams
- variable list of parameters. All parameters will be wrapped in AMFDataObj.
-
sendDirect
void sendDirect(String handlerName, Object... params)
Call client side NetStream method/handler and send event to underlying stream (will record event)- Parameters:
handlerName
- handler nameparams
- variable list of parameters. All parameters will be wrapped in AMFDataObj.
-
sendDirectAMF3
void sendDirectAMF3(String handlerName)
Call client side NetStream method/handler and send event to underlying stream (will record event). Force AMF3 encoding.- Parameters:
handlerName
- handler name
-
sendDirect
void sendDirect(String handlerName)
Call client side NetStream method/handler and send event to underlying stream (will record event)- Parameters:
handlerName
- handler name
-
sendAMF3
void sendAMF3(String handlerName, Object... params)
Call client side NetStream method/handler. Force AMF3 encoding.- Parameters:
handlerName
- handler nameparams
- variable list of parameters. All parameters will be wrapped in AMFDataObj.
-
send
void send(String handlerName, Object... params)
Call client side NetStream method/handler- Parameters:
handlerName
- handler nameparams
- variable list of parameters. All parameters will be wrapped in AMFDataObj.
-
sendAMF3
void sendAMF3(String handlerName)
Call client side NetStream method/handler with no parameters. Force AMF3 encoding.- Parameters:
handlerName
- handler name
-
send
void send(String handlerName)
Call client side NetStream method/handler with no parameters- Parameters:
handlerName
- handler name
-
close
void close()
Close mediaStream
-
isOpen
boolean isOpen()
Is mediaStream open- Returns:
- is mediaStream open
-
setOpen
void setOpen(boolean isOpen)
Set mediaStream open- Parameters:
isOpen
- mediaStream open
-
getFastPlaySettings
com.wowza.wms.stream.FastPlaySettings getFastPlaySettings()
Get current fastPlay settings- Returns:
- fastPlay settings
-
setFastPlaySettings
void setFastPlaySettings(com.wowza.wms.stream.FastPlaySettings fastPlaySettings)
Set fastPlay settings- Parameters:
fastPlaySettings
- fastPlay settings
-
clearFastPlaySettings
void clearFastPlaySettings()
Clear fastPlay settings
-
isReceiveAudio
boolean isReceiveAudio()
Is client currently receiving audio. Controlled by client side call receiveAudio.- Returns:
- receive audio
-
setReceiveAudio
void setReceiveAudio(boolean receiveAudio)
Set receive audio- Parameters:
receiveAudio
- receive audio
-
isReceiveVideo
boolean isReceiveVideo()
Is client currently receiving video. Controlled by client side call receiveVideo- Returns:
- receive video
-
setReceiveVideo
void setReceiveVideo(boolean receiveVideo)
Set receive video- Parameters:
receiveVideo
- receive video
-
getReceiveVideoFPS
int getReceiveVideoFPS()
Set frame per seconds for video (not currently implemented)- Returns:
- video frames per second
-
setReceiveVideoFPS
void setReceiveVideoFPS(int receiveVideoFPS)
Set frame per second for video (not currently implemented)- Parameters:
receiveVideoFPS
- video frames per second
-
getMediaIOPerformance
IOPerformanceCounter getMediaIOPerformance()
Get IO performance counter- Returns:
- IO performance counter
-
incrementMediaOutBytes
long incrementMediaOutBytes(long bytes, long count)
Increment the number of mediaStream bytes sent and number of packets sent- Parameters:
bytes
- number of bytes sentcount
- number of packets sent- Returns:
- total number of bytes sent (after increment)
-
incrementMediaLossBytes
long incrementMediaLossBytes(long bytes, long count)
Increment the number of mediaStream loss bytes sent and number of packets sent- Parameters:
bytes
- number of bytes sentcount
- number of packets sent- Returns:
- total number of bytes sent (after increment)
-
incrementMediaInBytes
long incrementMediaInBytes(long increment)
Increment the number of mediaStream bytes received- Parameters:
increment
- number of byte received- Returns:
- total number of bytes received (after increment)
-
publish
void publish()
Publish mediaStream
-
trim
void trim()
Trim mediaStream. This method will remove live packets that are older than the live buffer size.
-
handleCallback
void handleCallback(com.wowza.wms.request.RequestFunction function)
Routes request function to callback handler onStatus, onPlayStatus or [method/handler]- Parameters:
function
- request function
-
unregisterCallback
void unregisterCallback(String handlerName)
Unregister a callback handler- Parameters:
handlerName
- handler name
-
registerCallback
void registerCallback(String handlerName, IMediaStreamCallback callback)
Register a callback handler- Parameters:
handlerName
- handler namecallback
- callback object
-
unregisterOnStatus
void unregisterOnStatus(IMediaStreamCallback callback)
Unregister onStatus handler- Parameters:
callback
-
-
registerOnStatus
void registerOnStatus(IMediaStreamCallback callback)
Register onStatus handler- Parameters:
callback
- callback object
-
unregisterOnPlayStatus
void unregisterOnPlayStatus(IMediaStreamCallback callback)
Unregister onPlayStatus handler- Parameters:
callback
- callback object
-
registerOnPlayStatus
void registerOnPlayStatus(IMediaStreamCallback callback)
Register onPlayStatus handler- Parameters:
callback
- callback object
-
addClientListener
void addClientListener(IMediaStreamActionNotify actionListener)
Add client listener. Listens for (onPlay, onPublish, onPause, onSeek, onStop)- Parameters:
actionListener
- listener
-
addClientListener
void addClientListener(IMediaStreamActionNotify2 actionListener)
Add client listener. Listens for (onPlay, onPublish, onPause, onSeek, onStop)- Parameters:
actionListener
- listener
-
addClientListener
void addClientListener(IMediaStreamActionNotify3 actionListener)
Add client listener. Listens for (onPlay, onPublish, onPause, onSeek, onStop)- Parameters:
actionListener
- listener
-
removeClientListener
void removeClientListener(IMediaStreamActionNotify actionListener)
Remove client listener. Listens for (onPlay, onPublish, onPause, onSeek, onStop)- Parameters:
actionListener
- listener
-
removeClientListener
void removeClientListener(IMediaStreamActionNotify2 actionListener)
Remove client listener. Listens for (onPlay, onPublish, onPause, onSeek, onStop)- Parameters:
actionListener
- listener
-
removeClientListener
void removeClientListener(IMediaStreamActionNotify3 actionListener)
Remove client listener. Listens for (onPlay, onPublish, onPause, onSeek, onStop)- Parameters:
actionListener
- listener
-
notifyActionPlay
void notifyActionPlay(String streamName, double playStart, double playLen, int playReset)
Notify client listeners of play action- Parameters:
streamName
- stream nameplayStart
- play startplayLen
- play lengthplayReset
- play reset
-
notifyActionPauseRaw
void notifyActionPauseRaw(boolean isPause, long location)
Notify client listeners of pauseRaw action- Parameters:
isPause
- is pause or unpauselocation
- timecode (milliseconds) of action
-
notifyActionPause
void notifyActionPause(boolean isPause, long location)
Notify client listeners of pause action- Parameters:
isPause
- is pause or unpauselocation
- timecode (milliseconds) of action
-
notifyActionSeek
void notifyActionSeek(double location)
Notify client listeners of seek action- Parameters:
location
- timecode (milliseconds) of seek request
-
notifyActionPublish
void notifyActionPublish(String streamName, boolean isRecord, boolean isAppend)
Notify client listeners of publish action- Parameters:
streamName
- stream nameisRecord
- is record or liveisAppend
- is append if isRecord is true
-
notifyActionUnPublish
void notifyActionUnPublish(String streamName, boolean isRecord, boolean isAppend)
Notify client listeners of unpublish action- Parameters:
streamName
- stream nameisRecord
- is record or liveisAppend
- is append if isRecord is true
-
notifyActionOnMetaData
void notifyActionOnMetaData(AMFPacket metaDataPacket)
Notify client listeners of onMetaData change- Parameters:
metaDataPacket
- metaDataPacket
-
notifyActionOnCodecInfoVideo
void notifyActionOnCodecInfoVideo(com.wowza.wms.media.model.MediaCodecInfoVideo codecInfoVideo)
Notify client listeners of video codec information change- Parameters:
codecInfoVideo
- video codec information
-
notifyActionOnCodecInfoAudio
void notifyActionOnCodecInfoAudio(com.wowza.wms.media.model.MediaCodecInfoAudio codecInfoAudio)
Notify client listeners of audio codec information change- Parameters:
codecInfoAudio
- audio codec information
-
notifyActionStop
void notifyActionStop()
Notify client listeners of stop action
-
isClustered
boolean isClustered()
not used- Returns:
- isClustered
-
setClustered
void setClustered(boolean isClustered)
not used- Parameters:
isClustered
-
-
getCacheName
String getCacheName()
not used- Returns:
- cache name
-
startPublishing
void startPublishing()
Start publishing live stream
-
stopPublishing
void stopPublishing()
Stop publishing live stream
-
getStreamFileForWrite
java.io.File getStreamFileForWrite()
Get the File object to write to a stream (get stream name, ext and query from stream object)- Returns:
- resultant File object
-
getStreamFileForWrite
java.io.File getStreamFileForWrite(String name, String ext, String query)
Get the File object to write to a stream (specify name, ext and query)- Parameters:
name
- stream nameext
- stream prefix (Ex. mp4:)query
- query part of stream name (Ex. mystream?param1=value1)- Returns:
- resultant File object
-
getStreamFileForRead
java.io.File getStreamFileForRead()
Get the File object to read from a stream (get stream name, ext and query from stream object)- Returns:
- resultant File object
-
getStreamFileForRead
java.io.File getStreamFileForRead(String name, String ext, String query)
Get the File object to read from a stream (specify name, ext and query)- Parameters:
name
- stream nameext
- stream prefix (Ex. mp4:)query
- query part of stream name (Ex. mystream?param1=value1)- Returns:
- resultant File object
-
sendControlBytes
int sendControlBytes(int controlType, java.io.OutputStream out)
Send playback control bytes. Valid values are (0, 1, 4)- Parameters:
controlType
- control types (0, 1, 4)out
- OutputStream- Returns:
- bytes sent to client
-
getBurstStartStop
byte[] getBurstStartStop(boolean isStart)
Get the dynamic streaming burst start/stop AMF packet- Parameters:
isStart
- is start- Returns:
- byte array with AMF packet
-
getRespAMFAudioObj
AMFObj getRespAMFAudioObj()
Get audio response channel object- Returns:
- audio response channel object
-
getRespAMFVideoObj
AMFObj getRespAMFVideoObj()
Get video response channel object- Returns:
- video response channel object
-
getRespAMFDataObj
AMFObj getRespAMFDataObj()
Get data response channel object- Returns:
- data response channel object
-
getQueryStr
String getQueryStr()
Get play/publish name query string. Example: if play name is flv:test?param1=data1¶m2=data2, query string is "param1=data1¶m2=data2".- Returns:
- query string
-
setQueryStr
void setQueryStr(String queryStr)
Set play/publish name query string. Example: if play name is flv:test?param1=data1¶m2=data2, query string is "param1=data1¶m2=data2".- Parameters:
queryStr
-
-
updateLoggingDuration
void updateLoggingDuration()
Update logging.MDC with mediaStream logging information
-
updateLoggingValues
void updateLoggingValues()
Update logging.MDC with mediaStream logging information
-
clearLoggingValues
void clearLoggingValues()
-
length
double length()
Get length/duration (seconds) of media file pointed to by mediaStream- Returns:
- length (seconds)
-
size
long size()
Get size (bytes) of media file pointed to by mediaStream- Returns:
- size (bytes)
-
getExt
String getExt()
Get media file extension- Returns:
- media file extension
-
setExt
void setExt(String ext)
Set media file extension- Parameters:
ext
-
-
clear
void clear()
Delete media file pointed to by this mediaStream (be careful)
-
isSendPlayStopLogEvent
boolean isSendPlayStopLogEvent()
Get need to send a log event for stop- Returns:
- need to send a log event for stop
-
setSendPlayStopLogEvent
void setSendPlayStopLogEvent(boolean sendPlayStopLogEvent)
Set need to send a log event for stop- Parameters:
sendPlayStopLogEvent
- need to send a log event for stop
-
isSendRecordStopLogEvent
boolean isSendRecordStopLogEvent()
Get need to send a log event for recording- Returns:
- need to send a log event for stop
-
setSendRecordStopLogEvent
void setSendRecordStopLogEvent(boolean sendPlayStopLogEvent)
Set need to send a log event for recording- Parameters:
sendPlayStopLogEvent
- need to send a log event for stop
-
isSendPublishStopLogEvent
boolean isSendPublishStopLogEvent()
Get need to send a log event for publishing- Returns:
- need to send a log event for stop
-
setSendPublishStopLogEvent
void setSendPublishStopLogEvent(boolean sendPlayStopLogEvent)
Set need to send a log event for publishing- Parameters:
sendPlayStopLogEvent
- need to send a log event for stop
-
getAccess
boolean[] getAccess(IClient client, String name)
Get the read/write access to this stream for this client- Parameters:
client
- clientname
- stream name- Returns:
- array of booleans read[0], write[1]
-
getMetaDataProvider
IMediaStreamMetaDataProvider getMetaDataProvider()
Get the metaData provider- Returns:
- metaData provider
-
setMetaDataProvider
void setMetaDataProvider(IMediaStreamMetaDataProvider metaDataProvider)
Set the metaData provider- Parameters:
metaDataProvider
- metaData provider
-
getHeaderSize
int getHeaderSize()
Get the last packet header size (debugging)- Returns:
- last packet header size
-
setHeaderSize
void setHeaderSize(int headerSize)
Set the last packet header size (debugging)- Parameters:
headerSize
- last packet header size
-
getAudioCodecConfigPacket
AMFPacket getAudioCodecConfigPacket(long timecode)
Get audio codec configuration packet (needed for H.264/AAC playback)- Parameters:
timecode
- timecode of the packet to which you want to get the codec config information- Returns:
- audio codec configuration packet (needed for H.264/AAC playback)
-
addAudioCodecConfigPacket
void addAudioCodecConfigPacket(long timecode, AMFPacket packet)
Set audio codec configuration packet (needed for H.264/AAC playback)- Parameters:
timecode
- timecode in milliseconds of first packet that uses this timecodepacket
- audio codec configuration packet (needed for H.264/AAC playback)
-
getVideoCodecConfigPacket
AMFPacket getVideoCodecConfigPacket(long timecode)
Get video codec configuration packet (needed for H.264/AAC playback)- Parameters:
timecode
- timecode of the packet to which you want to get the codec config information- Returns:
- video codec configuration packet (needed for H.264/AAC playback)
-
addVideoCodecConfigPacket
void addVideoCodecConfigPacket(long timecode, AMFPacket packet)
Set video codec configuration packet (needed for H.264/AAC playback)- Parameters:
timecode
- timecode in milliseconds of first packet that uses this timecodepacket
- video codec configuration packet (needed for H.264/AAC playback)
-
getRTPStream
RTPStream getRTPStream()
Get the RTP based stream this stream is associated with- Returns:
- RTP based stream this stream is associated with
-
setRTPStream
void setRTPStream(RTPStream rtpStream)
Set the RTP based stream this stream is associated with- Parameters:
rtpStream
- RTP based stream this stream is associated with
-
flush
void flush()
Force publishing packets to be flushed from the input buffers to the output buffers
-
startAudioPacket
void startAudioPacket()
Called when an audio packet is first being populated with data
-
startVideoPacket
void startVideoPacket()
Called when a video packet is first being populated with data
-
startDataPacket
void startDataPacket()
Called when a data packet is first being populated with data
-
getLiveStreamPacketizerList
String getLiveStreamPacketizerList()
Get the comma separated list of LiveStreamPacketizers names being used by this stream (see conf/LiveStreamPacketizers.xml)- Returns:
- comma separated list of LiveStreamPacketizers names
-
setLiveStreamPacketizerList
void setLiveStreamPacketizerList(String liveStreamPacketizerList)
Set the comma separated list of LiveStreamPacketizers names being used by this stream (see conf/LiveStreamPacketizers.xml)- Parameters:
liveStreamPacketizerList
- comma separated list of LiveStreamPacketizers names
-
getLiveStreamTranscoderList
String getLiveStreamTranscoderList()
Get the comma separated list of LiveStreamTranscoders names being used by this stream (see conf/LiveStreamTranscoders.xml)- Returns:
- comma separated list of LiveStreamTranscoders names
-
setLiveStreamTranscoderList
void setLiveStreamTranscoderList(String liveStreamTranscoderList)
Set the comma separated list of LiveStreamTranscoders names being used by this stream (see conf/LiveStreamTranscoders.xml)- Parameters:
liveStreamTranscoderList
- comma separated list of LiveStreamTranscoders names
-
getLiveStreamPacketizer
ILiveStreamPacketizer getLiveStreamPacketizer(String name)
Get the LiveStreamPacketizer interface to a stream by name- Parameters:
name
- LiveStreamPacketizer name- Returns:
- LiveStreamPacketizer interface
-
getDvrRecorderList
String getDvrRecorderList()
Get the comma separated list of DVR Recorder names being used by this stream (see conf/Dvr.xml)- Returns:
- comma separated list of DVR Recorder names
-
setDvrRecorderList
void setDvrRecorderList(String recorderList)
Set the comma separated list of DVR Recorder names being used by this stream (see conf/Dvr.xml)- Parameters:
recorderList
- comma separated list of DVR Recorder names
-
getDvrRecorder
ILiveStreamDvrRecorder getDvrRecorder(String name)
Get the DVR Recorder interface to a stream by name- Parameters:
name
- DVR Recorder name- Returns:
- DVR Recorder interface
-
getUniqueStreamIdStr
String getUniqueStreamIdStr()
Get a string that uniquely identifies this stream- Returns:
- unique stream identifier
-
getHTTPStreamerSession
IHTTPStreamerSession getHTTPStreamerSession()
Get the HTTPStreamer session associated with this stream- Returns:
- HTTPStreamer session associated with this stream
-
setHTTPStreamerSession
void setHTTPStreamerSession(IHTTPStreamerSession httpStreamerSession)
Set the HTTPStreamer session associated with this stream- Parameters:
httpStreamerSession
- HTTPStreamer session associated with this stream
-
getElapsedTime
ElapsedTimer getElapsedTime()
Get the interface to the elapse timer- Returns:
- interface to the elapse timer
-
getLiveStreamPacketizer
String getLiveStreamPacketizer()
Get the live stream packetizer that this stream is using- Returns:
- live stream packetizer
-
setLiveStreamPacketizer
void setLiveStreamPacketizer(String liveStreamPacketizer)
Set the live stream packetizer that this stream is using- Parameters:
liveStreamPacketizer
- live stream packetizer
-
getLiveStreamRepeater
String getLiveStreamRepeater()
Get the live stream repeater name for the stream- Returns:
- live stream repeater name
-
setLiveStreamRepeater
void setLiveStreamRepeater(String liveStreamRepeater)
Set the live stream repeater name for the stream- Parameters:
liveStreamRepeater
- live stream repeater name
-
initLiveStreamRepeating
void initLiveStreamRepeating(String liveStreamPacketizer, String liveStreamRepeater)
Initialize this stream for live stream repeating- Parameters:
liveStreamPacketizer
- live stream packetizerliveStreamRepeater
- live stream repeater name
-
getPublishVideoCodecId
int getPublishVideoCodecId()
Get the codec id of the most recently published video packet- Returns:
- codec id of the most recently published video packet
-
setPublishVideoCodecId
void setPublishVideoCodecId(int publishVideoCodecId)
Set the codec id of the most recently published video packet- Parameters:
publishVideoCodecId
- codec id of the most recently published video packet
-
getPublishAudioCodecId
int getPublishAudioCodecId()
Get the codec id of the most recently published audio packet- Returns:
- codec id of the most recently published audio packet
-
setPublishAudioCodecId
void setPublishAudioCodecId(int publishAudioCodecId)
Set the codec id of the most recently published audio packet- Parameters:
publishAudioCodecId
- codec id of the most recently published audio packet
-
isPublishStreamReady
boolean isPublishStreamReady(boolean checkAudio, boolean checkVideo)
Returns true if the publishing stream contains enough video/audio data to start playback- Parameters:
checkAudio
- check audio streamcheckVideo
- check video stream- Returns:
- true if the publishing stream contains enough video/audio data to start playback
-
getContextStr
String getContextStr()
Returns the stream context string in the form [application]/[appInstance]/[streamName].- Returns:
- stream context string
-
isMediaCasterPlay
boolean isMediaCasterPlay()
Is MediaCaster play enabled (if true, will trigger MediaCaster startup)- Returns:
- true if MediaCaster play enabled
-
setMediaCasterPlay
void setMediaCasterPlay(boolean isMediaCasterPlay)
Is MediaCaster play enabled (if true, will trigger MediaCaster startup)- Parameters:
isMediaCasterPlay
- true if MediaCaster play enabled
-
isMergeOnMetadata
boolean isMergeOnMetadata()
If true, merge incoming onMetadata events with the current onMetdata event data. If false, replace.- Returns:
- true, merge incoming onMetadata events with the current onMetdata event data. If false, replace.
-
setMergeOnMetadata
void setMergeOnMetadata(boolean mergeOnMetadata)
If true, merge incoming onMetadata events with the current onMetdata event data. If false, replace.- Parameters:
mergeOnMetadata
- true, merge incoming onMetadata events with the current onMetdata event data. If false, replace.
-
getDvrRecorder
String getDvrRecorder()
Get the DVR Recorder for this stream- Returns:
- DVR Recorder
-
getDvrRepeater
String getDvrRepeater()
Get the DVR repeater name for this stream- Returns:
- repeater name
-
setDvrRecorder
void setDvrRecorder(String recorderName)
Set the DVR Recorder that this stream is using- Parameters:
recorderName
- DVR Recorder
-
removeDvrRecorder
ILiveStreamDvrRecorder removeDvrRecorder(String name)
Remove a live stream dvr by name- Parameters:
name
- dvr name- Returns:
- live stream dvr
-
putDvrRecorder
void putDvrRecorder(String name, ILiveStreamDvrRecorder dvr)
Add a live stream dvr to this stream- Parameters:
name
- dvr namedvr
- live stream dvr
-
getLiveStreamTranscoders
java.util.Map<String,ILiveStreamTranscoder> getLiveStreamTranscoders()
Get the list of transcoders for this stream.- Returns:
- list of transcoders for this stream
-
getLiveStreamTranscoder
ILiveStreamTranscoder getLiveStreamTranscoder(String name)
Get a live stream transcoder for this stream by name- Parameters:
name
- transcoder name- Returns:
- live stream transcoder
-
removeLiveStreamTranscoder
ILiveStreamTranscoder removeLiveStreamTranscoder(String name)
Remove a live stream transcoder by name- Parameters:
name
- transcoder name- Returns:
- live stream transcoder
-
putLiveStreamTranscoder
void putLiveStreamTranscoder(String name, ILiveStreamTranscoder liveStreamTranscoder)
Add a live stream transcoder to this stream- Parameters:
name
- transcoder nameliveStreamTranscoder
- live stream transcoder
-
isTranscodeResult
boolean isTranscodeResult()
Is this stream the result of a transcode operation.- Returns:
- true if stream the result of a transcode operation
-
getTranscoderSessionDestination
com.wowza.wms.transcoder.model.TranscoderSessionDestination getTranscoderSessionDestination()
If stream is result of transcode get the transcoder stream session for this stream.- Returns:
- transcoder stream session
-
setTranscodeResult
void setTranscodeResult(boolean isTranscodeResult)
Is this stream the result of a transcode operation.- Parameters:
isTranscodeResult
- true if stream the result of a transcode operation
-
addVideoH264SEIListener
void addVideoH264SEIListener(IMediaStreamH264SEINotify h264SEIListener)
Add an H.264 SEI listener. This listener will be notified of all incoming H.264 video packets and has the ability to read and/or modify SEI section of the video frame.- Parameters:
h264SEIListener
- H.264 SEI listener
-
removeVideoH264SEIListener
void removeVideoH264SEIListener(IMediaStreamH264SEINotify h264SEIListener)
Remove an H.264 SEI listener. This listener will be notified of all incoming H.264 video packets and has the ability to read and/or modify SEI section of the video frame.- Parameters:
h264SEIListener
- H.264 SEI listener
-
isVideoH264SEIListenerEmpty
boolean isVideoH264SEIListenerEmpty()
Is H.264 SEI listener list empty. This listener will be notified of all incoming H.264 video packets and has the ability to read and/or modify SEI section of the video frame.- Returns:
- true if H.264 SEI listener list empty
-
notifyVideoH264Packet
void notifyVideoH264Packet(AMFPacket packet, com.wowza.wms.media.h264.H264SEIMessages seiMessages)
Notify H.264 SEI listener.- Parameters:
packet
- AMF PacketseiMessages
- seiMessages
-
addCalbackListener
void addCalbackListener(IMediaStreamCallback callbackListener)
Add a callback listener to listen for all stream metadata- Parameters:
callbackListener
-
-
removeCalbackListener
void removeCalbackListener(IMediaStreamCallback callbackListener)
Remove a callback listener to listen for all stream metadata- Parameters:
callbackListener
-
-
addLivePacketListener
void addLivePacketListener(IMediaStreamLivePacketNotify listener)
Add a listener to receiver notification of new live AMF packets- Parameters:
listener
- listener
-
removeLivePacketListener
void removeLivePacketListener(IMediaStreamLivePacketNotify listener)
Remove a listener to receiver notification of new live AMF packets- Parameters:
listener
- listener
-
notifyLivePacket
void notifyLivePacket(AMFPacket packet)
Notify new live AMF packet- Parameters:
packet
- new live AMF packet
-
isPublisherStream
boolean isPublisherStream()
Returns true if stream was created by stream publisher API.- Returns:
- true if stream was created by stream publisher API
-
setPublisherStream
void setPublisherStream(boolean isPublisherStream)
Set stream was created by stream publisher.- Parameters:
isPublisherStream
- true if stream was created by stream publisher API
-
getPublishFrameCounts
long getPublishFrameCounts(long[] counts)
Get the total number of frames received for an incoming live stream. See PACKET_COUNTS_* for the index into the array. The array passed in should be PACKET_COUNTS_SIZE.- Returns:
- total total number of frames received (audio + video + data)
-
getPublishFrameCountVideoKey
long getPublishFrameCountVideoKey()
Get the total number of video key frames received for an incoming live stream.- Returns:
- total number of video key frames received
-
getPublishFrameCountVideo
long getPublishFrameCountVideo()
Get the total number of video frames received for an incoming live stream.- Returns:
- total number of video frames received
-
getPublishFrameCountAudio
long getPublishFrameCountAudio()
Get the total number of audio frames received for an incoming live stream.- Returns:
- total number of audio frames received
-
getPublishFrameCountData
long getPublishFrameCountData()
Get the total number of data frames received for an incoming live stream.- Returns:
- total number of data frames received
-
getPublishBitrateVideo
int getPublishBitrateVideo()
Get the video bitrate of an incoming live published stream (bits per second). Value of -1 indicates still measuring bandwidth. Value of 0 indicates the stream does not contain video.- Returns:
- video bitrate of an incoming live published stream (bits per second)
-
getPublishFramerateVideo
double getPublishFramerateVideo()
Get the video framerate of an incoming live published stream (frames per second). Value of -1 indicates still measuring bandwidth. Value of 0 indicates the stream does not contain video.- Returns:
- video framerate
-
getPublishKeyFrameIntervalsVideo
int[] getPublishKeyFrameIntervalsVideo()
Get the last n key frame intervals for an incoming publish stream (frames per GOP), Most recent GOPs are first in the list. -1 indicates the end of the list.- Returns:
- last n key frame intervals for an incoming publish stream (frames per GOP)
-
getPublishBitrateAudio
int getPublishBitrateAudio()
Get the audio bitrate of an incoming live published stream (bits per second). Value of -1 indicates still measuring bandwidth. Value of 0 indicates the stream does not contain audio.- Returns:
- audio bitrate of an incoming live published stream (bits per second)
-
getPublishBitrateVideo
int getPublishBitrateVideo(int source)
Get the video bitrate of an incoming live published stream (bits per second). Value of -1 indicates still measuring bandwidth. Value of 0 indicates the stream does not contain video.- Parameters:
source
- source of bitrate (see IMediaStream.PUBLISH_BITRATE_SOURCE_*)- Returns:
- video bitrate of an incoming live published stream (bits per second)
-
getPublishFramerateVideo
double getPublishFramerateVideo(int source)
Get the video framerate of an incoming live published stream (frames per second). Value of -1 indicates still measuring bandwidth. Value of 0 indicates the stream does not contain video.- Parameters:
source
- source of framerate (see IMediaStream.PUBLISH_FRAMERATE_SOURCE_*)- Returns:
- video frame rate
-
getPublishBitrateAudio
int getPublishBitrateAudio(int source)
Get the audio bitrate of an incoming live published stream (bits per second). Value of -1 indicates still measuring bandwidth. Value of 0 indicates the stream does not contain audio.- Parameters:
source
- source of bitrate (see IMediaStream.PUBLISH_BITRATE_SOURCE_*)- Returns:
- audio bitrate of an incoming live published stream (bits per second)
-
getTranscoderEncoderStreamInfo
com.wowza.wms.transcoder.encoder.TranscoderEncoderStreamInfo getTranscoderEncoderStreamInfo()
Get the transcoder encoder context information for this stream. This object will be available if this stream is an encoder stream root.- Returns:
- transcoder encoder context information
-
setTranscoderEncoderStreamInfo
void setTranscoderEncoderStreamInfo(com.wowza.wms.transcoder.encoder.TranscoderEncoderStreamInfo transcoderEncoderStreamInfo)
Set the transcoder encoder context information for this stream. This object will be available if this stream is an encoder stream root.- Parameters:
transcoderEncoderStreamInfo
- transcoder encoder context information
-
isTranscoderEncoderStreamRoot
boolean isTranscoderEncoderStreamRoot()
True if this stream object is a transcoder encoder stream root.- Returns:
- True if this stream object is a transcoder encoder stream root
-
setIsWebRTC
void setIsWebRTC(boolean isWebRTC)
-
getIsWebRTC
boolean getIsWebRTC()
-
setIsSRT
default void setIsSRT(boolean isSRT)
-
getIsSRT
default boolean getIsSRT()
-
-