public static class MPSRandomAccessDemuxer.Stream extends MPSIndex.MPSStreamIndex implements SeekableDemuxerTrack
| Modifier and Type | Field and Description |
|---|---|
protected SeekableByteChannel |
source |
| Constructor and Description |
|---|
Stream(MPSRandomAccessDemuxer demuxer,
MPSIndex.MPSStreamIndex streamIndex,
SeekableByteChannel source) |
| Modifier and Type | Method and Description |
|---|---|
protected ByteBuffer |
fetch(int pesLen) |
long |
getCurFrame()
Gets an index of the frame that the next call to 'nextFrame' will return,
zero based.
|
DemuxerTrackMeta |
getMeta() |
boolean |
gotoFrame(long frameNo)
Goes to exactly frameNo.
|
boolean |
gotoSyncFrame(long frameNo)
Goes to a a frame that's a sync frame (key frame) and is prior or at
frame frameNo.
|
Packet |
nextFrame() |
protected void |
reset() |
void |
seek(double second)
Seeks this container to the second provided so that the next call to
nextFrame will return a frame at that second.
|
protected void |
skip(long leadingSize) |
estimateSize, getFdur, getFpts, getFsizes, getStreamId, getSync, parseIndex, serializeprotected SeekableByteChannel source
public Stream(MPSRandomAccessDemuxer demuxer, MPSIndex.MPSStreamIndex streamIndex, SeekableByteChannel source) throws IOException
IOExceptionpublic Packet nextFrame() throws IOException
nextFrame in interface DemuxerTrackIOExceptionprotected ByteBuffer fetch(int pesLen) throws IOException
IOExceptionprotected void skip(long leadingSize)
throws IOException
IOExceptionprotected void reset()
throws IOException
IOExceptionpublic DemuxerTrackMeta getMeta()
getMeta in interface DemuxerTrackpublic boolean gotoFrame(long frameNo)
SeekableDemuxerTrackgotoFrame in interface SeekableDemuxerTrackframeNo - Frame number, zero based, to go to.public boolean gotoSyncFrame(long frameNo)
SeekableDemuxerTrackgotoSyncFrame in interface SeekableDemuxerTrackframeNo - Frame number, zero based, related to which a sync frame will
be selected.public long getCurFrame()
SeekableDemuxerTrackgetCurFrame in interface SeekableDemuxerTrackpublic void seek(double second)
SeekableDemuxerTrackseek in interface SeekableDemuxerTracksecond - A second to seek to.Copyright © 2019. All rights reserved.