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
static int AUDIOSAMPLEACCESS
           
static int READACCESS
           
static int VIDEOSAMPLEACCESS
           
static int WRITEACCESS
           
 
Method Summary
 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 curent audio packet
 void addClientListener(IMediaStreamActionNotify actionListener)
          Add client listener.
 void addClientListener(IMediaStreamActionNotify2 actionListener)
          Add client listener.
 void addDataData(byte[] data, int offset, int size)
          Add data to curent data packet
 void 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 curent video packet
 void clear()
          Delete media file pointed to by this mediaStream (be careful)
 void clearFastPlaySettings()
          Clear fastPlay settings
 void clearLoggingValues()
           
 void close()
          Close mediaStream
 void flush()
          Force publishing packets to be flushed from the input buffers to the output buffers
 boolean[] getAccess(IClient client, String name)
          Get the read/write access to this stream for this client
 AMFPacket 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 packet
 int getAudioSize()
          Get the size of the current audio packet that is being streamed from the client to the server
 long getAudioTC()
          Get last absolute audio timecode (milliseconds) sent to mediaStream
 int getBufferTime()
          Get buffer time for mediaStream (milliseconds)
 byte[] getBurstStartStop(boolean isStart)
          Get the dynamic streaming burst start/stop AMF packet
 String getCacheName()
          not used
 IClient getClient()
          Get parent client connection
 int 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 audio packet
 int getDataSize()
          Get the size of the current data packet that is being streamed from the client to the server
 long getDataTC()
          Get last absolute data timecode (milliseconds) sent to mediaStream
 int getDataType()
          Get the data packet type: (IVHost.CONTENTTYPE_DATA0 or IVHost.CONTENTTYPE_DATA3)
 ElapsedTimer getElapsedTime()
          Get the interface to the elapse timer
 String getExt()
          Get media file extension
 FastPlaySettings getFastPlaySettings()
          Get current fastPlay settings
 int getHeaderSize()
          Get the last packet header size (debugging)
 IHTTPStreamerSession getHTTPStreamerSession()
          Get the HTTPStreamer session associated with this stream
 AMFPacket getLastKeyFrame()
          Get most recent video key frame
 AMFPacket getLastPacket()
          Get most recent live packet
 String getLiveStreamPacketizer()
          Get the live stream packetizer that this stream is using
 ILiveStreamPacketizer getLiveStreamPacketizer(String name)
          Get the LiveStreamPacketizer interface to a stream by name
 String 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 stream
 long getMaxTimecode()
          Get the timecode of the latest received packet
 IOPerformanceCounter getMediaIOPerformance()
          Get IO performance counter
 IMediaStreamMetaDataProvider getMetaDataProvider()
          Get the metaData provider
 String getName()
          Get stream name
 com.wowza.wms.netconnection.INetConnection getNetConnection()
          Get parent netConnection (future server to server communication)
 IMediaStreamPlay getPlayer()
          Get underlying player (IMediaStreamPlay) object
 java.util.List<AMFPacket> getPlayPackets()
          Get all available live packets
 WMSProperties getProperties()
          Get mediaStream properties
 int getPublishAudioCodecId()
          Get the codec id of the most recently published audio packet
 int getPublishVideoCodecId()
          Get the codec id of the most recently published video packet
 String getQueryStr()
          Get play/publish name query string.
 int getReceiveVideoFPS()
          Set frame per seconds for video (not currently implemented)
 AMFObj getRespAMFAudioObj()
          Get audio response channel object
 AMFObj getRespAMFDataObj()
          Get data response channel object
 AMFObj getRespAMFVideoObj()
          Get video response channel object
 RTPStream getRTPStream()
          Get the RTP based stream this stream is associated with
 int getSrc()
          Get the stream id
 java.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 streamType
 String getUniqueStreamIdStr()
          Get a string that uniquely identifies this stream
 AMFPacket getVideoCodecConfigPacket(long timecode)
          Get video codec configuration packet (needed for H.264/AAC playback)
 int getVideoMissing()
          Get number of video bytes missing from current audio packet
 int getVideoSize()
          Get the size of the current video packet that is being streamed from the client to the server
 long getVideoTC()
          Get last absolute video timecode (milliseconds) sent to mediaStream
 void 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 received
 long incrementMediaLossBytes(long bytes, long count)
          Increment the number of mediaStream loss bytes sent and number of packets sent
 long incrementMediaOutBytes(long bytes, long count)
          Increment the number of mediaStream bytes sent and number of packets sent
 void 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 repeating
 boolean isAppend()
          Is append to media file (only valid if isRecord)
 boolean isClustered()
          not used
 boolean 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 open
 boolean isPlay()
          Is the stream a play stream (vs a publish stream)
 boolean isPlaying()
          Is mediaStream playing (or paused - false)
 boolean isPublishStreamReady(boolean checkAudio, boolean checkVideo)
          Returns true if the publishing stream contains enough video/audio data to start playback
 boolean isReceiveAudio()
          Is client currently receiving audio.
 boolean isReceiveVideo()
          Is client currently receiving video.
 boolean isRecord()
          Is this stream being recorded to a file
 boolean isSendPlayStopLogEvent()
          Get need to send a log event for stop
 boolean isSendPublishStopLogEvent()
          Get need to send a log event for publishing
 boolean isSendRecordStopLogEvent()
          Get need to send a log event for recording
 double length()
          Get length/duration (seconds) of media file pointed to by mediaStream
 void notifyActionOnMetaData(AMFPacket metaDataPacket)
          Notify client listeners of onMetaData change
 void notifyActionPause(boolean isPause, long location)
          Notify client listeners of pause action
 void notifyActionPauseRaw(boolean isPause, long location)
          Notify client listeners of pauseRaw action
 void notifyActionPlay(String streamName, double playStart, double playLen, int playReset)
          Notify client listeners of play action
 void notifyActionPublish(String streamName, boolean isRecord, boolean isAppend)
          Notify client listeners of publish action
 void notifyActionSeek(double location)
          Notify client listeners of seek action
 void notifyActionStop()
          Notify client listeners of stop action
 void notifyActionUnPublish(String streamName, boolean isRecord, boolean isAppend)
          Notify client listeners of unpublish action
 void packetComplete()
          Invoked by requestAdapter when at the end of a set of packets
 void publish()
          Publish mediaStream
 void registerCallback(String handlerName, IMediaStreamCallback callback)
          Register a callback handler
 void registerOnPlayStatus(IMediaStreamCallback callback)
          Register onPlayStatus handler
 void registerOnStatus(IMediaStreamCallback callback)
          Register onStatus handler
 void removeClientListener(IMediaStreamActionNotify actionListener)
          Remove client listener.
 void removeClientListener(IMediaStreamActionNotify2 actionListener)
          Remove client listener.
 void send(String handlerName)
          Call client side NetStream method/handler with no parameters
 void send(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)
 int sendLivePlaySeek(java.io.OutputStream out, String name, long timecode)
          Send onStatus(NetStream.Seek.Notify) event
 int sendLivePlayStart(java.io.OutputStream out, String name, long timecode, long timecodeOffset)
          Send onStatus(NetStream.Play.Start) event
 int sendLivePlaySwitch(java.io.OutputStream out, String name, long timecode)
          Send onStatus(NetStream.Play.Transition) event
 int sendPauseNotify(long timecode, String name)
          Send onStatus(NetStream.Pause.Notify) event
 int 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) event
 int 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) event
 int sendPlayStatus(long timecode, int statusType, double duration, double bytesSent)
          Send onPlayStatus(NetStream.Play.Switch, NetStream.Play.Complete, NetStream.Play.Stop) event
 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.
 int sendPlayStop(long location, String name)
          Send onStatus(NetStream.Play.Stop) event
 int 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) event
 int sendUnpauseNotify(long location, String name)
          Send onStatus(NetStream.Unpause.Notify) event
 int 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) event
 int sendVODPlaySwitch(java.io.OutputStream out, String name, long timecode)
          Send onStatus(NetStream.Play.Transition) event
 void 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 server
 void setAudioTC(long audioTC)
          Set last absolute audio timecode (milliseconds) sent to mediaStream
 void setAudioTC(long audioTC, boolean isAbsolute)
          Set last absolute audio timecode (milliseconds) sent to mediaStream
 void setBufferTime(int bufferTime)
          Set buffer time for mediaStream (milliseconds)
 void setClient(IClient client)
          Set parent client connection
 void setClustered(boolean isClustered)
          not used
 void setDataSize(int dataSize)
          Set the size of the current data packet that is being streamed from the client to the server
 void setDataTC(long dataTC)
          Set last absolute data timecode (milliseconds) sent to mediaStream
 void setDataTC(long dataTC, boolean isAbsolute)
          Set last absolute data timecode (milliseconds) sent to mediaStream
 void setDataType(int dataType)
          Set the data packet type: (IVHost.CONTENTTYPE_DATA0 or IVHost.CONTENTTYPE_DATA3)
 void setExt(String ext)
          Set media file extension
 void setFastPlaySettings(FastPlaySettings fastPlaySettings)
          Set fastPlay settings
 void setHeaderSize(int headerSize)
          Set the last packet header size (debugging)
 void setHTTPStreamerSession(IHTTPStreamerSession httpStreamerSession)
          Set the HTTPStreamer session associated with this stream
 void setIsPlaying(boolean isPlaying)
          Set is mediaStream playing
 void setLiveStreamPacketizer(String liveStreamPacketizer)
          Set the live stream packetizer that this stream is using
 void 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 stream
 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 provider
 void setName(String name)
          Set stream name
 void 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(com.wowza.wms.netconnection.INetConnection netConnection)
          Set parent netConnection (future server to server communication)
 void setOpen(boolean isOpen)
          Set mediaStream open
 void setPlay(boolean isPlay)
          Set is the stream a play stream (vs a publish stream)
 void setPlayer(IMediaStreamPlay player)
          Set underlying player (IMediaStreamPlay) object
 void setPublishAudioCodecId(int publishAudioCodecId)
          Set the codec id of the most recently published audio packet
 void setPublishVideoCodecId(int publishVideoCodecId)
          Set the codec id of the most recently published video packet
 void setQueryStr(String queryStr)
          Set play/publish name query string.
 void setReceiveAudio(boolean receiveAudio)
          Set receive audio
 void setReceiveVideo(boolean receiveVideo)
          Set receive video
 void setReceiveVideoFPS(int receiveVideoFPS)
          Set frame per second for video (not currently implemented)
 void setRecord(boolean isRecord)
          Set is the stream being recorded
 void setRTPStream(RTPStream rtpStream)
          Set the RTP based stream this stream is associated with
 void setSendPlayStopLogEvent(boolean sendPlayStopLogEvent)
          Set need to send a log event for stop
 void setSendPublishStopLogEvent(boolean sendPlayStopLogEvent)
          Set need to send a log event for publishing
 void setSendRecordStopLogEvent(boolean sendPlayStopLogEvent)
          Set need to send a log event for recording
 void setSrc(int src)
          Set stream id
 void setStreamType(String streamType)
          Set mediaStream streamType.
 void setVideoSize(int videoSize)
          Set the size of the current video packet that is being streamed from the client to the server
 void setVideoTC(long videoTC)
          Set last absolute video timecode (milliseconds) sent to mediaStream
 void setVideoTC(long videoTC, boolean isAbsolute)
          Set last absolute video timecode (milliseconds) sent to mediaStream
 void shutdown()
          shutdown or close this mediaStream
 long size()
          Get size (bytes) of media file pointed to by mediaStream
 void startAudioPacket()
          Called when an audio packet is first being populated with data
 void startDataPacket()
          Called when a data packet is first being populated with data
 void startPublishing()
          Start publishing live stream
 void startVideoPacket()
          Called when a video packet is first being populated with data
 void stopName(String name, String oldName, String ext, String queryStr, double playStart, double playLen, int playTransition)
          Stop stream name
 void stopPublishing()
          Stop publishing live stream
 void switchName(String name, String oldName, String ext, String queryStr, double playStart, double playLen, int playTransition)
          Switch to stream name
 void trim()
          Trim mediaStream.
 void unregisterCallback(String handlerName)
          Unregister a callback handler
 void unregisterOnPlayStatus(IMediaStreamCallback callback)
          Unregister onPlayStatus handler
 void unregisterOnStatus(IMediaStreamCallback callback)
          Unregister onStatus handler
 void updateLoggingDuration()
          Update logging.MDC with mediaStream logging information
 void updateLoggingValues()
          Update logging.MDC with mediaStream logging information
 

