codeanticode.gsvideo
Class GSMovieMaker

java.lang.Object
  extended by codeanticode.gsvideo.GSMovieMaker

public class GSMovieMaker
extends java.lang.Object

This class makes movies from a running program.


Field Summary
static int BEST
           
static int DIRAC
           
static int HIGH
           
static int LOW
           
static int MEDIUM
           
static int MJPEG
           
static int MJPEG2K
           
static int THEORA
           
static int WORST
           
static int X264
           
static int XVID
           
 
Constructor Summary
GSMovieMaker(processing.core.PApplet parent, int requestWidth, int requestHeight, java.lang.String filename)
          Constructor that sets the codec to THEORA, MEDIUM quality and 30 fps.
GSMovieMaker(processing.core.PApplet parent, int requestWidth, int requestHeight, java.lang.String filename, int codecType, int ifps)
          Constructor that allows to set codec type and fps.
GSMovieMaker(processing.core.PApplet parent, int requestWidth, int requestHeight, java.lang.String filename, int codecType, int codecQuality, int ifps)
          Constructor that allows to set codec type, encoding quality and fps.
GSMovieMaker(processing.core.PApplet parent, int requestWidth, int requestHeight, java.lang.String filename, java.lang.String encoder, java.lang.String muxer, int ifps)
          Constructor that allows to set the gstreamer encoder and muxer by name.
GSMovieMaker(processing.core.PApplet parent, int requestWidth, int requestHeight, java.lang.String filename, java.lang.String encoder, java.lang.String muxer, java.lang.String[] propNames, java.lang.Object[] propValues, int ifps)
          Constructor that allows to set the gstreamer encoder and muxer by name, as well as the properties.
 
Method Summary
 void addFrame(int[] pixels)
          Adds a new frame to the video being recorded..
 void delete()
          Releases the gstreamer resources associated to this movie maker object.
 void dispose()
          Same as delete.
 void finish()
          Finishes recording.
 int getDroppedFrames()
          Returns the number of frames dropped until now.
 int getQueuedFrames()
          Returns the number of frames currently in the pre-encoding queue, waiting to be encoded.
 boolean isRecording()
          Returns true or false depending on whether recording is going on right now or not.
 void setQueueSize(int npre, int nenc)
          Sets the maximum size of the pre-encoding and encoding queues.
 void start()
          Starts recording.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THEORA

public static final int THEORA
See Also:
Constant Field Values

XVID

public static final int XVID
See Also:
Constant Field Values

X264

public static final int X264
See Also:
Constant Field Values

DIRAC

public static final int DIRAC
See Also:
Constant Field Values

MJPEG

public static final int MJPEG
See Also:
Constant Field Values

MJPEG2K

public static final int MJPEG2K
See Also:
Constant Field Values

WORST

public static final int WORST
See Also:
Constant Field Values

LOW

public static final int LOW
See Also:
Constant Field Values

MEDIUM

public static final int MEDIUM
See Also:
Constant Field Values

HIGH

public static final int HIGH
See Also:
Constant Field Values

BEST

public static final int BEST
See Also:
Constant Field Values
Constructor Detail

GSMovieMaker

public GSMovieMaker(processing.core.PApplet parent,
                    int requestWidth,
                    int requestHeight,
                    java.lang.String filename)
Constructor that sets the codec to THEORA, MEDIUM quality and 30 fps.


GSMovieMaker

public GSMovieMaker(processing.core.PApplet parent,
                    int requestWidth,
                    int requestHeight,
                    java.lang.String filename,
                    int codecType,
                    int ifps)
Constructor that allows to set codec type and fps.


GSMovieMaker

public GSMovieMaker(processing.core.PApplet parent,
                    int requestWidth,
                    int requestHeight,
                    java.lang.String filename,
                    int codecType,
                    int codecQuality,
                    int ifps)
Constructor that allows to set codec type, encoding quality and fps.


GSMovieMaker

public GSMovieMaker(processing.core.PApplet parent,
                    int requestWidth,
                    int requestHeight,
                    java.lang.String filename,
                    java.lang.String encoder,
                    java.lang.String muxer,
                    int ifps)
Constructor that allows to set the gstreamer encoder and muxer by name. Properties for encoder and muxer are left to wherever the default values are.


GSMovieMaker

public GSMovieMaker(processing.core.PApplet parent,
                    int requestWidth,
                    int requestHeight,
                    java.lang.String filename,
                    java.lang.String encoder,
                    java.lang.String muxer,
                    java.lang.String[] propNames,
                    java.lang.Object[] propValues,
                    int ifps)
Constructor that allows to set the gstreamer encoder and muxer by name, as well as the properties.

Method Detail

delete

public void delete()
Releases the gstreamer resources associated to this movie maker object. It shouldn't be used after this.


dispose

public void dispose()
Same as delete.


addFrame

public void addFrame(int[] pixels)
Adds a new frame to the video being recorded..

Parameters:
pixels - int[]

start

public void start()
Starts recording.


finish

public void finish()
Finishes recording.


getQueuedFrames

public int getQueuedFrames()
Returns the number of frames currently in the pre-encoding queue, waiting to be encoded.


getDroppedFrames

public int getDroppedFrames()
Returns the number of frames dropped until now.


setQueueSize

public void setQueueSize(int npre,
                         int nenc)
Sets the maximum size of the pre-encoding and encoding queues. When the encoding queue is full, the frames start to be accumulated in the pre-encoding queue. By setting the size of the pre-encoding queue to zero, it can grow arbitrarily large.


isRecording

public boolean isRecording()
Returns true or false depending on whether recording is going on right now or not.



processing library GSVideo by Andres Colubri. (c) 2008-2011