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, serialize
protected SeekableByteChannel source
public Stream(MPSRandomAccessDemuxer demuxer, MPSIndex.MPSStreamIndex streamIndex, SeekableByteChannel source) throws IOException
IOException
public Packet nextFrame() throws IOException
nextFrame
in interface DemuxerTrack
IOException
protected ByteBuffer fetch(int pesLen) throws IOException
IOException
protected void skip(long leadingSize) throws IOException
IOException
protected void reset() throws IOException
IOException
public DemuxerTrackMeta getMeta()
getMeta
in interface DemuxerTrack
public boolean gotoFrame(long frameNo)
SeekableDemuxerTrack
gotoFrame
in interface SeekableDemuxerTrack
frameNo
- Frame number, zero based, to go to.public boolean gotoSyncFrame(long frameNo)
SeekableDemuxerTrack
gotoSyncFrame
in interface SeekableDemuxerTrack
frameNo
- Frame number, zero based, related to which a sync frame will
be selected.public long getCurFrame()
SeekableDemuxerTrack
getCurFrame
in interface SeekableDemuxerTrack
public void seek(double second)
SeekableDemuxerTrack
seek
in interface SeekableDemuxerTrack
second
- A second to seek to.Copyright © 2019. All rights reserved.