Field Detail

AUDIOSAMPLEACCESS

static final int AUDIOSAMPLEACCESS
See Also:
Constant Field Values

READACCESS

static final int READACCESS
See Also:
Constant Field Values

VIDEOSAMPLEACCESS

static final int VIDEOSAMPLEACCESS
See Also:
Constant Field Values

WRITEACCESS

static final int WRITEACCESS
See Also:
Constant Field Values
Method Detail

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 timecode
packet - audio codec configuration packet (needed for H.264/AAC playback)

addAudioData

void addAudioData(byte[] data,
                  int offset,
                  int size)
Add data to curent audio packet

Parameters:
data - byte array
offset - offset in byte array
size - size of data to add

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

addDataData

void addDataData(byte[] data,
                 int offset,
                 int size)
Add data to curent data packet

Parameters:
data - byte array
offset - offset in byte array
size - size of data to add

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 timecode
packet - video codec configuration packet (needed for H.264/AAC playback)

addVideoData

void addVideoData(byte[] data,
                  int offset,
                  int size)
Add data to curent video packet

Parameters:
data - byte array
offset - offset in byte array
size - size of data to add

clear

void clear()
Delete media file pointed to by this mediaStream (be careful)


clearFastPlaySettings

void clearFastPlaySettings()
Clear fastPlay settings


