GstVaapiVideoBuffer

GstVaapiVideoBuffer — VA video buffer for GStreamer

Synopsis

                    GstVaapiVideoBuffer;
                    GstVaapiVideoBufferClass;
GstBuffer *         gst_vaapi_video_buffer_new          (GstVaapiDisplay *display);
GstBuffer *         gst_vaapi_video_buffer_new_from_pool
                                                        (GstVaapiVideoPool *pool);
GstBuffer *         gst_vaapi_video_buffer_new_from_buffer
                                                        (GstBuffer *buffer);
GstBuffer *         gst_vaapi_video_buffer_new_with_image
                                                        (GstVaapiImage *image);
GstBuffer *         gst_vaapi_video_buffer_new_with_surface
                                                        (GstVaapiSurface *surface);
GstBuffer *         gst_vaapi_video_buffer_new_with_surface_proxy
                                                        (GstVaapiSurfaceProxy *proxy);
GstVaapiDisplay *   gst_vaapi_video_buffer_get_display  (GstVaapiVideoBuffer *buffer);
GstVaapiImage *     gst_vaapi_video_buffer_get_image    (GstVaapiVideoBuffer *buffer);
void                gst_vaapi_video_buffer_set_image    (GstVaapiVideoBuffer *buffer,
                                                         GstVaapiImage *image);
gboolean            gst_vaapi_video_buffer_set_image_from_pool
                                                        (GstVaapiVideoBuffer *buffer,
                                                         GstVaapiVideoPool *pool);
GstVaapiSurface *   gst_vaapi_video_buffer_get_surface  (GstVaapiVideoBuffer *buffer);
GstVaapiSurfaceProxy * gst_vaapi_video_buffer_get_surface_proxy
                                                        (GstVaapiVideoBuffer *buffer);
void                gst_vaapi_video_buffer_set_surface  (GstVaapiVideoBuffer *buffer,
                                                         GstVaapiSurface *surface);
void                gst_vaapi_video_buffer_set_surface_proxy
                                                        (GstVaapiVideoBuffer *buffer,
                                                         GstVaapiSurfaceProxy *proxy);
gboolean            gst_vaapi_video_buffer_set_surface_from_pool
                                                        (GstVaapiVideoBuffer *buffer,
                                                         GstVaapiVideoPool *pool);

Description

Details

GstVaapiVideoBuffer

typedef struct {
} GstVaapiVideoBuffer;

A GstBuffer holding video objects (GstVaapiSurface and GstVaapiImage).


GstVaapiVideoBufferClass

typedef struct {
} GstVaapiVideoBufferClass;

A GstBuffer holding video objects


gst_vaapi_video_buffer_new ()

GstBuffer *         gst_vaapi_video_buffer_new          (GstVaapiDisplay *display);

Creates an empty GstBuffer. The caller is responsible for completing the initialization of the buffer with the gst_vaapi_video_buffer_set_*() functions.

display :

a GstVaapiDisplay

Returns :

the newly allocated GstBuffer, or NULL or error

gst_vaapi_video_buffer_new_from_pool ()

GstBuffer *         gst_vaapi_video_buffer_new_from_pool
                                                        (GstVaapiVideoPool *pool);

Creates a GstBuffer with a video object allocated from a pool. Only GstVaapiSurfacePool and GstVaapiImagePool pools are supported.

The buffer is destroyed through the last call to gst_buffer_unref() and the video objects are pushed back to their respective pools.

pool :

a GstVaapiVideoPool

Returns :

the newly allocated GstBuffer, or NULL on error

gst_vaapi_video_buffer_new_from_buffer ()

GstBuffer *         gst_vaapi_video_buffer_new_from_buffer
                                                        (GstBuffer *buffer);

Creates a GstBuffer with video objects bound to buffer video objects, if any.

buffer :

a GstBuffer

Returns :

the newly allocated GstBuffer, or NULL on error

gst_vaapi_video_buffer_new_with_image ()

GstBuffer *         gst_vaapi_video_buffer_new_with_image
                                                        (GstVaapiImage *image);

Creates a GstBuffer with the specified image. The resulting buffer holds an additional reference to the image.

image :

a GstVaapiImage

Returns :

the newly allocated GstBuffer, or NULL on error

gst_vaapi_video_buffer_new_with_surface ()

GstBuffer *         gst_vaapi_video_buffer_new_with_surface
                                                        (GstVaapiSurface *surface);

Creates a GstBuffer with the specified surface. The resulting buffer holds an additional reference to the surface.

surface :

a GstVaapiSurface

Returns :

the newly allocated GstBuffer, or NULL on error

gst_vaapi_video_buffer_new_with_surface_proxy ()

GstBuffer *         gst_vaapi_video_buffer_new_with_surface_proxy
                                                        (GstVaapiSurfaceProxy *proxy);

Creates a GstBuffer with the specified surface proxy. The resulting buffer holds an additional reference to the proxy.

proxy :

a GstVaapiSurfaceProxy

Returns :

the newly allocated GstBuffer, or NULL on error

gst_vaapi_video_buffer_get_display ()

GstVaapiDisplay *   gst_vaapi_video_buffer_get_display  (GstVaapiVideoBuffer *buffer);

Retrieves the GstVaapiDisplay the buffer is bound to. The buffer owns the returned GstVaapiDisplay object so the caller is responsible for calling g_object_ref() when needed.

buffer :

a GstVaapiVideoBuffer

Returns :

the GstVaapiDisplay the buffer is bound to

gst_vaapi_video_buffer_get_image ()

GstVaapiImage *     gst_vaapi_video_buffer_get_image    (GstVaapiVideoBuffer *buffer);

Retrieves the GstVaapiImage bound to the buffer. The buffer owns the GstVaapiImage so the caller is responsible for calling g_object_ref() when needed.

buffer :

a GstVaapiVideoBuffer

Returns :

the GstVaapiImage bound to the buffer, or NULL if there is none

gst_vaapi_video_buffer_set_image ()

void                gst_vaapi_video_buffer_set_image    (GstVaapiVideoBuffer *buffer,
                                                         GstVaapiImage *image);

Binds image to the buffer. If the buffer contains another image previously allocated from a pool, it's pushed back to its parent pool and the pool is also released.

buffer :

a GstVaapiVideoBuffer

image :

a GstVaapiImage

gst_vaapi_video_buffer_set_image_from_pool ()

gboolean            gst_vaapi_video_buffer_set_image_from_pool
                                                        (GstVaapiVideoBuffer *buffer,
                                                         GstVaapiVideoPool *pool);

Binds a newly allocated video object from the pool. The pool shall be of type GstVaapiImagePool. Previously allocated objects are released and returned to their parent pools, if any.

buffer :

a GstVaapiVideoBuffer

pool :

a GstVaapiVideoPool

Returns :

TRUE on success

gst_vaapi_video_buffer_get_surface ()

GstVaapiSurface *   gst_vaapi_video_buffer_get_surface  (GstVaapiVideoBuffer *buffer);

Retrieves the GstVaapiSurface bound to the buffer. The buffer owns the GstVaapiSurface so the caller is responsible for calling g_object_ref() when needed.

buffer :

a GstVaapiVideoBuffer

Returns :

the GstVaapiSurface bound to the buffer, or NULL if there is none

gst_vaapi_video_buffer_get_surface_proxy ()

GstVaapiSurfaceProxy * gst_vaapi_video_buffer_get_surface_proxy
                                                        (GstVaapiVideoBuffer *buffer);

Retrieves the GstVaapiSurfaceProxy bound to the buffer. The buffer owns the GstVaapiSurfaceProxy so the caller is responsible for calling g_object_ref() when needed.

buffer :

a GstVaapiVideoBuffer

Returns :

the GstVaapiSurfaceProxy bound to the buffer, or NULL if there is none

gst_vaapi_video_buffer_set_surface ()

void                gst_vaapi_video_buffer_set_surface  (GstVaapiVideoBuffer *buffer,
                                                         GstVaapiSurface *surface);

Binds surface to the buffer. If the buffer contains another surface previously allocated from a pool, it's pushed back to its parent pool and the pool is also released.

buffer :

a GstVaapiVideoBuffer

surface :

a GstVaapiSurface

gst_vaapi_video_buffer_set_surface_proxy ()

void                gst_vaapi_video_buffer_set_surface_proxy
                                                        (GstVaapiVideoBuffer *buffer,
                                                         GstVaapiSurfaceProxy *proxy);

Binds surface proxy to the buffer. If the buffer contains another surface previously allocated from a pool, it's pushed back to its parent pool and the pool is also released.

buffer :

a GstVaapiVideoBuffer

proxy :

a GstVaapiSurfaceProxy

gst_vaapi_video_buffer_set_surface_from_pool ()

gboolean            gst_vaapi_video_buffer_set_surface_from_pool
                                                        (GstVaapiVideoBuffer *buffer,
                                                         GstVaapiVideoPool *pool);

Binds a newly allocated video object from the pool. The pool shall be of type GstVaapiSurfacePool. Previously allocated objects are released and returned to their parent pools, if any.

buffer :

a GstVaapiVideoBuffer

pool :

a GstVaapiVideoPool

Returns :

TRUE on success