Move GValue specific stuff to a dedicated file.
authorgb <gb@5584edef-b1fe-4b99-b61b-dd2bab72e969>
Wed, 24 Mar 2010 13:37:38 +0000 (13:37 +0000)
committergb <gb@5584edef-b1fe-4b99-b61b-dd2bab72e969>
Wed, 24 Mar 2010 13:37:38 +0000 (13:37 +0000)
gst-libs/gst/vaapi/Makefile.am
gst-libs/gst/vaapi/gstvaapiobject.c
gst-libs/gst/vaapi/gstvaapiparamspecs.c
gst-libs/gst/vaapi/gstvaapitypes.h
gst-libs/gst/vaapi/gstvaapivalue.c [moved from gst-libs/gst/vaapi/gstvaapitypes.c with 95% similarity]

index 4b8280d..f1ecfce 100644 (file)
@@ -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                     \
index 41b5372..32f82f1 100644 (file)
@@ -27,6 +27,7 @@
 #include "gstvaapiobject.h"
 #include "gstvaapiobject_priv.h"
 #include "gstvaapiparamspecs.h"
+#include "gstvaapivalue.h"
 #include "gstvaapimarshal.h"
 
 #define DEBUG 1
index f297a9c..0409c6f 100644 (file)
@@ -21,6 +21,7 @@
 #include "config.h"
 #include <va/va.h>
 #include "gstvaapiparamspecs.h"
+#include "gstvaapivalue.h"
 
 /* --- GstVaapiParamSpecID --- */
 
index 48aadd3..451486a 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef GST_VAAPI_TYPES_H
 #define GST_VAAPI_TYPES_H
 
-#include <glib-object.h>
+#include <glib.h>
 
 G_BEGIN_DECLS
 
@@ -71,32 +71,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
  * @y: Y coordinate
similarity index 95%
rename from gst-libs/gst/vaapi/gstvaapitypes.c
rename to gst-libs/gst/vaapi/gstvaapivalue.c
index 42eef03..1ba30de 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  gstvaapitypes.h - Basic types
+ *  gstvaapivalue.c - GValue implementations specific to VA-API
  *
  *  gstreamer-vaapi (C) 2010 Splitted-Desktop Systems
  *
  */
 
 /**
- * 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,