clearLoggingValues

void clearLoggingValues()

close

void close()
Close mediaStream


flush

void flush()
Force publishing packets to be flushed from the input buffers to the output buffers


getAccess

boolean[] getAccess(IClient client,
                    String name)
Get the read/write access to this stream for this client

Parameters:
client - client
name - stream name
Returns:
array of booleans read[0], write[1]

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)

getAudioMissing

int getAudioMissing()
Get number of audio bytes missing from current audio packet

Returns:
number of bytes missing

getAudioSize

int getAudioSize()
Get the size of the current audio packet that is being streamed from the client to the server

Returns:
size

getAudioTC

long getAudioTC()
Get last absolute audio timecode (milliseconds) sent to mediaStream

Returns:
last absolute audio timecode (milliseconds)

getBufferTime

int getBufferTime()
Get buffer time for mediaStream (milliseconds)

Returns:
buffer time (millseconds)

getBurstStartStop

byte[] getBurstStartStop(boolean isStart)
Get the dynamic streaming burst start/stop AMF packet

Parameters:
isStart - is start
Returns:
byte array with AMF packet

getCacheName

String getCacheName()
not used

Returns:
cache name

getClient

IClient getClient()
Get parent client connection

Returns:
parent client connection

getClientId

int getClientId()
Get parent client connection (id)

