Main Page   Modules   Data Structures   Data Fields   Related Pages   Examples   Search  

Device interface
[Raw VBI]

Access to VBI capture devices. More...

Data Structures

struct  vbi_capture_buffer

Typedefs

typedef vbi_capture_buffer vbi_capture_buffer
typedef vbi_capture vbi_capture
 Opaque device interface handle.


Functions

vbi_capturevbi_capture_v4l2_new (char *dev_name, int buffers, unsigned int *services, int strict, char **errorstr, vbi_bool trace)
vbi_capturevbi_capture_v4l_new (char *dev_name, int scanning, unsigned int *services, int strict, char **errorstr, vbi_bool trace)
vbi_capturevbi_capture_v4l_sidecar_new (char *dev_name, int given_fd, unsigned int *services, int strict, char **errorstr, vbi_bool trace)
int vbi_capture_read_raw (vbi_capture *capture, void *data, double *timestamp, struct timeval *timeout)
int vbi_capture_read_sliced (vbi_capture *capture, vbi_sliced *data, int *lines, double *timestamp, struct timeval *timeout)
int vbi_capture_read (vbi_capture *capture, void *raw_data, vbi_sliced *sliced_data, int *lines, double *timestamp, struct timeval *timeout)
int vbi_capture_pull_raw (vbi_capture *capture, vbi_capture_buffer **buffer, struct timeval *timeout)
int vbi_capture_pull_sliced (vbi_capture *capture, vbi_capture_buffer **buffer, struct timeval *timeout)
int vbi_capture_pull (vbi_capture *capture, vbi_capture_buffer **raw_buffer, vbi_capture_buffer **sliced_buffer, struct timeval *timeout)
vbi_raw_decodervbi_capture_parameters (vbi_capture *capture)
int vbi_capture_fd (vbi_capture *capture)
void vbi_capture_delete (vbi_capture *capture)

Detailed Description

Access to VBI capture devices.


Function Documentation

vbi_capture* vbi_capture_v4l2_new char *    dev_name,
int    buffers,
unsigned int *    services,
int    strict,
char **    errorstr,
vbi_bool    trace
 

Parameters:
dev_name  Name of the device to open, usually one of /dev/vbi or /dev/vbi0 and up.
buffers  Number of device buffers for raw vbi data, when the driver supports streaming. Otherwise one bounce buffer is allocated for vbi_capture_pull().
services  This must point to a set of VBI_SLICED_ symbols describing the data services to be decoded. On return the services actually decodable will be stored here. See vbi_raw_decoder_add() for details. If you want to capture raw data only, set to VBI_SLICED_VBI_525, VBI_SLICED_VBI_625 or both.
strict  Will be passed to vbi_raw_decoder_add().
errorstr  If not NULL this function stores a pointer to an error description here. You must free() this string when no longer needed.
trace  If TRUE print progress messages on stderr.
Returns:
Initialized vbi_capture context, NULL on failure.

int vbi_capture_read_raw vbi_capture   capture,
void *    data,
double *    timestamp,
struct timeval *    timeout
 

Parameters:
capture  Initialized vbi_capture context.
data  Store the raw vbi data here. Use vbi_capture_parameters() to determine the buffer size.
timestamp  On success the capture instant in seconds and fractions since 1970-01-01 00:00 of the video frame will be stored here.
timeout  Wait timeout, will be read only.
Read a raw vbi frame from the capture device.

Returns:
-1 on error, examine errno for details. The function also fails if vbi data is not available in raw format. 0 on timeout, 1 on success.

int vbi_capture_read_sliced vbi_capture   capture,
vbi_sliced   data,
int *    lines,
double *    timestamp,
struct timeval *    timeout
 

Parameters:
capture  Initialized vbi capture context.
data  Stores the sliced vbi data here. Use vbi_capture_parameters() to determine the buffer size.
lines  Stores number of vbi lines decoded and stored in data, which can be zero, here.
timestamp  On success the capture instant in seconds and fractions since 1970-01-01 00:00 will be stored here.
timeout  Wait timeout, will be read only.
Read a sliced vbi frame, that is an array of vbi_sliced structures, from the capture device.

Returns:
-1 on error, examine errno for details. 0 on timeout, 1 on success.

