|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IMediaReader
IMediaReader: generic media reader interface. All media types implement this interface to interact with PlaylistPlayer.
| Field Summary | |
|---|---|
static String |
DEFAULT_RANDOMACCESSREADER
|
static int |
PLAYEVENT_AFTERBUFFERFILL
|
static int |
PLAYEVENT_AFTERMETADATA
|
static int |
PLAYEVENT_BEFOREBUFFERFILL
|
static int |
PLAYEVENT_BEFOREMETADATA
|
static int |
PLAYEVENT_STARTPLAYBACK
|
static int |
SEEK_EXACT
Seek direction: closest frame (audio, video) (key, no-key) |
static int |
SEEK_KEYCLOSE
Seek direction: closest key frame |
static int |
SEEK_KEYDOWN
Seek direction: down to closets key frame |
static int |
SEEK_KEYUP
Seek direction: up to closets key frame |
static int |
SEEKTARGET_AUDIO
|
static int |
SEEKTARGET_ENHANCED
|
static int |
SEEKTARGET_VIDEOKEYFRAME
|
| Method Summary | |
|---|---|
void |
close()
close file |
long |
getDuration()
Get duration or time (milliseconds) of the media file |
long |
getLength()
Get the stream length in bytes |
String |
getMediaExtension()
Get media extension |
java.util.List |
getMetadata()
Get a collection of metadata packets in ByteBuffers for this file. |
String |
getPath()
Get abstract path to the media item |
IMediaReaderStreamPosition |
getStreamPosition()
Get a reference to the current stream position |
void |
init(IApplicationInstance appInstance,
IMediaStream stream,
String mediaReadType,
String basePath,
String mediaName)
Initialize mediaReader |
boolean |
isOpen()
is file open |
void |
open(String basePath,
String name)
Open the file for reading |
void |
rewind()
rewind file to start |
com.wowza.wms.stream.PlaylistSeekResult |
seek(long timecode,
int seektype)
seek to timecode in file |
int |
sendZeroLengthPacket(int type,
int timecode,
boolean isAbsolute,
IMediaStream stream,
java.io.OutputStream out,
AMFObj wmsObj,
com.wowza.wms.stream.file.PlaylistCursor flvCursor,
com.wowza.wms.stream.file.PlaylistWriteControl control,
com.wowza.wms.stream.file.PlaylistReaderWriteResults results,
long[] sizes,
boolean isForceTCZero)
|
void |
setMediaReaderItem(com.wowza.wms.stream.MediaReaderItem mediaReaderItem)
Set the mediaReader item definition |
void |
setProperties(WMSProperties properties)
Set the properties for this media reader |
void |
setStreamPosition(IMediaReaderStreamPosition pos)
Set the file position within the media file |
void |
startPlayback()
Called each time the player being playback (before the buffer it filled) |
int |
writeGeneratedKeyFrame(IMediaStream stream,
java.io.OutputStream out,
AMFObj wmsObjAudio,
AMFObj wmsObjVideo,
AMFObj wmsObjData,
com.wowza.wms.stream.file.PlaylistCursor flvCursor,
com.wowza.wms.stream.file.PlaylistWriteControl control,
com.wowza.wms.stream.file.PlaylistReaderWriteResults results,
long[] sizes,
FastPlaySettings fastPlaySettings,
boolean isForceTCZero)
From current location in file generate a key frame (enhanced seek) and write it to out |
int |
writePackets(IMediaStream stream,
java.io.OutputStream out,
AMFObj wmsObjAudio,
AMFObj wmsObjVideo,
AMFObj wmsObjData,
com.wowza.wms.stream.file.PlaylistCursor flvCursor,
com.wowza.wms.stream.file.PlaylistWriteControl control,
com.wowza.wms.stream.file.PlaylistReaderWriteResults results,
long[] sizes,
FastPlaySettings fastPlaySettings,
boolean isForceTCZero)
From current location in file write packets to output |
int |
writePackets(java.util.List<AMFPacket> packetList,
com.wowza.wms.stream.file.PlaylistCursor flvCursor,
com.wowza.wms.stream.file.PlaylistWriteControl control,
com.wowza.wms.stream.file.PlaylistReaderWriteResults results,
long[] sizes,
FastPlaySettings fastPlaySettings)
Write packets to the packetList as AMFPackets |
| Field Detail |
|---|
static final String DEFAULT_RANDOMACCESSREADER
static final int PLAYEVENT_AFTERBUFFERFILL
static final int PLAYEVENT_AFTERMETADATA
static final int PLAYEVENT_BEFOREBUFFERFILL
static final int PLAYEVENT_BEFOREMETADATA
static final int PLAYEVENT_STARTPLAYBACK
static final int SEEK_EXACT
static final int SEEK_KEYCLOSE
static final int SEEK_KEYDOWN
static final int SEEK_KEYUP
static final int SEEKTARGET_AUDIO
static final int SEEKTARGET_ENHANCED
static final int SEEKTARGET_VIDEOKEYFRAME
| Method Detail |
|---|
void close()
long getDuration()
long getLength()
String getMediaExtension()
java.util.List getMetadata()
String getPath()
IMediaReaderStreamPosition getStreamPosition()
void init(IApplicationInstance appInstance,
IMediaStream stream,
String mediaReadType,
String basePath,
String mediaName)
stream - parent streammediaReadType - media reader type id. Example: flvbasePath - Base path for application instancemediaName - name of the media itemboolean isOpen()
void open(String basePath,
String name)
basePath - base path to filename - file name without extensionvoid rewind()
com.wowza.wms.stream.PlaylistSeekResult seek(long timecode,
int seektype)
timecode - timecode (milliseconds) to seek toseektype - seek type IMediaReader.SEEK_*
int sendZeroLengthPacket(int type,
int timecode,
boolean isAbsolute,
IMediaStream stream,
java.io.OutputStream out,
AMFObj wmsObj,
com.wowza.wms.stream.file.PlaylistCursor flvCursor,
com.wowza.wms.stream.file.PlaylistWriteControl control,
com.wowza.wms.stream.file.PlaylistReaderWriteResults results,
long[] sizes,
boolean isForceTCZero)
void setMediaReaderItem(com.wowza.wms.stream.MediaReaderItem mediaReaderItem)
mediaReaderItem - void setProperties(WMSProperties properties)
properties - propertiesvoid setStreamPosition(IMediaReaderStreamPosition pos)
pos - stream positionvoid startPlayback()
int writeGeneratedKeyFrame(IMediaStream stream,
java.io.OutputStream out,
AMFObj wmsObjAudio,
AMFObj wmsObjVideo,
AMFObj wmsObjData,
com.wowza.wms.stream.file.PlaylistCursor flvCursor,
com.wowza.wms.stream.file.PlaylistWriteControl control,
com.wowza.wms.stream.file.PlaylistReaderWriteResults results,
long[] sizes,
FastPlaySettings fastPlaySettings,
boolean isForceTCZero)
stream - parent mediaStreamout - output streamwmsObjAudio - audio channel amfObjwmsObjVideo - video channel amfObjwmsObjData - data channel amfObjflvCursor - current cursor that keeps track of timecodes and flags indicating position in media filecontrol - write control flags. Mainly used to control when it should stop writingresults - write results returned from this routinesizes - array of values that keep track of number of bytes written and number of packets for each data type (audio, video, data). See IMediaStreamPlay.PLAYSIZES_*fastPlaySettings - current fastPlay settings for the streamisForceTCZero - are we forcing all timecodes to zero
int writePackets(IMediaStream stream,
java.io.OutputStream out,
AMFObj wmsObjAudio,
AMFObj wmsObjVideo,
AMFObj wmsObjData,
com.wowza.wms.stream.file.PlaylistCursor flvCursor,
com.wowza.wms.stream.file.PlaylistWriteControl control,
com.wowza.wms.stream.file.PlaylistReaderWriteResults results,
long[] sizes,
FastPlaySettings fastPlaySettings,
boolean isForceTCZero)
stream - parent mediaStreamout - output streamwmsObjAudio - audio channel amfObjwmsObjVideo - video channel amfObjwmsObjData - data channel amfObjflvCursor - current cursor that keeps track of timecodes and flags indicating position in media filecontrol - write control flags. Mainly used to control when it should stop writingresults - write results returned from this routinesizes - array of values that keep track of number of bytes written and number of packets for each data type (audio, video, data). See IMediaStreamPlay.PLAYSIZES_*fastPlaySettings - current fastPlay settings for the streamisForceTCZero - are we forcing all timecodes to zero
int writePackets(java.util.List<AMFPacket> packetList,
com.wowza.wms.stream.file.PlaylistCursor flvCursor,
com.wowza.wms.stream.file.PlaylistWriteControl control,
com.wowza.wms.stream.file.PlaylistReaderWriteResults results,
long[] sizes,
FastPlaySettings fastPlaySettings)
packetList - list to which to write packetsflvCursor - current cursor that keeps track of timecodes and flags indicating position in media filecontrol - write control flags. Mainly used to control when it should stop writingresults - write results returned from this routinesizes - array of values that keep track of number of bytes written and number of packets for each data type (audio, video, data). See IMediaStreamPlay.PLAYSIZES_*fastPlaySettings - current fastPlay settings for the stream
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||