Package com.wowza.wms.stream
Interface IMediaStreamPlay
-
public interface IMediaStreamPlay
IMediaStreamPlay: public interface of mediaStreamPlayer object.
-
-
Field Summary
Fields Modifier and Type Field Description static int
PAUSE_PAUSE
Pause type: pausestatic int
PAUSE_PLAY
Pause type: playstatic int
PAUSE_TOGGLE
Pause type: togglestatic int
PLAYSIZES_AUDIO_BYTES
IMediaReader sizes array: audio byte countstatic int
PLAYSIZES_AUDIO_COUNT
IMediaReader sizes array: audio packet countstatic int
PLAYSIZES_DATA_BYTES
IMediaReader sizes array: data byte countstatic int
PLAYSIZES_DATA_COUNT
IMediaReader sizes array: data packet countstatic int
PLAYSIZES_LOSS_BYTES
IMediaReader sizes array: data byte countstatic int
PLAYSIZES_LOSS_COUNT
IMediaReader sizes array: data packet countstatic int
PLAYSIZES_SIZE
IMediaReader sizes array: size of sizes array long[PLAYSIZES_SIZE]static int
PLAYSIZES_VIDEO_BYTES
IMediaReader sizes array: video byte countstatic int
PLAYSIZES_VIDEO_COUNT
IMediaReader sizes array: video packet countstatic int
PLAYSTATUSTYPE_COMPLETE
onPlayStatus type: completestatic int
PLAYSTATUSTYPE_STOP
onPlayStatus type: stopstatic int
PLAYSTATUSTYPE_SWITCH
onPlayStatus type: switch
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Close mediaStreamPlayIMediaStream
getParent()
Get the parent media stream objectvoid
init(IMediaStream parent, MediaStreamMap streams)
Initialize mediaStreamPlayervoid
initLiveStreamRepeating(String liveStreamPacketizer, String liveStreamRepeater)
Initialize this stream for live stream repeatingvoid
interruptPlay()
Interrupt play to perform operation.double
length()
Get stream length/seconds (seconds)void
pause(int pauseType, long timecode)
pause mediaPlayStreamvoid
pauseRaw(int pauseType, long timecode)
pauseRaw mediaPlayStreamboolean
play()
Return true if there are packets to playint
play(java.io.OutputStream out, AMFObj wmsObjAudio, AMFObj wmsObjVideo, AMFObj wmsObjData, long[] sizes)
Write new packets or play packetsvoid
reset(boolean isReset)
Reset mediaStreamPlayervoid
resetNoLookup()
Reset but do not lookup current position in live streamvoid
seek(int location)
seek mediaPlayStreamvoid
setBufferTime(int bufferTime)
Set buffer timevoid
setName(String name, String oldName, String ext, String queryStr, double playStart, double playLen, int playTransition)
Set mediaPlayStream name, extension, query string, play start, play len, play resetvoid
shutdown()
Shutdown mediaStreamPlayerlong
size()
Get stream media file sizevoid
startPlay()
Start playing streamvoid
stopName(String name, String oldName, String ext, String queryStr, double playStart, double playLen, int playTransition)
Stop stream namevoid
switchName(String name, String oldName, String ext, String queryStr, double playStart, double playLen, int playTransition)
Switch to stream namevoid
switchPlay()
void
updateLoggingValues()
Update internal logging values
-
-
-
Field Detail
-
PAUSE_PAUSE
static final int PAUSE_PAUSE
Pause type: pause- See Also:
- Constant Field Values
-
PAUSE_TOGGLE
static final int PAUSE_TOGGLE
Pause type: toggle- See Also:
- Constant Field Values
-
PAUSE_PLAY
static final int PAUSE_PLAY
Pause type: play- See Also:
- Constant Field Values
-
PLAYSTATUSTYPE_SWITCH
static final int PLAYSTATUSTYPE_SWITCH
onPlayStatus type: switch- See Also:
- Constant Field Values
-
PLAYSTATUSTYPE_COMPLETE
static final int PLAYSTATUSTYPE_COMPLETE
onPlayStatus type: complete- See Also:
- Constant Field Values
-
PLAYSTATUSTYPE_STOP
static final int PLAYSTATUSTYPE_STOP
onPlayStatus type: stop- See Also:
- Constant Field Values
-
PLAYSIZES_AUDIO_BYTES
static final int PLAYSIZES_AUDIO_BYTES
IMediaReader sizes array: audio byte count- See Also:
- Constant Field Values
-
PLAYSIZES_AUDIO_COUNT
static final int PLAYSIZES_AUDIO_COUNT
IMediaReader sizes array: audio packet count- See Also:
- Constant Field Values
-
PLAYSIZES_VIDEO_BYTES
static final int PLAYSIZES_VIDEO_BYTES
IMediaReader sizes array: video byte count- See Also:
- Constant Field Values
-
PLAYSIZES_VIDEO_COUNT
static final int PLAYSIZES_VIDEO_COUNT
IMediaReader sizes array: video packet count- See Also:
- Constant Field Values
-
PLAYSIZES_DATA_BYTES
static final int PLAYSIZES_DATA_BYTES
IMediaReader sizes array: data byte count- See Also:
- Constant Field Values
-
PLAYSIZES_DATA_COUNT
static final int PLAYSIZES_DATA_COUNT
IMediaReader sizes array: data packet count- See Also:
- Constant Field Values
-
PLAYSIZES_LOSS_BYTES
static final int PLAYSIZES_LOSS_BYTES
IMediaReader sizes array: data byte count- See Also:
- Constant Field Values
-
PLAYSIZES_LOSS_COUNT
static final int PLAYSIZES_LOSS_COUNT
IMediaReader sizes array: data packet count- See Also:
- Constant Field Values
-
PLAYSIZES_SIZE
static final int PLAYSIZES_SIZE
IMediaReader sizes array: size of sizes array long[PLAYSIZES_SIZE]- See Also:
- Constant Field Values
-
-
Method Detail
-
init
void init(IMediaStream parent, MediaStreamMap streams)
Initialize mediaStreamPlayer- Parameters:
parent
- parent mediaStream objectstreams
- parent mediaStreamMap
-
shutdown
void shutdown()
Shutdown mediaStreamPlayer
-
reset
void reset(boolean isReset)
Reset mediaStreamPlayer- Parameters:
isReset
- is this a playlist reset or addition, true if reset
-
resetNoLookup
void resetNoLookup()
Reset but do not lookup current position in live stream
-
play
int play(java.io.OutputStream out, AMFObj wmsObjAudio, AMFObj wmsObjVideo, AMFObj wmsObjData, long[] sizes)
Write new packets or play packets- Parameters:
out
- OutputStreamwmsObjAudio
- audio response channelwmsObjVideo
- video response channelwmsObjData
- data response channelsizes
- sizes array. See IMediaStreamPlay.PLAYSIZES_*- Returns:
- total byte output
-
play
boolean play()
Return true if there are packets to play- Returns:
- true if packets to play
-
seek
void seek(int location)
seek mediaPlayStream- Parameters:
location
- timecode (milliseconds)
-
pause
void pause(int pauseType, long timecode)
pause mediaPlayStream- Parameters:
pauseType
- pause type. See IMediaStreamPlay.PAUSE_*timecode
- timecode (milliseconds)
-
pauseRaw
void pauseRaw(int pauseType, long timecode)
pauseRaw mediaPlayStream- Parameters:
pauseType
- pause type. See IMediaStreamPlay.PAUSE_*timecode
- timecode (milliseconds)
-
setBufferTime
void setBufferTime(int bufferTime)
Set buffer time- Parameters:
bufferTime
-
-
setName
void setName(String name, String oldName, String ext, String queryStr, double playStart, double playLen, int playTransition)
Set mediaPlayStream name, extension, query string, play start, play len, play reset- Parameters:
name
- stream nameoldName
- old stream nameext
- extensionqueryStr
- query stringplayStart
- play startplayLen
- play lenplayTransition
- play reset
-
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_*)
-
close
void close()
Close mediaStreamPlay
-
interruptPlay
void interruptPlay()
Interrupt play to perform operation. Usually for seek or pause.
-
startPlay
void startPlay()
Start playing stream
-
switchPlay
void switchPlay()
-
updateLoggingValues
void updateLoggingValues()
Update internal logging values
-
length
double length()
Get stream length/seconds (seconds)- Returns:
- length/duration (seconds)
-
size
long size()
Get stream media file size- Returns:
- media file size
-
getParent
IMediaStream getParent()
Get the parent media stream object- Returns:
- parent media stream object
-
initLiveStreamRepeating
void initLiveStreamRepeating(String liveStreamPacketizer, String liveStreamRepeater)
Initialize this stream for live stream repeating- Parameters:
liveStreamPacketizer
- live stream packetizerliveStreamRepeater
- live stream repeater name
-
-