Returns:
parent client connection (id)

getContextStr

String getContextStr()
Returns the stream context string in the form [application]/[appInstance]/[streamName].

Returns:
stream context string

getDataMissing

int getDataMissing()
Get number of data bytes missing from current audio packet

Returns:
number of bytes missing

getDataSize

int getDataSize()
Get the size of the current data packet that is being streamed from the client to the server

Returns:
size

getDataTC

long getDataTC()
Get last absolute data timecode (milliseconds) sent to mediaStream

Returns:
last absolute data timecode (milliseconds)

getDataType

int getDataType()
Get the data packet type: (IVHost.CONTENTTYPE_DATA0 or IVHost.CONTENTTYPE_DATA3)

Returns:
data packet type

getElapsedTime

ElapsedTimer getElapsedTime()
Get the interface to the elapse timer

Returns:
interface to the elapse timer

getExt

String getExt()
Get media file extension

Returns:
media file extension

getFastPlaySettings

FastPlaySettings getFastPlaySettings()
Get current fastPlay settings

Returns:
fastPlay settings

getHeaderSize

int getHeaderSize()
Get the last packet header size (debugging)

Returns:
last packet header size

getHTTPStreamerSession

IHTTPStreamerSession getHTTPStreamerSession()
Get the HTTPStreamer session associated with this stream

Returns:
HTTPStreamer session associated with this stream

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

getLiveStreamPacketizer

String getLiveStreamPacketizer()
Get the live stream packetizer that this stream is using

Returns:
live stream packetizer

getLiveStreamPacketizer

ILiveStreamPacketizer getLiveStreamPacketizer(String name)
Get the LiveStreamPacketizer interface to a stream by name

Parameters:
name - LiveStreamPacketizer name
Returns:
LiveStreamPacketizer interface

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

getLiveStreamRepeater

String getLiveStreamRepeater()
Get the live stream repeater name for the stream

Returns:
live stream repeater name

getMaxTimecode

long getMaxTimecode()
Get the timecode of the latest received packet

Returns:
timecode of the latest received packet

getMediaIOPerformance

IOPerformanceCounter getMediaIOPerformance()
Get IO performance counter

Returns:
IO performance counter

getMetaDataProvider

IMediaStreamMetaDataProvider getMetaDataProvider()
Get the metaData provider

Returns:
metaData provider

getName

String getName()
Get stream name

Returns:
stream name

getNetConnection

com.wowza.wms.netconnection.INetConnection getNetConnection()
Get parent netConnection (future server to server communication)

