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

java.lang.Object
  extended byedu.umd.cfar.lamp.mpeg1.video.VideoDecoder

public class VideoDecoder
extends java.lang.Object


Constructor Summary
VideoDecoder(VideoSource videoSource)
           
 
Method Summary
static int clamp(int componentValue)
          Constrains color component values to the 0..255 range.
 int getBitRate()
           
 int getCurrentFrame()
           
 int getFrameHeight()
           
 float getFrameRate()
           
 int getFrameWidth()
           
 java.awt.Image getImage()
           
 int getLastIOrPFrame()
           
 int getLastIOrPFrame(int frame)
           
 int getNumFrames()
           
 int getPictureCodingType()
           
 int getPictureCodingType(int frame)
           
 PelAspectRatio getPixelAspectRatio()
           
 long getPosition()
           
 long getPosition(int frame)
           
 SequenceHeader getSequenceHeader(int frame)
           
 int getStreamID()
           
 VideoSource getVideoSource()
           
 void index()
           
 void readIndex(java.io.DataInput in)
           
 void seek(int frame)
           
 void writeIndex(java.io.DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VideoDecoder

public VideoDecoder(VideoSource videoSource)
             throws java.io.IOException,
                    MpegException
Method Detail

getStreamID

public int getStreamID()

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

getVideoSource

public VideoSource getVideoSource()

getSequenceHeader

public SequenceHeader getSequenceHeader(int frame)
                                 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

getNumFrames

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

getCurrentFrame

public int getCurrentFrame()

seek

public void seek(int frame)
          throws java.io.IOException,
                 MpegException
Throws:
java.io.IOException
MpegException

getPosition

public long getPosition()
                 throws java.io.IOException,
                        MpegException
Throws:
java.io.IOException
MpegException

getPosition

public long getPosition(int frame)
                 throws java.io.IOException,
                        MpegException
Throws:
java.io.IOException
MpegException

getPictureCodingType

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

getPictureCodingType

public int getPictureCodingType(int frame)
                         throws java.io.IOException,
                                MpegException
Throws:
java.io.IOException
MpegException

getLastIOrPFrame

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

getLastIOrPFrame

public int getLastIOrPFrame(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

getImage

public java.awt.Image getImage()
                        throws java.io.IOException,
                               MpegException
Throws:
java.io.IOException
MpegException

clamp

public static int clamp(int componentValue)
Constrains color component values to the 0..255 range.

Parameters:
componentValue - the value to clamp
Returns:
the clamped value