#include <string.h>
#include <AR/video.h>
#include <VisImSrc.h>
Go to the source code of this file.
Functions | |
int | arVideoCapNext (void) |
call for the next grabbed video frame. | |
int | arVideoCapStart (void) |
start the capture of video. | |
int | arVideoCapStop (void) |
stop the capture of video. | |
int | arVideoClose (void) |
close the video source. After your application has finished using a video stream, this function must be called to close the link to the input source, and free resources associated with the capture operation. | |
int | arVideoDispOption (void) |
display the video option. | |
unsigned char * | arVideoGetImage (void) |
get the video image. | |
int | arVideoInqSize (int *x, int *y) |
get the video image size, in pixels. | |
int | arVideoOpen (char *config) |
open a video source. | |
static void | error_exit (void) |
Variables | |
CVisRGBAByteImage | image |
static int | open_flag = 0 |
CVisSequence< CVisRGBABytePixel > | sequence |
int arVideoCapNext | ( | void | ) |
call for the next grabbed video frame.
This function should be called at least once per frame. It has several purposes, depending on the operating system. It allows the video driver to perform housekeeping tasks and also signals to the video grabber that your code has finished using the most recent video frame returned by arVideoGetImage(), and that the video driver may re-use the memory occupied by the frame. The effect of this call is operating-system dependent. The best place to call this function is immediately after you have finished displaying the current video frame, i.e. after calling arglDispImage() or argDispImage().
Definition at line 143 of file videoWin32.cpp.
int arVideoCapStart | ( | void | ) |
start the capture of video.
This function starts the video capture routine.
Definition at line 127 of file videoWin32.cpp.
int arVideoCapStop | ( | void | ) |
stop the capture of video.
This function stops the video capture routine.
Definition at line 135 of file videoWin32.cpp.
int arVideoClose | ( | void | ) |
close the video source. After your application has finished using a video stream, this function must be called to close the link to the input source, and free resources associated with the capture operation.
Definition at line 68 of file videoWin32.cpp.
int arVideoDispOption | ( | void | ) |
display the video option.
The video configuration options vary by operating system and platform. This function outputs to the standard output the options available on the current OS and platform.
Definition at line 76 of file videoWin32.cpp.
unsigned char* arVideoGetImage | ( | void | ) |
get the video image.
This function returns a buffer with a captured video image. The returned data consists of a tightly-packed array of pixels, beginning with the first component of the leftmost pixel of the topmost row, and continuing with the remaining components of that pixel, followed by the remaining pixels in the topmost row, followed by the leftmost pixel of the second row, and so on. The arrangement of components of the pixels in the buffer is determined by the configuration string passed in to the driver at the time the video stream was opened. If no pixel format was specified in the configuration string, then an operating- system dependent default, defined in <AR/config.h> is used. The memory occupied by the pixel data is owned by the video driver and should not be freed by your program. The pixels in the buffer remain valid until the next call to arVideoCapNext, or the next call to arVideoGetImage which returns a non-NULL pointer, or any call to arVideoCapStop or arVideoClose.
Definition at line 95 of file videoWin32.cpp.
int arVideoInqSize | ( | int * | x, | |
int * | y | |||
) |
get the video image size, in pixels.
This function returns the size of the captured video frame, in pixels.
x | a pointer to the length of the captured image | |
y | a pointer to the width of the captured image |
Definition at line 85 of file videoWin32.cpp.
int arVideoOpen | ( | char * | config | ) |
open a video source.
This function opens a video input path with the driver (and device) present on your platform. According to your operating system and the hardware the initialization will be different : a generic string structure is used for this issue. This function prepares the video stream for capture, but capture will not actually begin until arVideoCapStart is called.
config | string of the selected video configuration. See the video configuration documentation for more information on this parameter. |
Definition at line 36 of file videoWin32.cpp.
static void error_exit | ( | void | ) | [static] |
Definition at line 151 of file videoWin32.cpp.
CVisRGBAByteImage image |
Definition at line 29 of file videoWin32.cpp.
int open_flag = 0 [static] |
Definition at line 24 of file videoWin32.cpp.
CVisSequence<CVisRGBABytePixel> sequence |
Definition at line 28 of file videoWin32.cpp.