Returns:
parent netConnection connection

getPlayer

IMediaStreamPlay getPlayer()
Get underlying player (IMediaStreamPlay) object

Returns:
underlying player (IMediaStreamPlay) object

getPlayPackets

java.util.List<AMFPacket> getPlayPackets()
Get all available live packets

Returns:
play packets

getProperties

WMSProperties getProperties()
Get mediaStream properties

Returns:
properties

getPublishAudioCodecId

int getPublishAudioCodecId()
Get the codec id of the most recently published audio packet

Returns:
codec id of the most recently published audio packet

getPublishVideoCodecId

int getPublishVideoCodecId()
Get the codec id of the most recently published video packet

Returns:
codec id of the most recently published video packet

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

getReceiveVideoFPS

int getReceiveVideoFPS()
Set frame per seconds for video (not currently implemented)

Returns:
video frames per second

getRespAMFAudioObj

AMFObj getRespAMFAudioObj()
Get audio response channel object

Returns:
audio response channel object

getRespAMFDataObj

AMFObj getRespAMFDataObj()
Get data response channel object

Returns:
data response channel object

getRespAMFVideoObj

AMFObj getRespAMFVideoObj()
Get video response channel object

Returns:
video response channel object

getRTPStream

RTPStream getRTPStream()
Get the RTP based stream this stream is associated with

Returns:
RTP based stream this stream is associated with

getSrc

int getSrc()
Get the stream id

Returns:
stream id

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 name
ext - stream prefix (Ex. mp4:)
query - query part of stream name (Ex. mystream?param1=value1)
Returns:
resultant File object

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 name
ext - stream prefix (Ex. mp4:)
query - query part of stream name (Ex. mystream?param1=value1)
Returns:
resultant File object

getStreams

MediaStreamMap getStreams()
Get parent mediaStreamMap (owned by applicationInstance)

Returns:
parent mediaStreamMap

getStreamType

String getStreamType()
Get mediaStream streamType

Returns:
streamType

getUniqueStreamIdStr

String getUniqueStreamIdStr()
Get a string that uniquely identifies this stream

Returns:
unique stream identifier

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)

getVideoMissing

int getVideoMissing()
Get number of video bytes missing from current audio packet

Returns:
number of bytes missing

getVideoSize

int getVideoSize()
Get the size of the current video packet that is being streamed from the client to the server

Returns:
size

getVideoTC

long getVideoTC()
Get last absolute video timecode (milliseconds) sent to mediaStream

Returns:
last absolute video timecode (milliseconds)

handleCallback

void handleCallback(com.wowza.wms.request.RequestFunction function)
Routes request function to callback handler onStatus, onPlayStatus or [method/handler]

Parameters:
function - request function

idle

boolean idle()
Allow the mediaStream to perform idle work (not currently in use)

Returns:
true if it did some work

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)

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 sent
count - number of packets sent
Returns:
total number of bytes sent (after increment)

incrementMediaOutBytes

long incrementMediaOutBytes(long bytes,
                            long count)
Increment the number of mediaStream bytes sent and number of packets sent

Parameters:
bytes - number of bytes sent
count - number of packets sent
Returns:
total number of bytes sent (after increment)

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 applicationInstance
src - stream id for this stream
properties - initial properties as defined in Streams.xml

initLiveStreamRepeating

void initLiveStreamRepeating(String liveStreamPacketizer,
                             String liveStreamRepeater)
Initialize this stream for live stream repeating

Parameters:
liveStreamPacketizer - live stream packetizer
liveStreamRepeater - live stream repeater name

isAppend

boolean isAppend()
Is append to media file (only valid if isRecord)

Returns:
is appending or rewriting media file

isClustered

boolean isClustered()
not used

Returns:
isClustered

isMediaCasterPlay

boolean isMediaCasterPlay()
Is MediaCaster play enabled (if true, will trigger MediaCaster startup)

Returns:
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.

isOpen

boolean isOpen()
Is mediaStream open

Returns:
is mediaStream open

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)

isPlaying

boolean isPlaying()
Is mediaStream playing (or paused - false)

Returns:
is playing

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 stream
checkVideo - check video stream
Returns:
true if the publishing stream contains enough video/audio data to start playback

isReceiveAudio

boolean isReceiveAudio()
Is client currently receiving audio. Controlled by client side call receiveAudio.

Returns:
receive audio

isReceiveVideo

boolean isReceiveVideo()
Is client currently receiving video. Controlled by client side call receiveVideo

Returns:
receive video

