libexplain  1.4.D001
Functions
libexplain/buffer/v4l2_buffer.h File Reference
#include <libexplain/string_buffer.h>

Go to the source code of this file.

Functions

void explain_buffer_v4l2_buffer (explain_string_buffer_t *sb, const struct v4l2_buffer *data, int extra)
int explain_v4l2_buffer_get_nframes (int fildes, int type)

Function Documentation

void explain_buffer_v4l2_buffer ( explain_string_buffer_t sb,
const struct v4l2_buffer *  data,
int  extra 
)

The explain_buffer_v4l2_buffer function may be used to print a representation of a v4l2_buffer structure.

Parameters:
sbThe string buffer to print into.
dataThe v4l2_buffer structure to be printed.
extrawhether or not to print the returned data fields as well

Definition at line 144 of file v4l2_buffer.c.

int explain_v4l2_buffer_get_nframes ( int  fildes,
int  type 
)

The explain_v4l2_buffer_get_nframes function is used to determine how many frames have been allocated. There is no ioctl to ask directly how many frames have been allocated, so we will have to binary chop.

Parameters:
fildesThe file descriptor of the video device.
typeThe memory type of the buffer.
Returns:
the number of buffers, or 0 if no buffers have been allocated yet, or -1 if the ioctl returned something strange.

Definition at line 153 of file v4l2_buffer.c.