com.jme3.app.state
Class MjpegFileWriter

java.lang.Object
  extended by com.jme3.app.state.MjpegFileWriter

public class MjpegFileWriter
extends java.lang.Object

Released under BSD License


Constructor Summary
MjpegFileWriter(java.io.File aviFile, int width, int height, double framerate)
           
MjpegFileWriter(java.io.File aviFile, int width, int height, double framerate, int numFrames)
           
 
Method Summary
 void addImage(byte[] imagedata)
           
 void addImage(java.awt.Image image)
           
 void addImage(java.awt.Image image, float quality)
           
 void finishAVI()
           
static byte[] intBytes(int i)
           
static byte[] shortBytes(short i)
           
static int swapInt(int v)
           
static short swapShort(short v)
           
 byte[] writeImageToBytes(java.awt.Image image, float quality)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MjpegFileWriter

public MjpegFileWriter(java.io.File aviFile,
                       int width,
                       int height,
                       double framerate)
                throws java.lang.Exception
Throws:
java.lang.Exception

MjpegFileWriter

public MjpegFileWriter(java.io.File aviFile,
                       int width,
                       int height,
                       double framerate,
                       int numFrames)
                throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

addImage

public void addImage(java.awt.Image image)
              throws java.lang.Exception
Throws:
java.lang.Exception

addImage

public void addImage(java.awt.Image image,
                     float quality)
              throws java.lang.Exception
Throws:
java.lang.Exception

addImage

public void addImage(byte[] imagedata)
              throws java.lang.Exception
Throws:
java.lang.Exception

finishAVI

public void finishAVI()
               throws java.lang.Exception
Throws:
java.lang.Exception

swapInt

public static int swapInt(int v)

swapShort

public static short swapShort(short v)

intBytes

public static byte[] intBytes(int i)

shortBytes

public static byte[] shortBytes(short i)

writeImageToBytes

public byte[] writeImageToBytes(java.awt.Image image,
                                float quality)
                         throws java.lang.Exception
Throws:
java.lang.Exception