org.jcodec.containers.mp4.demuxer
Class AbstractMP4DemuxerTrack

java.lang.Object
  extended by org.jcodec.containers.mp4.demuxer.AbstractMP4DemuxerTrack
All Implemented Interfaces:
DemuxerTrack
Direct Known Subclasses:
FramesMP4DemuxerTrack, PCMMP4DemuxerTrack

public abstract class AbstractMP4DemuxerTrack
extends Object
implements DemuxerTrack

This class is part of JCodec ( www.jcodec.org ) This software is distributed under FreeBSD License Shared routines between PCM and Frames tracks

Author:
The JCodec project

Field Summary
protected  TrakBox box
           
protected  long[] chunkOffsets
           
protected  long curFrame
           
protected  long duration
           
protected  long pts
           
protected  SampleEntry[] sampleEntries
           
protected  SampleToChunkBox.SampleToChunkEntry[] sampleToChunks
           
protected  int stcoInd
           
protected  int stscInd
           
protected  int sttsInd
           
protected  int sttsSubInd
           
protected  int timescale
           
protected  TimeToSampleBox.TimeToSampleEntry[] timeToSamples
           
 
Constructor Summary
AbstractMP4DemuxerTrack(TrakBox trak)
           
 
Method Summary
 boolean canSeek(long pts)
           
 TrakBox getBox()
           
 long getCurFrame()
           
 RationalLarge getDuration()
           
 List<Edit> getEdits()
           
 String getFourcc()
           
abstract  long getFrameCount()
           
 String getName()
           
 int getNo()
           
 SampleEntry[] getSampleEntries()
           
 long getTimescale()
           
 TrackType getType()
           
 boolean gotoFrame(long frameNo)
           
protected  void nextChunk()
           
abstract  MP4Packet nextFrame(ByteBuffer storage)
           
 int pts2Sample(long _tv, int _timescale)
           
protected  ByteBuffer readPacketData(SeekableByteChannel input, ByteBuffer buffer, long offset, int size)
           
 void seek(double second)
           
 boolean seek(long pts)
           
protected abstract  void seekPointer(long frameNo)
           
protected  long shiftPts(long frames)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jcodec.common.DemuxerTrack
nextFrame
 

Field Detail

box

protected TrakBox box

sampleEntries

protected SampleEntry[] sampleEntries

timeToSamples

protected TimeToSampleBox.TimeToSampleEntry[] timeToSamples

sampleToChunks

protected SampleToChunkBox.SampleToChunkEntry[] sampleToChunks

chunkOffsets

protected long[] chunkOffsets

duration

protected long duration

sttsInd

protected int sttsInd

sttsSubInd

protected int sttsSubInd

stcoInd

protected int stcoInd

stscInd

protected int stscInd

pts

protected long pts

curFrame

protected long curFrame

timescale

protected int timescale
Constructor Detail

AbstractMP4DemuxerTrack

public AbstractMP4DemuxerTrack(TrakBox trak)
Method Detail

pts2Sample

public int pts2Sample(long _tv,
                      int _timescale)

getType

public TrackType getType()

getNo

public int getNo()

getSampleEntries

public SampleEntry[] getSampleEntries()

getBox

public TrakBox getBox()

getTimescale

public long getTimescale()

seekPointer

protected abstract void seekPointer(long frameNo)

canSeek

public boolean canSeek(long pts)

seek

public boolean seek(long pts)

shiftPts

protected long shiftPts(long frames)

nextChunk

protected void nextChunk()

gotoFrame

public boolean gotoFrame(long frameNo)
Specified by:
gotoFrame in interface DemuxerTrack

seek

public void seek(double second)
Specified by:
seek in interface DemuxerTrack

getDuration

public RationalLarge getDuration()

getFrameCount

public abstract long getFrameCount()

getCurFrame

public long getCurFrame()
Specified by:
getCurFrame in interface DemuxerTrack

getEdits

public List<Edit> getEdits()

getName

public String getName()

getFourcc

public String getFourcc()

readPacketData

protected ByteBuffer readPacketData(SeekableByteChannel input,
                                    ByteBuffer buffer,
                                    long offset,
                                    int size)
                             throws IOException
Throws:
IOException

nextFrame

public abstract MP4Packet nextFrame(ByteBuffer storage)
                             throws IOException
Throws:
IOException


Copyright © 2013. All Rights Reserved.