Device interface

Name

Device interface -- 

Synopsis



typedef     vbi_capture_buffer;
vbi_capture* vbi_capture_v4l2_new           (char *dev_name,
                                             int buffers,
                                             unsigned int *services,
                                             int strict,
                                             char **errorstr,
                                             vbi_bool trace);
void        vbi_capture_delete              (vbi_capture *capture);
vbi_raw_decoder* vbi_capture_parameters     (vbi_capture *capture);
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);
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);

Description

Details

vbi_capture_buffer

typedef struct vbi_capture_buffer {
	void *			data;
	int			size;
	double			timestamp;
} vbi_capture_buffer;


vbi_capture_v4l2_new ()

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


vbi_capture_delete ()

void        vbi_capture_delete              (vbi_capture *capture);

Free all resources associated with the capture context.


vbi_capture_parameters ()

vbi_raw_decoder* vbi_capture_parameters     (vbi_capture *capture);

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 at most vbi_raw_decoder.count[0] + vbi_raw_decoder.count[1] vbi_sliced structures.


vbi_capture_pull_raw ()

int         vbi_capture_pull_raw            (vbi_capture *capture,
                                             vbi_capture_buffer **buffer,
                                             struct timeval *timeout);

Read a raw vbi frame from the capture device, returning a pointer to the image. This data remains valid until the next vbi_capture_pull_raw() call and must be read only.


vbi_capture_pull_sliced ()

int         vbi_capture_pull_sliced         (vbi_capture *capture,
                                             vbi_capture_buffer **buffer,
                                             struct timeval *timeout);

Read a sliced vbi frame, that is an array of vbi_sliced, from the capture device, returning a pointer to the array buffer->data. Note buffer->size is lines decoded, which can be zero, times the size of vbi_sliced. This data remains valid until the next vbi_capture_pull_sliced() call and must be read only.


vbi_capture_pull ()

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

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, from the capture device, returning pointers to the image raw_buffer->data and array sliced_buffer->data. Note sliced_buffer->size is lines decoded, which can be zero, times the size of vbi_sliced. This data remains valid until the next vbi_capture_pull_raw() call and must be read only.


vbi_capture_read_raw ()

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

Read a raw vbi frame from the capture device.


vbi_capture_read_sliced ()

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

Read a sliced vbi frame, that is an array of vbi_sliced, from the capture device.


vbi_capture_read ()

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

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, from the capture device.