ARWrapper
Provides a C++ wrapper around ARToolKit and exposes a C and JNI API
|
Video source implementation using the ARToolKit arVideo module. More...
#include <ARToolKitVideoSource.h>
Public Member Functions | |
ARToolKitVideoSource () | |
virtual const char * | getName () |
Returns the name of this video source variation. More... | |
virtual bool | open () |
Opens the video source. More... | |
bool | open2 () |
virtual bool | captureFrame () |
Asks the video source to capture a frame. More... | |
virtual bool | close () |
Closes the video source. More... | |
Public Member Functions inherited from VideoSource | |
virtual | ~VideoSource () |
int | getError () |
bool | isOpen () |
Returns true if the video source is open. More... | |
bool | isRunning () |
Returns true if the video source is open and ready to be queried. More... | |
void | configure (const char *vconf, const char *cparaName, const char *cparaBuff, size_t cparaBuffLen) |
Sets initial parameters which will be used when the video source is opened. More... | |
ARParamLT * | getCameraParameters () |
Returns the camera parameters for the video source. More... | |
int | getVideoWidth () |
Returns the width of the video in pixels. More... | |
int | getVideoHeight () |
Returns the height of the video in pixels. More... | |
AR_PIXEL_FORMAT | getPixelFormat () |
Returns the pixel format of the video. More... | |
ARUint8 * | getFrame () |
Returns the current frame. More... | |
int | getFrameStamp () |
Returns the current frame stamp. More... | |
bool | updateTexture (Color *buffer) |
Populates the provided color buffer with the current video frame. More... | |
bool | fastPath () |
bool | updateTexture32 (uint32_t *buffer) |
void | updateTextureGL (int textureID) |
Updates the specified OpenGL texture with the current video frame. More... | |
Protected Attributes | |
AR2VideoParamT * | gVid |
Protected Attributes inherited from VideoSource | |
DeviceState | deviceState |
Current state of the video device. More... | |
char * | cameraParam |
Camera parameter filename. More... | |
char * | cameraParamBuffer |
size_t | cameraParamBufferLen |
ARParamLT * | cparamLT |
Camera paramaters. More... | |
char * | videoConfiguration |
Video configuration string. More... | |
int | videoWidth |
Width of the video frame in pixels. More... | |
int | videoHeight |
Height of the video frame in pixels. More... | |
AR_PIXEL_FORMAT | pixelFormat |
Pixel format from ARToolKit enumeration. More... | |
int | m_fastPath |
GLenum | glPixIntFormat |
GLenum | glPixFormat |
GLenum | glPixType |
ARUint8 * | frameBuffer |
Pointer to latest frame. Set by concrete subclass to point to frame data. More... | |
ARUint8 * | frameBuffer2 |
For bi-planar formats, pointer to plane 2 of latest frame. Set by concrete subclass to point to frame data. More... | |
int | frameStamp |
Latest framestamp. Incremented in the concrete subclass when a new frame arrives. More... | |
int | m_error |
Additional Inherited Members | |
Static Public Member Functions inherited from VideoSource | |
static VideoSource * | newVideoSource () |
Returns the correct VideoSource subclass for use on the current platform. More... | |
Protected Types inherited from VideoSource | |
enum | DeviceState { DEVICE_CLOSED, DEVICE_OPEN, DEVICE_GETTING_READY, DEVICE_RUNNING } |
Protected Member Functions inherited from VideoSource | |
void | setError (int error) |
VideoSource () | |
The constructor is not public because instances are created using a factory method. More... | |
Video source implementation using the ARToolKit arVideo module.
This video source uses ARToolKit's built in video capture functions, and can therefore be used on any platform on which arVideo works, including Windows, Linux and OSX.
ARToolKitVideoSource::ARToolKitVideoSource | ( | ) |
|
virtual |
Asks the video source to capture a frame.
This method must be provided by the subclass.
Implements VideoSource.
|
virtual |
Closes the video source.
This method must be provided by the subclass.
Implements VideoSource.
|
virtual |
Returns the name of this video source variation.
This method must be provided by the subclass.
Implements VideoSource.
|
virtual |
Opens the video source.
This method must be provided by the subclass.
Implements VideoSource.
bool ARToolKitVideoSource::open2 | ( | ) |
|
protected |