mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
libs: add type definitions for GstVaapiPoint and GstVaapiRectangle.
Add helper functions to describe GstVaapiPoint and GstVaapiRectangle structures as a standard GType. This could be useful to have them described as a GValue later on.
This commit is contained in:
parent
d8ffc2c150
commit
53fc8bb4c7
2 changed files with 68 additions and 0 deletions
|
@ -29,6 +29,49 @@
|
||||||
#include <gobject/gvaluecollector.h>
|
#include <gobject/gvaluecollector.h>
|
||||||
#include "gstvaapivalue.h"
|
#include "gstvaapivalue.h"
|
||||||
|
|
||||||
|
static gpointer
|
||||||
|
default_copy_func(gpointer data)
|
||||||
|
{
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
default_free_func(gpointer data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- GstVaapiPoint --- */
|
||||||
|
|
||||||
|
GType
|
||||||
|
gst_vaapi_point_get_type(void)
|
||||||
|
{
|
||||||
|
static volatile gsize g_type = 0;
|
||||||
|
|
||||||
|
if (g_once_init_enter(&g_type)) {
|
||||||
|
GType type = g_boxed_type_register_static(
|
||||||
|
g_intern_static_string("GstVaapiPoint"),
|
||||||
|
default_copy_func, default_free_func);
|
||||||
|
g_once_init_leave(&g_type, type);
|
||||||
|
}
|
||||||
|
return g_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- GstVaapiRectangle --- */
|
||||||
|
|
||||||
|
GType
|
||||||
|
gst_vaapi_rectangle_get_type(void)
|
||||||
|
{
|
||||||
|
static volatile gsize g_type = 0;
|
||||||
|
|
||||||
|
if (g_once_init_enter(&g_type)) {
|
||||||
|
GType type = g_boxed_type_register_static(
|
||||||
|
g_intern_static_string("GstVaapiRectangle"),
|
||||||
|
default_copy_func, default_free_func);
|
||||||
|
g_once_init_leave(&g_type, type);
|
||||||
|
}
|
||||||
|
return g_type;
|
||||||
|
}
|
||||||
|
|
||||||
/* --- GstVaapiRenderMode --- */
|
/* --- GstVaapiRenderMode --- */
|
||||||
|
|
||||||
GType
|
GType
|
||||||
|
|
|
@ -28,6 +28,25 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GST_VAAPI_TYPE_POINT:
|
||||||
|
*
|
||||||
|
* A #GstVaapiPoint type that represents a 2D point coordinates.
|
||||||
|
*
|
||||||
|
* Return value: the GType of #GstVaapiPoint
|
||||||
|
*/
|
||||||
|
#define GST_VAAPI_TYPE_POINT gst_vaapi_point_get_type()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GST_VAAPI_TYPE_RECTANGLE:
|
||||||
|
*
|
||||||
|
* A #GstVaapiRectangle type that represents a 2D rectangle position
|
||||||
|
* and size.
|
||||||
|
*
|
||||||
|
* Return value: the GType of #GstVaapiRectangle
|
||||||
|
*/
|
||||||
|
#define GST_VAAPI_TYPE_RECTANGLE gst_vaapi_rectangle_get_type()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GST_VAAPI_TYPE_RENDER_MODE:
|
* GST_VAAPI_TYPE_RENDER_MODE:
|
||||||
*
|
*
|
||||||
|
@ -47,6 +66,12 @@ G_BEGIN_DECLS
|
||||||
*/
|
*/
|
||||||
#define GST_VAAPI_TYPE_ROTATION gst_vaapi_rotation_get_type()
|
#define GST_VAAPI_TYPE_ROTATION gst_vaapi_rotation_get_type()
|
||||||
|
|
||||||
|
GType
|
||||||
|
gst_vaapi_point_get_type(void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
GType
|
||||||
|
gst_vaapi_rectangle_get_type(void) G_GNUC_CONST;
|
||||||
|
|
||||||
GType
|
GType
|
||||||
gst_vaapi_render_mode_get_type(void) G_GNUC_CONST;
|
gst_vaapi_render_mode_get_type(void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue