kinetic.util.MovieEncoder
Class BufferedImageToQTEncoder

java.lang.Object
  |
  +--kinetic.util.MovieEncoder.BufferedImageToQTEncoder
All Implemented Interfaces:
javax.media.ControllerListener, javax.media.datasink.DataSinkListener

public class BufferedImageToQTEncoder
extends java.lang.Object
implements javax.media.ControllerListener, javax.media.datasink.DataSinkListener

This code takes a BufferedImageSource, and turns it into a JPEG compressed Quicktime file


Field Summary
protected  javax.media.DataSink ds
           
protected  boolean fileDone
           
protected  boolean fileSuccess
           
protected  kinetic.util.MovieEncoder.BufferedImageToQTEncoder.ImageDataSource ids
           
protected  javax.media.Processor proc
           
protected  float quality
           
protected  boolean stateTransitionOK
           
protected  java.lang.Object waitFileSync
           
protected  java.lang.Object waitSync
           
 
Constructor Summary
BufferedImageToQTEncoder(java.lang.String outputURL, BufferedImageSource source, float q)
          wrappes up a lot of JMF stuff to turn a BufferedImage source into a JPEG compressed Quicktime file
 
Method Summary
 void controllerUpdate(javax.media.ControllerEvent evt)
          Controller Listener.
 void dataSinkUpdate(javax.media.datasink.DataSinkEvent evt)
          Event handler for the file writer.
 boolean initialize(BufferedImageSource source, javax.media.MediaLocator outML)
           
 boolean run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

waitSync

protected java.lang.Object waitSync

waitFileSync

protected java.lang.Object waitFileSync

stateTransitionOK

protected boolean stateTransitionOK

fileDone

protected boolean fileDone

fileSuccess

protected boolean fileSuccess

proc

protected javax.media.Processor proc

ids

protected kinetic.util.MovieEncoder.BufferedImageToQTEncoder.ImageDataSource ids

ds

protected javax.media.DataSink ds

quality

protected float quality
Constructor Detail

BufferedImageToQTEncoder

public BufferedImageToQTEncoder(java.lang.String outputURL,
                                BufferedImageSource source,
                                float q)
wrappes up a lot of JMF stuff to turn a BufferedImage source into a JPEG compressed Quicktime file

Parameters:
outputURL - destination file
source - a buffered image source that can provide new image frames
q - image quality for compression (1.0f = lossless, 0.0f=lossy but smaller files)
Method Detail

run

public boolean run()

initialize

public boolean initialize(BufferedImageSource source,
                          javax.media.MediaLocator outML)

controllerUpdate

public void controllerUpdate(javax.media.ControllerEvent evt)
Controller Listener.

Specified by:
controllerUpdate in interface javax.media.ControllerListener

dataSinkUpdate

public void dataSinkUpdate(javax.media.datasink.DataSinkEvent evt)
Event handler for the file writer.

Specified by:
dataSinkUpdate in interface javax.media.datasink.DataSinkListener