isRecord

boolean isRecord()
Is this stream being recorded to a file

Returns:
is stream being recorded

isSendPlayStopLogEvent

boolean isSendPlayStopLogEvent()
Get need to send a log event for stop

Returns:
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

isSendRecordStopLogEvent

boolean isSendRecordStopLogEvent()
Get need to send a log event for recording

Returns:
need to send a log event for stop

length

double length()
Get length/duration (seconds) of media file pointed to by mediaStream

Returns:
length (seconds)

notifyActionOnMetaData

void notifyActionOnMetaData(AMFPacket metaDataPacket)
Notify client listeners of onMetaData change

Parameters:
metaDataPacket - metaDataPacket

notifyActionPause

void notifyActionPause(boolean isPause,
                       long location)
Notify client listeners of pause action

Parameters:
isPause - is pause or unpause
location - timecode (milliseconds) of action

notifyActionPauseRaw

void notifyActionPauseRaw(boolean isPause,
                          long location)
Notify client listeners of pauseRaw action

Parameters:
isPause - is pause or unpause
location - timecode (milliseconds) of action

notifyActionPlay

void notifyActionPlay(String streamName,
                      double playStart,
                      double playLen,
                      int playReset)
Notify client listeners of play action

Parameters:
streamName - stream name
playStart - play start
playLen - play length
playReset - play reset

notifyActionPublish

void notifyActionPublish(String streamName,
                         boolean isRecord,
                         boolean isAppend)
Notify client listeners of publish action

Parameters:
streamName - stream name
isRecord - is record or live
isAppend - is append if isRecord is true

notifyActionSeek

void notifyActionSeek(double location)
Notify client listeners of seek action

Parameters:
location - timecode (milliseconds) of seek request

notifyActionStop

void notifyActionStop()
Notify client listeners of stop action


notifyActionUnPublish

void notifyActionUnPublish(String streamName,
                           boolean isRecord,
                           boolean isAppend)
Notify client listeners of unpublish action

Parameters:
streamName - stream name
isRecord - is record or live
isAppend - is append if isRecord is true

packetComplete

void packetComplete()
Invoked by requestAdapter when at the end of a set of packets


publish

void publish()
Publish mediaStream


registerCallback

void registerCallback(String handlerName,
                      IMediaStreamCallback callback)
Register a callback handler

Parameters:
handlerName - handler name
callback - callback object

registerOnPlayStatus

void registerOnPlayStatus(IMediaStreamCallback callback)
Register onPlayStatus handler

Parameters:
callback - callback object

registerOnStatus

void registerOnStatus(IMediaStreamCallback callback)
Register onStatus handler

Parameters:
callback - callback object

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

send

void send(String handlerName)
Call client side NetStream method/handler with no parameters

Parameters:
handlerName - handler name

send

void send(String handlerName,
          Object... params)
Call client side NetStream method/handler

Parameters:
handlerName - handler name
params - variable list of parameters. All parameters will be wrapped in AMFDataObj.

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

sendDirect

void sendDirect(String handlerName)
Call client side NetStream method/handler and send event to underlying stream (will record event)

Parameters:
handlerName - handler name

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 name
params - variable list of parameters. All parameters will be wrapped in AMFDataObj.

sendLivePlaySeek

int sendLivePlaySeek(java.io.OutputStream out,
                     String name,
                     long timecode)
Send onStatus(NetStream.Seek.Notify) event

Parameters:
out - OutputStream
name - stream name
timecode - timecode
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 - OutputStream
name - stream name
timecode - timecode
timecodeOffset - timecode offset
Returns:
bytes sent to client

sendLivePlaySwitch

int sendLivePlaySwitch(java.io.OutputStream out,
                       String name,
                       long timecode)
Send onStatus(NetStream.Play.Transition) event

Parameters:
out - OutputStream
name - stream name
timecode - timecode
Returns:
bytes sent to client

sendPauseNotify

int sendPauseNotify(long timecode,
                    String name)
Send onStatus(NetStream.Pause.Notify) event

Parameters:
timecode - timecode of event
name - 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 - OutputStream
timecode - timecode of event
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 - OutputStream
name - stream name
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

sendPlaySeek

int sendPlaySeek(long location,
                 long seekLocation,
                 String name)
Send onStatus(NetStream.Seek.Notify) event.

