#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <libraw1394/raw1394.h>
#include <libdv/dv.h>
#include <AR/config.h>
#include <AR/ar.h>
#include <AR/video.h>
Go to the source code of this file.
Defines | |
#define | ARV_BIG_PACKET_SIZE 492 |
#define | ARV_BUF_FRAME_DATA 150000 |
#define | ARV_NTSC_FRAME_SIZE 120000 |
#define | ARV_PACKET_DATA_SIZE 480 |
#define | ARV_PACKET_NUM_NTSC 250 |
#define | ARV_PACKET_NUM_PAL 300 |
#define | ARV_PAL_FRAME_SIZE 144000 |
#define | DEFAULT_VIDEO_MODE VIDEO_MODE_NTSC |
#define | VIDEO_MODE_NTSC 1 |
#define | VIDEO_MODE_PAL 0 |
Functions | |
static int | ar2VideoBufferClose (AR2VideoBufferT *buffer) |
static int | ar2VideoBufferInit (AR2VideoBufferT *buffer, int size) |
static int | ar2VideoBufferRead (AR2VideoBufferT *buffer, ARUint8 *dest, int size, int flag) |
static ARUint8 * | ar2VideoBufferReadDV (AR2VideoParamT *vid) |
static int | ar2VideoBufferWrite (AR2VideoBufferT *buffer, ARUint8 *src, int size, int flag) |
static int | ar2VideoBusResetHandler (raw1394handle_t handle, unsigned int generation) |
int | ar2VideoCapNext (AR2VideoParamT *vid) |
call for the next grabbed video frame of a video source (multiple video inputs) | |
int | ar2VideoCapStart (AR2VideoParamT *vid) |
start the capture of a video source (multiple video inputs) | |
int | ar2VideoCapStop (AR2VideoParamT *vid) |
stop the capture of a video source (multiple video inputs) | |
static void | ar2VideoCapture (AR2VideoParamT *vid) |
int | ar2VideoClose (AR2VideoParamT *vid) |
close a video source (multiple video inputs) | |
int | ar2VideoDispOption (void) |
display the video option (multiple video inputs) | |
ARUint8 * | ar2VideoGetImage (AR2VideoParamT *vid) |
get a video image from a video source (multiple video inputs) | |
int | ar2VideoInqSize (AR2VideoParamT *vid, int *x, int *y) |
get the video image size of a video source (multiple video inputs) | |
AR2VideoParamT * | ar2VideoOpen (char *config_in) |
open a video source (multiple video inputs) | |
static int | ar2VideoRawISOHandler (raw1394handle_t handle, int channel, size_t length, quadlet_t *data) |
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. | |
ARUint8 * | 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. | |
Variables | |
static AR2VideoParamT * | gVid = NULL |
#define ARV_BIG_PACKET_SIZE 492 |
Definition at line 21 of file backup/lib/SRC/VideoLinuxDV/video.c.
#define ARV_BUF_FRAME_DATA 150000 |
Definition at line 14 of file backup/lib/SRC/VideoLinuxDV/video.c.
#define ARV_NTSC_FRAME_SIZE 120000 |
Definition at line 15 of file backup/lib/SRC/VideoLinuxDV/video.c.
#define ARV_PACKET_DATA_SIZE 480 |
Definition at line 22 of file backup/lib/SRC/VideoLinuxDV/video.c.
#define ARV_PACKET_NUM_NTSC 250 |
Definition at line 18 of file backup/lib/SRC/VideoLinuxDV/video.c.
#define ARV_PACKET_NUM_PAL 300 |
Definition at line 19 of file backup/lib/SRC/VideoLinuxDV/video.c.
#define ARV_PAL_FRAME_SIZE 144000 |
Definition at line 16 of file backup/lib/SRC/VideoLinuxDV/video.c.
#define DEFAULT_VIDEO_MODE VIDEO_MODE_NTSC |
Definition at line 12 of file backup/lib/SRC/VideoLinuxDV/video.c.
#define VIDEO_MODE_NTSC 1 |
Definition at line 11 of file backup/lib/SRC/VideoLinuxDV/video.c.
#define VIDEO_MODE_PAL 0 |
Definition at line 10 of file backup/lib/SRC/VideoLinuxDV/video.c.
static int ar2VideoBufferClose | ( | AR2VideoBufferT * | buffer | ) | [static] |
Definition at line 438 of file backup/lib/SRC/VideoLinuxDV/video.c.
static int ar2VideoBufferInit | ( | AR2VideoBufferT * | buffer, |
int | size | ||
) | [static] |
Definition at line 417 of file backup/lib/SRC/VideoLinuxDV/video.c.
static int ar2VideoBufferRead | ( | AR2VideoBufferT * | buffer, |
ARUint8 * | dest, | ||
int | size, | ||
int | flag | ||
) | [static] |
Definition at line 454 of file backup/lib/SRC/VideoLinuxDV/video.c.
static ARUint8 * ar2VideoBufferReadDV | ( | AR2VideoParamT * | vid | ) | [static] |
Definition at line 346 of file backup/lib/SRC/VideoLinuxDV/video.c.
static int ar2VideoBufferWrite | ( | AR2VideoBufferT * | buffer, |
ARUint8 * | src, | ||
int | size, | ||
int | flag | ||
) | [static] |
Definition at line 481 of file backup/lib/SRC/VideoLinuxDV/video.c.
static int ar2VideoBusResetHandler | ( | raw1394handle_t | handle, |
unsigned int | generation | ||
) | [static] |
Definition at line 328 of file backup/lib/SRC/VideoLinuxDV/video.c.
int ar2VideoCapNext | ( | AR2VideoParamT * | vid | ) |
call for the next grabbed video frame of a video source (multiple video inputs)
Companion function to arVideoCapNext for multiple video sources.
vid | a video handle structure for multi-camera grabbing |
Definition at line 237 of file backup/lib/SRC/VideoLinuxDV/video.c.
int ar2VideoCapStart | ( | AR2VideoParamT * | vid | ) |
start the capture of a video source (multiple video inputs)
Companion function to arVideoCapStart for multiple video sources.
vid | a video handle structure for multi-camera grabbing |
Definition at line 218 of file backup/lib/SRC/VideoLinuxDV/video.c.
int ar2VideoCapStop | ( | AR2VideoParamT * | vid | ) |
stop the capture of a video source (multiple video inputs)
Companion function to arVideoCapStop for multiple video sources.
vid | a video handle structure for multi-camera grabbing |
Definition at line 229 of file backup/lib/SRC/VideoLinuxDV/video.c.
static void ar2VideoCapture | ( | AR2VideoParamT * | vid | ) | [static] |
Definition at line 263 of file backup/lib/SRC/VideoLinuxDV/video.c.
int ar2VideoClose | ( | AR2VideoParamT * | vid | ) |
close a video source (multiple video inputs)
Companion function to arVideoClose for multiple video sources.
vid | a video handle structure for multi-camera grabbing. |
Definition at line 242 of file backup/lib/SRC/VideoLinuxDV/video.c.
int ar2VideoDispOption | ( | void | ) |
display the video option (multiple video inputs)
Companion function to arVideoDispOption, for multiple video sources.
Definition at line 102 of file backup/lib/SRC/VideoLinuxDV/video.c.
ARUint8* ar2VideoGetImage | ( | AR2VideoParamT * | vid | ) |
get a video image from a video source (multiple video inputs)
Companion function to arVideoGetImage for multiple video sources.
vid | a video handle structure for multi-camera grabbing |
Definition at line 341 of file backup/lib/SRC/VideoLinuxDV/video.c.
int ar2VideoInqSize | ( | AR2VideoParamT * | vid, |
int * | x, | ||
int * | y | ||
) |
get the video image size of a video source (multiple video inputs)
Companion function to arVideoInqSize for multiple video sources.
vid | a video handle structure for multi-camera grabbing |
Definition at line 402 of file backup/lib/SRC/VideoLinuxDV/video.c.
AR2VideoParamT* ar2VideoOpen | ( | char * | config | ) |
open a video source (multiple video inputs)
Companion function to arVideoOpen for multiple video sources. This function can be called multiple times to open multiple video streams. The maximum number of streams is dependent on the operating system and the performance characteristics of the host CPU and video capture infrastructure.
config | string of the selected video configuration. |
Definition at line 113 of file backup/lib/SRC/VideoLinuxDV/video.c.
static int ar2VideoRawISOHandler | ( | raw1394handle_t | handle, |
int | channel, | ||
size_t | length, | ||
quadlet_t * | data | ||
) | [static] |
Definition at line 287 of file backup/lib/SRC/VideoLinuxDV/video.c.
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 93 of file backup/lib/SRC/VideoLinuxDV/video.c.
int arVideoCapStart | ( | void | ) |
start the capture of video.
This function starts the video capture routine.
Definition at line 79 of file backup/lib/SRC/VideoLinuxDV/video.c.
int arVideoCapStop | ( | void | ) |
stop the capture of video.
This function stops the video capture routine.
Definition at line 86 of file backup/lib/SRC/VideoLinuxDV/video.c.
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 54 of file backup/lib/SRC/VideoLinuxDV/video.c.
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 37 of file backup/lib/SRC/VideoLinuxDV/video.c.
ARUint8* 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 72 of file backup/lib/SRC/VideoLinuxDV/video.c.
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 65 of file backup/lib/SRC/VideoLinuxDV/video.c.
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 42 of file backup/lib/SRC/VideoLinuxDV/video.c.
AR2VideoParamT* gVid = NULL [static] |
Definition at line 26 of file backup/lib/SRC/VideoLinuxDV/video.c.