com.t4l.jmf
Class JPEGDecoder

java.lang.Object
  extended by com.t4l.jmf.JPEGDecoder
All Implemented Interfaces:
Codec, Controls, PlugIn

public class JPEGDecoder
extends java.lang.Object
implements Codec

This type of MOV file just stores frames as a series of JPEG images. This codec uses ImageIO classes to convert from the jpeg VideoFormat to RGBFormats.

Author:
Jeremy Wood

Field Summary
 
Fields inherited from interface javax.media.PlugIn
BUFFER_PROCESSED_FAILED, BUFFER_PROCESSED_OK, INPUT_BUFFER_NOT_CONSUMED, OUTPUT_BUFFER_NOT_FILLED, PLUGIN_TERMINATED
 
Constructor Summary
JPEGDecoder()
           
 
Method Summary
 void close()
           
 java.lang.Object getControl(java.lang.String controlType)
           
 java.lang.Object[] getControls()
           
 java.lang.String getName()
           
 Format[] getSupportedInputFormats()
           
 Format[] getSupportedOutputFormats(Format input)
           
 void open()
           
 int process(Buffer input, Buffer output)
           
protected  int processJPEGtoRGB(Buffer input, Buffer output)
           
protected static void readJPEG(byte[] data, java.awt.image.BufferedImage dest)
           
 void reset()
           
 Format setInputFormat(Format f)
           
 Format setOutputFormat(Format f)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPEGDecoder

public JPEGDecoder()
Method Detail

getSupportedInputFormats

public Format[] getSupportedInputFormats()
Specified by:
getSupportedInputFormats in interface Codec

getSupportedOutputFormats

public Format[] getSupportedOutputFormats(Format input)
Specified by:
getSupportedOutputFormats in interface Codec

process

public int process(Buffer input,
                   Buffer output)
Specified by:
process in interface Codec

processJPEGtoRGB

protected int processJPEGtoRGB(Buffer input,
                               Buffer output)

readJPEG

protected static void readJPEG(byte[] data,
                               java.awt.image.BufferedImage dest)
                        throws java.io.IOException
Throws:
java.io.IOException

setInputFormat

public Format setInputFormat(Format f)
Specified by:
setInputFormat in interface Codec

setOutputFormat

public Format setOutputFormat(Format f)
Specified by:
setOutputFormat in interface Codec

close

public void close()
Specified by:
close in interface PlugIn

getName

public java.lang.String getName()
Specified by:
getName in interface PlugIn

open

public void open()
          throws ResourceUnavailableException
Specified by:
open in interface PlugIn
Throws:
ResourceUnavailableException

reset

public void reset()
Specified by:
reset in interface PlugIn

getControl

public java.lang.Object getControl(java.lang.String controlType)
Specified by:
getControl in interface Controls

getControls

public java.lang.Object[] getControls()
Specified by:
getControls in interface Controls