mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-16 04:54:12 +00:00
Move GValue specific stuff to a dedicated file.
This commit is contained in:
parent
f8f76fdb36
commit
b182366483
5 changed files with 47 additions and 69 deletions
|
@ -17,8 +17,8 @@ libgstvaapi_source_c = \
|
|||
gstvaapisubpicture.c \
|
||||
gstvaapisurface.c \
|
||||
gstvaapisurfacepool.c \
|
||||
gstvaapitypes.c \
|
||||
gstvaapiutils.c \
|
||||
gstvaapivalue.c \
|
||||
gstvaapivideobuffer.c \
|
||||
gstvaapivideopool.c \
|
||||
gstvaapivideosink.c \
|
||||
|
@ -36,6 +36,7 @@ libgstvaapi_source_h = \
|
|||
gstvaapisurface.h \
|
||||
gstvaapisurfacepool.h \
|
||||
gstvaapitypes.h \
|
||||
gstvaapivalue.h \
|
||||
gstvaapivideobuffer.h \
|
||||
gstvaapivideopool.h \
|
||||
gstvaapivideosink.h \
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "gstvaapiobject.h"
|
||||
#include "gstvaapiobject_priv.h"
|
||||
#include "gstvaapiparamspecs.h"
|
||||
#include "gstvaapivalue.h"
|
||||
#include "gstvaapimarshal.h"
|
||||
|
||||
#define DEBUG 1
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "config.h"
|
||||
#include <va/va.h>
|
||||
#include "gstvaapiparamspecs.h"
|
||||
#include "gstvaapivalue.h"
|
||||
|
||||
/* --- GstVaapiParamSpecID --- */
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#ifndef GST_VAAPI_TYPES_H
|
||||
#define GST_VAAPI_TYPES_H
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <glib.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -70,32 +70,6 @@ typedef guint64 GstVaapiID;
|
|||
*/
|
||||
#define GST_VAAPI_ID_ARGS(id) GUINT_TO_POINTER(id)
|
||||
|
||||
/**
|
||||
* GST_VAAPI_TYPE_ID:
|
||||
*
|
||||
* A #GValue type that represents a VA identifier.
|
||||
*
|
||||
* Return value: the #GType of GstVaapiID
|
||||
*/
|
||||
#define GST_VAAPI_TYPE_ID gst_vaapi_id_get_type()
|
||||
|
||||
/**
|
||||
* GST_VAAPI_VALUE_HOLDS_ID:
|
||||
* @x: the #GValue to check
|
||||
*
|
||||
* Checks if the given #GValue contains a #GstVaapiID value.
|
||||
*/
|
||||
#define GST_VAAPI_VALUE_HOLDS_ID(x) (G_VALUE_HOLDS((x), GST_VAAPI_TYPE_ID))
|
||||
|
||||
GType
|
||||
gst_vaapi_id_get_type(void);
|
||||
|
||||
GstVaapiID
|
||||
gst_vaapi_value_get_id(const GValue *value);
|
||||
|
||||
void
|
||||
gst_vaapi_value_set_id(GValue *value, GstVaapiID id);
|
||||
|
||||
/**
|
||||
* GstVaapiPoint:
|
||||
* @x: X coordinate
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* gstvaapitypes.h - Basic types
|
||||
* gstvaapivalue.c - GValue implementations specific to VA-API
|
||||
*
|
||||
* gstreamer-vaapi (C) 2010 Splitted-Desktop Systems
|
||||
*
|
||||
|
@ -19,14 +19,51 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* SECTION:gstvaapitypes
|
||||
* @short_description: Basic types
|
||||
* SECTION:gstvaapivalue
|
||||
* @short_description: GValue implementations specific to VA-API
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <gst/gstvalue.h>
|
||||
#include <gobject/gvaluecollector.h>
|
||||
#include "gstvaapitypes.h"
|
||||
#include "gstvaapivalue.h"
|
||||
|
||||
static GTypeInfo gst_vaapi_type_info = {
|
||||
0,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static GTypeFundamentalInfo gst_vaapi_type_finfo = {
|
||||
0
|
||||
};
|
||||
|
||||
#define GST_VAAPI_TYPE_DEFINE(type, name) \
|
||||
GType gst_vaapi_ ## type ## _get_type(void) \
|
||||
{ \
|
||||
static GType gst_vaapi_ ## type ## _type = 0; \
|
||||
\
|
||||
if (G_UNLIKELY(gst_vaapi_ ## type ## _type == 0)) { \
|
||||
gst_vaapi_type_info.value_table = \
|
||||
&gst_vaapi_ ## type ## _value_table; \
|
||||
gst_vaapi_ ## type ## _type = g_type_register_fundamental( \
|
||||
g_type_fundamental_next(), \
|
||||
name, \
|
||||
&gst_vaapi_type_info, \
|
||||
&gst_vaapi_type_finfo, \
|
||||
0 \
|
||||
); \
|
||||
} \
|
||||
return gst_vaapi_ ## type ## _type; \
|
||||
}
|
||||
|
||||
/* --- GstVaapiID --- */
|
||||
|
||||
#if GST_VAAPI_TYPE_ID_SIZE == 4
|
||||
# define GST_VAAPI_VALUE_ID_(cvalue) ((cvalue).v_int)
|
||||
|
@ -82,42 +119,6 @@ gst_vaapi_value_id_lcopy(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static GTypeInfo gst_vaapi_type_info = {
|
||||
0,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static GTypeFundamentalInfo gst_vaapi_type_finfo = {
|
||||
0
|
||||
};
|
||||
|
||||
#define GST_VAAPI_TYPE_DEFINE(type, name) \
|
||||
GType gst_vaapi_ ## type ## _get_type(void) \
|
||||
{ \
|
||||
static GType gst_vaapi_ ## type ## _type = 0; \
|
||||
\
|
||||
if (G_UNLIKELY(gst_vaapi_ ## type ## _type == 0)) { \
|
||||
gst_vaapi_type_info.value_table = \
|
||||
&gst_vaapi_ ## type ## _value_table; \
|
||||
gst_vaapi_ ## type ## _type = g_type_register_fundamental( \
|
||||
g_type_fundamental_next(), \
|
||||
name, \
|
||||
&gst_vaapi_type_info, \
|
||||
&gst_vaapi_type_finfo, \
|
||||
0 \
|
||||
); \
|
||||
} \
|
||||
return gst_vaapi_ ## type ## _type; \
|
||||
}
|
||||
|
||||
static const GTypeValueTable gst_vaapi_id_value_table = {
|
||||
gst_vaapi_value_id_init,
|
||||
NULL,
|
Loading…
Reference in a new issue