|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jartoolkit.videoinput.videocapturing.JARFrameGrabber
Class used for capturing a video using DirectX on Windows.
This class is a native interface to the FrameGrabber class used by the
AR-Toolkit. This class will run on Windows only. You also need to have
DirectX 8 installed on your maschine, because of using DirectShow for
grabbing the frames. Without a capturing-device this class woun't run, too.
The get an instance of this class you have to call the Create-method. Only
one instance of this class will created. The use JARFrameGrabber you
have to do following steps:
Field Summary | |
static java.lang.String |
version
The Version of JARFrameGrabber. |
Method Summary | |
static JARFrameGrabber |
create()
Create a JARFrameGrabber instance. |
static JARFrameGrabber |
create(java.lang.String config)
Create a JARFrameGrabber instance. |
void |
displayProperties()
Print the capturedevice-properties to the console. |
int |
getBitCount()
Get the bitdepth of a frame. |
void |
getBuffer(byte[] pixel)
Get the buffer as an bytearray. |
void |
getBuffer(int[] pixel)
Get the buffer as an integerarray. |
long |
getBufferPointer()
Get the buffer as a longpointer. |
long |
getBufferSize()
Get the size of the framebuffer in bytes. |
int |
getFPS()
Get the framerate of the videostream. |
int |
getHeight()
Get the height of a frame. |
void |
getNextBuffer(int[] pixel)
Get the next frame and return the buffer as an integerarray. |
long |
getNextBufferPointer()
Get the next frame and return the buffer as a longpointer. |
int |
getWidth()
Get the width of a frame. |
void |
grabFrame()
Grab next frame from capturedevice. |
void |
setFlippedImage(boolean flip)
Set the flag for flipping the image. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String version
Method Detail |
public static JARFrameGrabber create() throws java.lang.InstantiationException
java.lang.InstantiationException
public static JARFrameGrabber create(java.lang.String config) throws java.lang.InstantiationException
config
- Configuration for initialising DirectShow
java.lang.InstantiationException
public void displayProperties()
displayProperties
in interface JARPictureSource
public int getBitCount()
getBitCount
in interface JARPictureSource
public void getBuffer(byte[] pixel)
pixel
- The buffer in which the framedata will be copied in.public void getBuffer(int[] pixel)
getBuffer
in interface JARPictureSource
pixel
- The buffer in which the framedata will be copied in.public long getBufferPointer()
getBufferPointer
in interface JARPictureSource
public long getBufferSize()
int size = JARFrameGrabber.GetBufferSize(); dataArray = new int[size>>2]; ... JARFrameGrabber.GetBuffer(dataArray);
getBufferSize
in interface JARPictureSource
public int getFPS()
public int getHeight()
getHeight
in interface JARPictureSource
public void getNextBuffer(int[] pixel)
getNextBuffer
in interface JARPictureSource
pixel
- The buffer in which the framedata will be copied in.public long getNextBufferPointer()
getNextBufferPointer
in interface JARPictureSource
public int getWidth()
getWidth
in interface JARPictureSource
public void grabFrame()
grabFrame
in interface JARPictureSource
public void setFlippedImage(boolean flip)
setFlippedImage
in interface JARPictureSource
flip
- If true, the image will be flipped vertically.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |