ArvBuffer

ArvBuffer — Buffer for storage of video frames

Synopsis

void                (*ArvFrameCallback)                 (ArvBuffer *buffer);
enum                ArvBufferStatus;
                    ArvBuffer;
ArvBuffer *         arv_buffer_new                      (size_t size,
                                                         void *preallocated);
ArvBuffer *         arv_buffer_new_full                 (size_t size,
                                                         void *preallocated,
                                                         void *user_data,
                                                         GDestroyNotify user_data_destroy_func);

Object Hierarchy

  GObject
   +----ArvBuffer

Description

ArvBuffer provides a class for the instantiation of buffers used for the storage of the separate images of the video stream. The actual data space may either be allocated by ArvBuffer during an object instatiation, of preallocated. ArvBuffer also allows the transmission of image metadata, such as offsets and size of the transmitted region of interrest, pixel format and time stamp.

Details

ArvFrameCallback ()

void                (*ArvFrameCallback)                 (ArvBuffer *buffer);

enum ArvBufferStatus

typedef enum {
	ARV_BUFFER_STATUS_SUCCESS,
	ARV_BUFFER_STATUS_CLEARED,
	ARV_BUFFER_STATUS_TIMEOUT,
	ARV_BUFFER_STATUS_MISSING_PACKETS,
	ARV_BUFFER_STATUS_WRONG_PACKET_ID,
	ARV_BUFFER_STATUS_SIZE_MISMATCH,
	ARV_BUFFER_STATUS_FILLING,
	ARV_BUFFER_STATUS_ABORTED
} ArvBufferStatus;

ARV_BUFFER_STATUS_SUCCESS

the buffer contains a valid image

ARV_BUFFER_STATUS_CLEARED

the buffer is cleared

ARV_BUFFER_STATUS_TIMEOUT

timeout was reached before all packets are received

ARV_BUFFER_STATUS_MISSING_PACKETS

stream has missing packets

ARV_BUFFER_STATUS_WRONG_PACKET_ID

stream has packet with wrong id

ARV_BUFFER_STATUS_SIZE_MISMATCH

the received image didn't fit in the buffer data space

ARV_BUFFER_STATUS_FILLING

the image is currently being filled

ARV_BUFFER_STATUS_ABORTED

the filling was aborted before completion

ArvBuffer

typedef struct _ArvBuffer ArvBuffer;

arv_buffer_new ()

ArvBuffer *         arv_buffer_new                      (size_t size,
                                                         void *preallocated);

Creates a new buffer for the storage of the video stream images. The data space can be either preallocated, and the caller is responsible for it's deallocation, or allocated by this function. If it is the case, data memory will be freed when the buffer is destroyed.

size :

payload size

preallocated :

preallocated memory buffer. [allow-none][transfer none]

arv_buffer_new_full ()

ArvBuffer *         arv_buffer_new_full                 (size_t size,
                                                         void *preallocated,
                                                         void *user_data,
                                                         GDestroyNotify user_data_destroy_func);

Creates a new buffer for the storage of the video stream images. The data space can be either preallocated, and the caller is responsible for it's deallocation, or allocated by this function. If it is the case, data memory will be freed when the buffer is destroyed.

If user_data_destroy_func is non NULL, it will be called in order to destroy user_data when the buffer is destroyed.

size :

payload size

preallocated :

preallocated memory buffer. [transfer none][allow-none]

user_data :

a pointer to user data associated to this buffer. [transfer none]

user_data_destroy_func :

an optional user data destroy callback