kaos.robots.activmedia.pioneerCamera
Class JMFImageCapture

java.lang.Object
  extended by kaos.robots.activmedia.pioneerCamera.JMFImageCapture

public class JMFImageCapture
extends java.lang.Object

JMFImageCapture


Nested Class Summary
protected static class JMFImageCapture.StatusListener
           
 
Constructor Summary
JMFImageCapture()
           
 
Method Summary
 void destroy()
          Destroys this instance of the JMFImageCapture class.
protected static Buffer doGrabFrame()
           
 Buffer getFrameAsBuffer()
          Returns the grabbed frame as a javax.media.Buffer.
 java.awt.Image getFrameAsImage()
          Returns the grabbed frame as a java.awt.Image.
static java.awt.Dimension getFrameSize()
          Returns the size of the frames being grabbed.
static JMFImageCapture getInstance()
          Returns a new instance of the JMFImageCapture configured to use the first video capture device class.
static JMFImageCapture getInstance(java.lang.String mediaLocator)
           
 Player getPlayer()
          Returns the javax.media.Player instance being used to grab the frames.
static java.awt.Dimension[] getSupportedFrameSizes()
           
 boolean grabFrame()
          Grabs a frame
protected static void init()
           
protected static void initIfNeeded(java.lang.String mediaLocator)
           
 void setFrameSize(java.awt.Dimension d)
          Sets the size of the frames to be grabbed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMFImageCapture

public JMFImageCapture()
Method Detail

grabFrame

public boolean grabFrame()
Grabs a frame

Returns:
true if a frame was successfully grabbed, or false otherwise

getFrameAsBuffer

public Buffer getFrameAsBuffer()
Returns the grabbed frame as a javax.media.Buffer. Must call grabFrame() first.

Returns:
the grabbed frame

getFrameAsImage

public java.awt.Image getFrameAsImage()
Returns the grabbed frame as a java.awt.Image. Must call grabFrame() first.

Returns:
the grabbed frame as an AWT Image

getFrameSize

public static java.awt.Dimension getFrameSize()
Returns the size of the frames being grabbed.

Returns:
the frame size

getSupportedFrameSizes

public static java.awt.Dimension[] getSupportedFrameSizes()

setFrameSize

public void setFrameSize(java.awt.Dimension d)
                  throws java.lang.IllegalArgumentException
Sets the size of the frames to be grabbed.

Parameters:
d - the size in width and height of the frame
Throws:
java.lang.IllegalArgumentException - if the specified size is not supported

getPlayer

public Player getPlayer()
Returns the javax.media.Player instance being used to grab the frames.

Returns:
the Player instance

destroy

public void destroy()
Destroys this instance of the JMFImageCapture class.


getInstance

public static JMFImageCapture getInstance()
Returns a new instance of the JMFImageCapture configured to use the first video capture device class.

Returns:
a new instance of the JMFImageCapture class

getInstance

public static JMFImageCapture getInstance(java.lang.String mediaLocator)

doGrabFrame

protected static Buffer doGrabFrame()

initIfNeeded

protected static void initIfNeeded(java.lang.String mediaLocator)
                            throws java.lang.Exception
Throws:
java.lang.Exception

init

protected static void init()
                    throws java.lang.Exception
Throws:
java.lang.Exception