GstVaapiVideoMeta

GstVaapiVideoMeta — VA video meta for GStreamer

Synopsis

GstVaapiVideoMeta * gst_vaapi_video_meta_new            (GstVaapiDisplay *display);
GstVaapiVideoMeta * gst_vaapi_video_meta_new_from_pool  (GstVaapiVideoPool *pool);
GstVaapiVideoMeta * gst_vaapi_video_meta_new_with_image (GstVaapiImage *image);
GstVaapiVideoMeta * gst_vaapi_video_meta_new_with_surface
                                                        (GstVaapiSurface *surface);
GstVaapiVideoMeta * gst_vaapi_video_meta_new_with_surface_proxy
                                                        (GstVaapiSurfaceProxy *proxy);
GstVaapiVideoMeta * gst_vaapi_video_meta_ref            (GstVaapiVideoMeta *meta);
void                gst_vaapi_video_meta_unref          (GstVaapiVideoMeta *meta);
void                gst_vaapi_video_meta_replace        (GstVaapiVideoMeta **old_meta_ptr,
                                                         GstVaapiVideoMeta *new_meta);
GstVaapiDisplay *   gst_vaapi_video_meta_get_display    (GstVaapiVideoMeta *meta);
GstVaapiImage *     gst_vaapi_video_meta_get_image      (GstVaapiVideoMeta *meta);
void                gst_vaapi_video_meta_set_image      (GstVaapiVideoMeta *meta,
                                                         GstVaapiImage *image);
gboolean            gst_vaapi_video_meta_set_image_from_pool
                                                        (GstVaapiVideoMeta *meta,
                                                         GstVaapiVideoPool *pool);
GstVaapiSurface *   gst_vaapi_video_meta_get_surface    (GstVaapiVideoMeta *meta);
void                gst_vaapi_video_meta_set_surface    (GstVaapiVideoMeta *meta,
                                                         GstVaapiSurface *surface);
gboolean            gst_vaapi_video_meta_set_surface_from_pool
                                                        (GstVaapiVideoMeta *meta,
                                                         GstVaapiVideoPool *pool);
void                gst_vaapi_video_meta_set_surface_converter
                                                        (GstVaapiVideoMeta *meta,
                                                         GFunc func);
GFunc               gst_vaapi_video_meta_get_surface_converter
                                                        (GstVaapiVideoMeta *meta);
GstVaapiSurfaceProxy * gst_vaapi_video_meta_get_surface_proxy
                                                        (GstVaapiVideoMeta *meta);
void                gst_vaapi_video_meta_set_surface_proxy
                                                        (GstVaapiVideoMeta *meta,
                                                         GstVaapiSurfaceProxy *proxy);
guint               gst_vaapi_video_meta_get_render_flags
                                                        (GstVaapiVideoMeta *meta);
void                gst_vaapi_video_meta_set_render_flags
                                                        (GstVaapiVideoMeta *meta,
                                                         guint flags);

Description

Details

gst_vaapi_video_meta_new ()

GstVaapiVideoMeta * gst_vaapi_video_meta_new            (GstVaapiDisplay *display);

Creates an empty GstVaapiVideoMeta. The caller is responsible for completing the initialization of the meta with the gst_vaapi_video_meta_set_*() functions.

This function shall only be called from within gstreamer-vaapi plugin elements.

display :

a GstVaapiDisplay

Returns :

the newly allocated GstVaapiVideoMeta, or NULL or error

gst_vaapi_video_meta_new_from_pool ()

GstVaapiVideoMeta * gst_vaapi_video_meta_new_from_pool  (GstVaapiVideoPool *pool);

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

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

pool :

a GstVaapiVideoPool

Returns :

the newly allocated GstVaapiVideoMeta, or NULL on error

gst_vaapi_video_meta_new_with_image ()

GstVaapiVideoMeta * gst_vaapi_video_meta_new_with_image (GstVaapiImage *image);

Creates a GstVaapiVideoMeta with the specified image. The resulting meta holds an additional reference to the image.

This function shall only be called from within gstreamer-vaapi plugin elements.

image :

a GstVaapiImage

Returns :

the newly allocated GstVaapiVideoMeta, or NULL on error

gst_vaapi_video_meta_new_with_surface ()

GstVaapiVideoMeta * gst_vaapi_video_meta_new_with_surface
                                                        (GstVaapiSurface *surface);

Creates a GstVaapiVideoMeta with the specified surface. The resulting meta holds an additional reference to the surface.

This function shall only be called from within gstreamer-vaapi plugin elements.

surface :

a GstVaapiSurface

Returns :

the newly allocated GstVaapiVideoMeta, or NULL on error

gst_vaapi_video_meta_new_with_surface_proxy ()

GstVaapiVideoMeta * gst_vaapi_video_meta_new_with_surface_proxy
                                                        (GstVaapiSurfaceProxy *proxy);

Creates a GstVaapiVideoMeta with the specified surface proxy. The resulting meta holds an additional reference to the proxy.

This function shall only be called from within gstreamer-vaapi plugin elements.

