edu.umd.cfar.lamp.mpeg1.video
Class VideoIndexElement

java.lang.Object
  extended byedu.umd.cfar.lamp.mpeg1.video.VideoIndexElement
All Implemented Interfaces:
java.lang.Comparable

public class VideoIndexElement
extends java.lang.Object
implements java.lang.Comparable

Represents one Group of Pictures within a VideoIndex.


Constructor Summary
VideoIndexElement(long startPosition, int startPicture, int numPictures, int sequenceHeader, VideoIndex videoIndex)
           
 
Method Summary
 int compareTo(java.lang.Object o)
           
 boolean containsPicture(int picture)
           
 int findPicture(int picture)
           
 int getLastIOrPPicture(int n)
           
 int getLastPicture()
           
 int getNumPictures()
           
 byte getPictureCodingTypeOfPicture(int n)
           
 long getPositionOfPicture(int n)
           
 int getSequenceHeader()
           
 int getStartPicture()
           
 long getStartPosition()
           
 boolean gopIndexed()
           
 void indexGop()
           
 java.lang.String toString()
           
 void writeIndex(java.io.DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VideoIndexElement

public VideoIndexElement(long startPosition,
                         int startPicture,
                         int numPictures,
                         int sequenceHeader,
                         VideoIndex videoIndex)
                  throws java.io.IOException,
                         MpegException
Method Detail

writeIndex

public void writeIndex(java.io.DataOutput out)
                throws java.io.IOException
Throws:
java.io.IOException

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

containsPicture

public boolean containsPicture(int picture)

findPicture

public int findPicture(int picture)

toString

public java.lang.String toString()

getStartPosition

public long getStartPosition()

getStartPicture

public int getStartPicture()

getNumPictures

public int getNumPictures()

getLastPicture

public int getLastPicture()

getSequenceHeader

public int getSequenceHeader()

gopIndexed

public boolean gopIndexed()

indexGop

public void indexGop()
              throws java.io.IOException,
                     MpegException
Throws:
java.io.IOException
MpegException

getPositionOfPicture

public long getPositionOfPicture(int n)
                          throws java.io.IOException,
                                 MpegException
Parameters:
n - the frame
Returns:
the byte position (in the video stream) of the (zero-based) nth picture (frame).
Throws:
java.io.IOException
MpegException

getLastIOrPPicture

public int getLastIOrPPicture(int n)
                       throws java.io.IOException,
                              MpegException
Throws:
java.io.IOException
MpegException

getPictureCodingTypeOfPicture

public byte getPictureCodingTypeOfPicture(int n)
                                   throws java.io.IOException,
                                          MpegException
Throws:
java.io.IOException
MpegException