Parameters:
location - request location of seek
seekLocation - result location of seek
name - 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 - OutputStream
location - request location of seek
seekLocation - result location of seek
name - 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 - OutputStream
location - request location of seek
seekLocation - result location of seek
name - stream name
seekTypes - list of commands to respond to (seek, unpause, play)
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 - OutputStream
name - stream name
isSwitch - is this a switch or a start
isLive - is the stream live
timecode - timecode of event
seekTypes - commands to respond to (seek, unpause, play)

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 - OutputStream
name - stream name
isSwitch - is this a switch or a start
timecode - timecode of event
Returns:
bytes sent to client

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 - OutputStream
name - stream name
isSwitch - is this a switch or a start
timecode - timecode of event
seekTypes - commands to respond to (seek, unpause, play)
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

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 event
statusType - 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 - OutputStream
timecode - timecode of event
statusType - status type IMediaStreamPlay.PLAYSTATUSTYPE_*
duration - (not used)
bytesSent - (not used)
Returns:
bytes sent to client

sendPlayStop

int sendPlayStop(long location,
                 String name)
Send onStatus(NetStream.Play.Stop) event

Parameters:
location - timecode where play stopped
name - 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 - OutputStream
location - timecode where play stopped
name - stream name
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 - OutputStream
name - stream name
isSwitch - is this a switch or a start
timecode - timecode of event
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 name
timecode - timecode of event
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 - OutputStream
name - stream name
Returns:
bytes sent to client

sendStreamNotFound

int sendStreamNotFound(String name)
Send onStatus(NetStream.Play.StreamNotFound) event

Parameters:
name - stream name
Returns:
bytes sent to client

sendUnpauseNotify

int sendUnpauseNotify(long location,
                      String name)
Send onStatus(NetStream.Unpause.Notify) event

Parameters:
location - timecode of event
name - 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 - OutputStream
location - timecode of event
name - 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 - OutputStream
location - timecode of event
name - stream name
seekTypes - list of operations to respond to (seek, play, unpause)
Returns:
bytes sent to client

sendVODPlaySwitch

int sendVODPlaySwitch(java.io.OutputStream out,
                      String name,
                      long timecode)
Send onStatus(NetStream.Play.Transition) event

Parameters:
out - OutputStream
name - stream name
timecode - timecode
Returns:
bytes sent to client

setAppend

void setAppend(boolean isAppend)
Set is append to media file (only valid if isRecord)

Parameters:
isAppend - is appending or rewriting media file

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 -

setAudioTC

void setAudioTC(long audioTC)
Set last absolute audio timecode (milliseconds) sent to mediaStream

Parameters:
audioTC - timecode (millseconds)

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

setBufferTime

void setBufferTime(int bufferTime)
Set buffer time for mediaStream (milliseconds)

Parameters:
bufferTime - buffer time (millseconds)

setClient

void setClient(IClient client)
Set parent client connection

Parameters:
client - parent client connection

setClustered

void setClustered(boolean isClustered)
not used

Parameters:
isClustered -

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 -

setDataTC

void setDataTC(long dataTC)
Set last absolute data timecode (milliseconds) sent to mediaStream

Parameters:
dataTC - timecode (millseconds)

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

setDataType

void setDataType(int dataType)
Set the data packet type: (IVHost.CONTENTTYPE_DATA0 or IVHost.CONTENTTYPE_DATA3)

Parameters:
dataType - data packet type

setExt

void setExt(String ext)
Set media file extension

Parameters:
ext -

setFastPlaySettings

void setFastPlaySettings(FastPlaySettings fastPlaySettings)
Set fastPlay settings

Parameters:
fastPlaySettings - fastPlay settings

setHeaderSize

void setHeaderSize(int headerSize)
Set the last packet header size (debugging)

Parameters:
headerSize - last packet header size

setHTTPStreamerSession

void setHTTPStreamerSession(IHTTPStreamerSession httpStreamerSession)
Set the HTTPStreamer session associated with this stream

Parameters:
httpStreamerSession - HTTPStreamer session associated with this stream

setIsPlaying

void setIsPlaying(boolean isPlaying)
Set is mediaStream playing

Parameters:
isPlaying -

setLiveStreamPacketizer

void setLiveStreamPacketizer(String liveStreamPacketizer)
Set the live stream packetizer that this stream is using

Parameters:
liveStreamPacketizer - live stream packetizer

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

setLiveStreamRepeater

void setLiveStreamRepeater(String liveStreamRepeater)
Set the live stream repeater name for the stream

Parameters:
liveStreamRepeater - live stream repeater name

setMediaCasterPlay