int vbi_capture_read vbi_capture   capture,
void *    raw_data,
vbi_sliced   sliced_data,
int *    lines,
double *    timestamp,
struct timeval *    timeout
 

Parameters:
capture  Initialized vbi capture context.
raw_data  Stores the raw vbi data here. Use vbi_capture_parameters() to determine the buffer size.
sliced_data  Stores the sliced vbi data here. Use vbi_capture_parameters() to determine the buffer size.
lines  Stores number of vbi lines decoded and stored in data, which can be zero, here.
timestamp  On success the capture instant in seconds and fractions since 1970-01-01 00:00 will be stored here.
timeout  Wait timeout, will be read only.
Read a raw vbi frame from the capture device, decode to sliced data and also read the sliced vbi frame, that is an array of vbi_sliced structures, from the capture device.

Returns:
-1 on error, examine errno for details. The function also fails if vbi data is not available in raw format. 0 on timeout, 1 on success.

int vbi_capture_pull_raw vbi_capture   capture,
vbi_capture_buffer **    buffer,
struct timeval *    timeout
 

Parameters:
capture  Initialized vbi capture context.
buffer  Store pointer to a vbi_capture_buffer here.
timeout  Wait timeout, will be read only.
Read a raw vbi frame from the capture device, returning a pointer to the image in buffer->data, which has buffer->size. The data remains valid until the next vbi_capture_pull_raw() call and must be read only.

Returns:
-1 on error, examine errno for details. The function also fails if vbi data is not available in raw format. 0 on timeout, 1 on success.

int vbi_capture_pull_sliced vbi_capture   capture,
vbi_capture_buffer **    buffer,
struct timeval *    timeout
 

Parameters:
capture  Initialized vbi capture context.
buffer  Store pointer to a vbi_capture_buffer here.
timeout  Wait timeout, will be read only.
Read a sliced vbi frame, that is an array of vbi_sliced, from the capture device, returning a pointer to the array as buffer->data. buffer->size is the size of the array, that is the number of lines decoded, which can be zero, <u>times the size of structure vbi_sliced</u>. The data remains valid until the next vbi_capture_pull_sliced() call and must be read only.

Returns:
-1 on error, examine errno for details. 0 on timeout, 1 on success.

int vbi_capture_pull vbi_capture   capture,
vbi_capture_buffer **    raw_buffer,
vbi_capture_buffer **    sliced_buffer,
struct timeval *    timeout
 

Parameters:
capture  Initialized vbi capture context.
raw_buffer  Store pointer to a vbi_capture_buffer here.
sliced_buffer  Store pointer to a vbi_capture_buffer here.
timeout  Wait timeout, will be read only.
Read a raw vbi frame from the capture device and decode to sliced data. Both raw and sliced data is returned, a pointer to the raw image as raw_buffer->data and a pointer to an array of vbi_sliced as sliced_buffer->data. Note sliced_buffer->size is the size of the array in bytes. That is the number of lines decoded, which can be zero, times the size of the vbi_sliced structure.

The raw and sliced data remains valid until the next vbi_capture_pull_raw() call and must be read only.

Returns:
-1 on error, examine errno for details. The function also fails if vbi data is not available in raw format. 0 on timeout, 1 on success.

vbi_raw_decoder* vbi_capture_parameters vbi_capture   capture
 

Parameters:
capture  Initialized vbi capture context.
Describe the captured data. Raw vbi frames consist of vbi_raw_decoder.count[0] + vbi_raw_decoder.count[1] lines in vbi_raw_decoder.sampling_format, each vbi_raw_decoder.bytes_per_line. Sliced vbi arrays consist of zero to vbi_raw_decoder.count[0] + vbi_raw_decoder.count[1] vbi_sliced structures.

Returns:
Pointer to a vbi_raw_decoder structure, read only.

int vbi_capture_fd vbi_capture   capture
 

Parameters:
capture  Initialized vbi capture context, can be NULL.
Returns:
The file descriptor used to read from the device. If not applicable or the capture context is invalid -1 will be returned.

void vbi_capture_delete vbi_capture   capture
 

Parameters:
capture  Initialized vbi capture context, can be NULL.
Free all resources associated with the capture context.


Generated on Sat Oct 12 18:01:18 2002 for ZVBI Library by doxygen1.2.15