edu.umd.cfar.lamp.mpeg1.video
Class VideoIndex
java.lang.Object
edu.umd.cfar.lamp.mpeg1.video.VideoIndex
- public class VideoIndex
- extends java.lang.Object
Indexes the Groups of Pictures within a Video Sequence.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MAGIC_NUMBER
public static int MAGIC_NUMBER
VideoIndex
public VideoIndex(VideoDecoder videoDecoder)
getLastSequenceHeader
public int getLastSequenceHeader()
writeIndex
public void writeIndex(java.io.DataOutput out)
throws java.io.IOException,
MpegException
- Throws:
java.io.IOException
MpegException
readIndex
public void readIndex(java.io.DataInput in)
throws java.io.IOException,
MpegException
- Throws:
java.io.IOException
MpegException
complete
public void complete()
getVideoDecoder
public VideoDecoder getVideoDecoder()
getVideoSource
public VideoSource getVideoSource()
getIndexerState
public edu.umd.cfar.lamp.mpeg1.video.IndexerState getIndexerState()
getMbWidth
public int getMbWidth(int frame)
throws java.io.IOException,
MpegException
- Throws:
java.io.IOException
MpegException
getIntraQuantizerMatrix
public int[][] getIntraQuantizerMatrix(int frame)
throws java.io.IOException,
MpegException
- Throws:
java.io.IOException
MpegException
getNonIntraQuantizerMatrix
public int[][] getNonIntraQuantizerMatrix(int frame)
throws java.io.IOException,
MpegException
- Throws:
java.io.IOException
MpegException
index
public void index()
throws java.io.IOException,
MpegException
- Throws:
java.io.IOException
MpegException
indexed
public boolean indexed()
getFirstSequenceHeader
public void getFirstSequenceHeader()
throws java.io.IOException,
MpegException
- Throws:
java.io.IOException
MpegException
getSequenceHeader
public SequenceHeader getSequenceHeader(int frame)
throws java.io.IOException,
MpegException
- Throws:
java.io.IOException
MpegException
addSequenceHeader
public void addSequenceHeader(SequenceHeader sequenceHeader)
throws java.io.IOException,
MpegException
- Throws:
java.io.IOException
MpegException
addGroupOfPictures
public void addGroupOfPictures(long startPosition,
int numPictures,
int sequenceHeader)
throws java.io.IOException,
MpegException
- Throws:
java.io.IOException
MpegException
getFrameWidth
public int getFrameWidth()
throws java.io.IOException,
MpegException
- Throws:
java.io.IOException
MpegException
getFrameHeight
public int getFrameHeight()
throws java.io.IOException,
MpegException
- Throws:
java.io.IOException
MpegException
getBitRate
public int getBitRate()
throws java.io.IOException,
MpegException
- Throws:
java.io.IOException
MpegException
getPixelAspectRatio
public PelAspectRatio getPixelAspectRatio()
throws java.io.IOException,
MpegException
- Throws:
java.io.IOException
MpegException
getFrameRate
public float getFrameRate()
throws java.io.IOException,
MpegException
- Throws:
java.io.IOException
MpegException
getGroupOfPicturesNumberForFrame
public int getGroupOfPicturesNumberForFrame(int frame)
throws FrameNotFoundException
- Gets the group of pictures for the given frame
- Parameters:
frame
- the frame
- Returns:
- 0-based number of the Group Of Pictures containing
the given (0-based) frame.
- Throws:
FrameNotFoundException
getStartPosition
public long getStartPosition(int groupOfPicturesNumber)
getStartFrame
public int getStartFrame(int groupOfPicturesNumber)
getNumFrames
public int getNumFrames()
getPositionOfFrame
public long getPositionOfFrame(int n)
throws java.io.IOException,
MpegException
- Throws:
java.io.IOException
MpegException
getLastIOrPFrame
public int getLastIOrPFrame(int n)
throws java.io.IOException,
MpegException
- Throws:
java.io.IOException
MpegException
getPictureCodingTypeOfFrame
public byte getPictureCodingTypeOfFrame(int n)
throws java.io.IOException,
MpegException
- Throws:
java.io.IOException
MpegException
toString
public java.lang.String toString()