void setMediaCasterPlay(boolean isMediaCasterPlay)
Is MediaCaster play enabled (if true, will trigger MediaCaster startup)

Parameters:
isMediaCasterPlay - true if MediaCaster play enabled

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.

setMetaDataProvider

void setMetaDataProvider(IMediaStreamMetaDataProvider metaDataProvider)
Set the metaData provider

Parameters:
metaDataProvider - metaData provider

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 name
ext - 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 name
oldName - old stream name
ext - stream extension
queryStr - query string
playStart - play start
playLen - play len
playTransition - play transition (see MediaBase.PLAYTRANSITION_*)

setNetConnection

void setNetConnection(com.wowza.wms.netconnection.INetConnection netConnection)
Set parent netConnection (future server to server communication)

Parameters:
netConnection - netConnection connection

setOpen

void setOpen(boolean isOpen)
Set mediaStream open

Parameters:
isOpen - mediaStream open

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)

setPlayer

void setPlayer(IMediaStreamPlay player)
Set underlying player (IMediaStreamPlay) object

Parameters:
player - underlying player (IMediaStreamPlay) object

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

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

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 -

setReceiveAudio

void setReceiveAudio(boolean receiveAudio)
Set receive audio

Parameters:
receiveAudio - receive audio

setReceiveVideo

void setReceiveVideo(boolean receiveVideo)
Set receive video

Parameters:
receiveVideo - receive video

setReceiveVideoFPS

void setReceiveVideoFPS(int receiveVideoFPS)
Set frame per second for video (not currently implemented)

Parameters:
receiveVideoFPS - video frames per second

setRecord

void setRecord(boolean isRecord)
Set is the stream being recorded

Parameters:
isRecord -

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

setSendPlayStopLogEvent

void setSendPlayStopLogEvent(boolean sendPlayStopLogEvent)
Set need to send a log event for stop

Parameters:
sendPlayStopLogEvent - 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

setSendRecordStopLogEvent

void setSendRecordStopLogEvent(boolean sendPlayStopLogEvent)
Set need to send a log event for recording

Parameters:
sendPlayStopLogEvent - need to send a log event for stop

setSrc

void setSrc(int src)
Set stream id

Parameters:
src - stream id

setStreamType

void setStreamType(String streamType)
Set mediaStream streamType. This method will not change the type of the current stream.

Parameters:
streamType -

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 -

setVideoTC

void setVideoTC(long videoTC)
Set last absolute video timecode (milliseconds) sent to mediaStream

Parameters:
videoTC - timecode (millseconds)

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

shutdown

void shutdown()
shutdown or close this mediaStream


size

long size()
Get size (bytes) of media file pointed to by mediaStream

Returns:
size (bytes)

startAudioPacket

void startAudioPacket()
Called when an audio packet is first being populated with data


startDataPacket

void startDataPacket()
Called when a data packet is first being populated with data


startPublishing

void startPublishing()
Start publishing live stream


startVideoPacket

void startVideoPacket()
Called when a video packet is first being populated with data


stopName

void stopName(String name,
              String oldName,
              String ext,
              String queryStr,
              double playStart,
              double playLen,
              int playTransition)
Stop stream name

Parameters:
name - stream name
oldName - old stream name
ext - stream extension
queryStr - query string
playStart - play start
playLen - play len
playTransition - play transition (see MediaBase.PLAYTRANSITION_*)

stopPublishing

void stopPublishing()
Stop publishing live stream


switchName

void switchName(String name,
                String oldName,
                String ext,
                String queryStr,
                double playStart,
                double playLen,
                int playTransition)
Switch to stream name

Parameters:
name - stream name
oldName - old stream name
ext - stream extension
queryStr - query string
playStart - play start
playLen - play len
playTransition - play transition (see MediaBase.PLAYTRANSITION_*)

trim

void trim()
Trim mediaStream. This method will remove live packets that are older than the live buffer size.


unregisterCallback

void unregisterCallback(String handlerName)
Unregister a callback handler

Parameters:
handlerName - handler name

unregisterOnPlayStatus

void unregisterOnPlayStatus(IMediaStreamCallback callback)
Unregister onPlayStatus handler

Parameters:
callback - callback object

unregisterOnStatus

void unregisterOnStatus(IMediaStreamCallback callback)
Unregister onStatus handler

Parameters:
callback -

updateLoggingDuration

void updateLoggingDuration()
Update logging.MDC with mediaStream logging information


updateLoggingValues

void updateLoggingValues()
Update logging.MDC with mediaStream logging information