proxy :

a GstVaapiSurfaceProxy

Returns :

the newly allocated GstVaapiVideoMeta, or NULL on error

gst_vaapi_video_meta_ref ()

GstVaapiVideoMeta * gst_vaapi_video_meta_ref            (GstVaapiVideoMeta *meta);

Atomically increases the reference count of the given meta by one.

meta :

a GstVaapiVideoMeta

Returns :

The same meta argument

gst_vaapi_video_meta_unref ()

void                gst_vaapi_video_meta_unref          (GstVaapiVideoMeta *meta);

Atomically decreases the reference count of the meta by one. If the reference count reaches zero, the object will be free'd.

meta :

a GstVaapiVideoMeta

gst_vaapi_video_meta_replace ()

void                gst_vaapi_video_meta_replace        (GstVaapiVideoMeta **old_meta_ptr,
                                                         GstVaapiVideoMeta *new_meta);

new_meta. This means that old_meta_ptr shall reference a valid Atomically replaces the meta object held in old_meta_ptr with object. However, new_meta can be NULL.

old_meta_ptr :

a pointer to a GstVaapiVideoMeta

new_meta :

a GstVaapiVideoMeta

gst_vaapi_video_meta_get_display ()

GstVaapiDisplay *   gst_vaapi_video_meta_get_display    (GstVaapiVideoMeta *meta);

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

meta :

a GstVaapiVideoMeta

Returns :

the GstVaapiDisplay the meta is bound to

gst_vaapi_video_meta_get_image ()

GstVaapiImage *     gst_vaapi_video_meta_get_image      (GstVaapiVideoMeta *meta);

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

meta :

a GstVaapiVideoMeta

Returns :

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

gst_vaapi_video_meta_set_image ()

void                gst_vaapi_video_meta_set_image      (GstVaapiVideoMeta *meta,
                                                         GstVaapiImage *image);

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

meta :

a GstVaapiVideoMeta

image :

a GstVaapiImage

gst_vaapi_video_meta_set_image_from_pool ()

gboolean            gst_vaapi_video_meta_set_image_from_pool
                                                        (GstVaapiVideoMeta *meta,
                                                         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.

meta :

a GstVaapiVideoMeta

pool :

a GstVaapiVideoPool

Returns :

TRUE on success

gst_vaapi_video_meta_get_surface ()

GstVaapiSurface *   gst_vaapi_video_meta_get_surface    (GstVaapiVideoMeta *meta);

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

meta :

a GstVaapiVideoMeta

Returns :

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

gst_vaapi_video_meta_set_surface ()

void                gst_vaapi_video_meta_set_surface    (GstVaapiVideoMeta *meta,
                                                         GstVaapiSurface *surface);

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

meta :

a GstVaapiVideoMeta

surface :

a GstVaapiSurface

gst_vaapi_video_meta_set_surface_from_pool ()

gboolean            gst_vaapi_video_meta_set_surface_from_pool
                                                        (GstVaapiVideoMeta *meta,
                                                         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.

meta :

a GstVaapiVideoMeta

pool :

a GstVaapiVideoPool

Returns :

TRUE on success

gst_vaapi_video_meta_set_surface_converter ()

void                gst_vaapi_video_meta_set_surface_converter
                                                        (GstVaapiVideoMeta *meta,
                                                         GFunc func);

Sets the meta surface converter function to func.

meta :

a GstVaapiVideoMeta

func :

a pointer to the surface converter function

gst_vaapi_video_meta_get_surface_converter ()

GFunc               gst_vaapi_video_meta_get_surface_converter
                                                        (GstVaapiVideoMeta *meta);

Retrieves the surface converter bound to the meta.

meta :

a GstVaapiVideoMeta

Returns :

the surface converter associated with the video meta

gst_vaapi_video_meta_get_surface_proxy ()

GstVaapiSurfaceProxy * gst_vaapi_video_meta_get_surface_proxy
                                                        (GstVaapiVideoMeta *meta);

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

meta :

a GstVaapiVideoMeta

Returns :

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

gst_vaapi_video_meta_set_surface_proxy ()

void                gst_vaapi_video_meta_set_surface_proxy
                                                        (GstVaapiVideoMeta *meta,
                                                         GstVaapiSurfaceProxy *proxy);

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

meta :

a GstVaapiVideoMeta

proxy :

a GstVaapiSurfaceProxy

gst_vaapi_video_meta_get_render_flags ()

guint               gst_vaapi_video_meta_get_render_flags
                                                        (GstVaapiVideoMeta *meta);

Retrieves the surface render flags bound to the meta.

meta :

a GstVaapiVideoMeta

Returns :

a combination for GstVaapiSurfaceRenderFlags

gst_vaapi_video_meta_set_render_flags ()

void                gst_vaapi_video_meta_set_render_flags
                                                        (GstVaapiVideoMeta *meta,
                                                         guint flags);

Sets GstVaapiSurfaceRenderFlags to the meta.

meta :

a GstVaapiVideoMeta

flags :

a set of surface render flags