Move GST_VAAPI_DISPLAY_VADISPLAY() and GST_VAAPI_DISPLAY_{LOCK,UNLOCK}() to gstvaapid...
authorgb <gb@5584edef-b1fe-4b99-b61b-dd2bab72e969>
Thu, 1 Apr 2010 09:47:59 +0000 (09:47 +0000)
committergb <gb@5584edef-b1fe-4b99-b61b-dd2bab72e969>
Thu, 1 Apr 2010 09:47:59 +0000 (09:47 +0000)
15 files changed:
gst-libs/gst/vaapi/Makefile.am
gst-libs/gst/vaapi/gstvaapi_priv.h [new file with mode: 0644]
gst-libs/gst/vaapi/gstvaapidisplay.c
gst-libs/gst/vaapi/gstvaapidisplay.h
gst-libs/gst/vaapi/gstvaapidisplay_glx.c
gst-libs/gst/vaapi/gstvaapidisplay_priv.h [new file with mode: 0644]
gst-libs/gst/vaapi/gstvaapidisplay_x11.c
gst-libs/gst/vaapi/gstvaapiimage.c
gst-libs/gst/vaapi/gstvaapiobject.c
gst-libs/gst/vaapi/gstvaapisubpicture.c
gst-libs/gst/vaapi/gstvaapisurface.c
gst-libs/gst/vaapi/gstvaapitexture.c
gst-libs/gst/vaapi/gstvaapiwindow.c
gst-libs/gst/vaapi/gstvaapiwindow_glx.c
gst-libs/gst/vaapi/gstvaapiwindow_x11.c

index e650c85..3a9295b 100644 (file)
@@ -50,8 +50,10 @@ libgstvaapi_source_h =                               \
 libgstvaapi_source_priv_h =                    \
        gstvaapicompat.h                        \
        gstvaapidebug.h                         \
+       gstvaapidisplay_priv.h                  \
        gstvaapiobject_priv.h                   \
        gstvaapiutils.h                         \
+       gstvaapi_priv.h                         \
        $(NULL)
 
 libgstvaapi_x11_source_c =                     \
diff --git a/gst-libs/gst/vaapi/gstvaapi_priv.h b/gst-libs/gst/vaapi/gstvaapi_priv.h
new file mode 100644 (file)
index 0000000..fa8ce58
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ *  gstvaapi_priv.h - Helper to include all private headers
+ *
+ *  gstreamer-vaapi (C) 2010 Splitted-Desktop Systems
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+ */
+
+#ifndef GST_VAAPI_PRIV_H
+#define GST_VAAPI_PRIV_H
+
+#include <gst/vaapi/gstvaapiobject_priv.h>
+#include <gst/vaapi/gstvaapidisplay_priv.h>
+
+#endif /* GST_VAAPI_PRIV_H */
index ff10126..d879a18 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "gstvaapiutils.h"
 #include "gstvaapidisplay.h"
+#include "gstvaapidisplay_priv.h"
 
 #define DEBUG 1
 #include "gstvaapidebug.h"
@@ -34,26 +35,6 @@ GST_DEBUG_CATEGORY(gst_debug_vaapi);
 
 G_DEFINE_TYPE(GstVaapiDisplay, gst_vaapi_display, G_TYPE_OBJECT);
 
-#define GST_VAAPI_DISPLAY_GET_PRIVATE(obj)                      \
-    (G_TYPE_INSTANCE_GET_PRIVATE((obj),                         \
-                                 GST_VAAPI_TYPE_DISPLAY,       \
-                                 GstVaapiDisplayPrivate))
-
-struct _GstVaapiDisplayPrivate {
-    GStaticMutex        mutex;
-    VADisplay           display;
-    guint               width;
-    guint               height;
-    guint               width_mm;
-    guint               height_mm;
-    guint               par_n;
-    guint               par_d;
-    GArray             *profiles;
-    GArray             *image_formats;
-    GArray             *subpicture_formats;
-    guint               create_display  : 1;
-};
-
 enum {
     PROP_0,
 
index e654be6..8f605f8 100644 (file)
@@ -56,33 +56,6 @@ G_BEGIN_DECLS
                                GST_VAAPI_TYPE_DISPLAY,  \
                                GstVaapiDisplayClass))
 
-/**
- * GST_VAAPI_DISPLAY_VADISPLAY:
- * @display: a #GstVaapiDisplay
- *
- * Macro that evaluates to the #VADisplay bound to @display
- */
-#define GST_VAAPI_DISPLAY_VADISPLAY(display) \
-    gst_vaapi_display_get_display(display)
-
-/**
- * GST_VAAPI_DISPLAY_LOCK:
- * @display: a #GstVaapiDisplay
- *
- * Locks @display
- */
-#define GST_VAAPI_DISPLAY_LOCK(display) \
-    gst_vaapi_display_lock(display)
-
-/**
- * GST_VAAPI_DISPLAY_UNLOCK:
- * @display: a #GstVaapiDisplay
- *
- * Unlocks @display
- */
-#define GST_VAAPI_DISPLAY_UNLOCK(display) \
-    gst_vaapi_display_unlock(display)
-
 typedef struct _GstVaapiDisplay                 GstVaapiDisplay;
 typedef struct _GstVaapiDisplayPrivate          GstVaapiDisplayPrivate;
 typedef struct _GstVaapiDisplayClass            GstVaapiDisplayClass;
index c4722d3..d6d4e46 100644 (file)
@@ -27,6 +27,7 @@
 #include "gstvaapicompat.h"
 #include "gstvaapiutils.h"
 #include "gstvaapidisplay_glx.h"
+#include "gstvaapidisplay_priv.h"
 
 #define DEBUG 1
 #include "gstvaapidebug.h"
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay_priv.h b/gst-libs/gst/vaapi/gstvaapidisplay_priv.h
new file mode 100644 (file)
index 0000000..7cc40fd
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ *  gstvaapidisplay_priv.h - Base VA display (private definitions)
+ *
+ *  gstreamer-vaapi (C) 2010 Splitted-Desktop Systems
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+ */
+
+#ifndef GST_VAAPI_DISPLAY_PRIV_H
+#define GST_VAAPI_DISPLAY_PRIV_H
+
+#include <gst/vaapi/gstvaapidisplay.h>
+
+G_BEGIN_DECLS
+
+#define GST_VAAPI_DISPLAY_GET_PRIVATE(obj)                      \
+    (G_TYPE_INSTANCE_GET_PRIVATE((obj),                         \
+                                 GST_VAAPI_TYPE_DISPLAY,       \
+                                 GstVaapiDisplayPrivate))
+
+#define GST_VAAPI_DISPLAY_CAST(display) ((GstVaapiDisplay *)(display))
+
+/**
+ * GST_VAAPI_DISPLAY_VADISPLAY:
+ * @display_: a #GstVaapiDisplay
+ *
+ * Macro that evaluates to the #VADisplay of @display.
+ * This is an internal macro that does not do any run-time type check.
+ */
+#define GST_VAAPI_DISPLAY_VADISPLAY(display_) \
+    GST_VAAPI_DISPLAY_CAST(display_)->priv->display
+
+/**
+ * GST_VAAPI_DISPLAY_LOCK:
+ * @display: a #GstVaapiDisplay
+ *
+ * Locks @display
+ */
+#define GST_VAAPI_DISPLAY_LOCK(display) \
+    gst_vaapi_display_lock(display)
+
+/**
+ * GST_VAAPI_DISPLAY_UNLOCK:
+ * @display: a #GstVaapiDisplay
+ *
+ * Unlocks @display
+ */
+#define GST_VAAPI_DISPLAY_UNLOCK(display) \
+    gst_vaapi_display_unlock(display)
+
+/**
+ * GstVaapiDisplayPrivate:
+ *
+ * Base class for VA displays.
+ */
+struct _GstVaapiDisplayPrivate {
+    GStaticMutex        mutex;
+    VADisplay           display;
+    guint               width;
+    guint               height;
+    guint               width_mm;
+    guint               height_mm;
+    guint               par_n;
+    guint               par_d;
+    GArray             *profiles;
+    GArray             *image_formats;
+    GArray             *subpicture_formats;
+    guint               create_display  : 1;
+};
+
+G_END_DECLS
+
+#endif /* GST_VAAPI_DISPLAY_PRIV_H */
index ebfa14b..b0f6bdf 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "gstvaapiutils.h"
 #include "gstvaapidisplay_x11.h"
+#include "gstvaapidisplay_priv.h"
 
 #define DEBUG 1
 #include "gstvaapidebug.h"
index d21bda2..3cc2251 100644 (file)
@@ -28,7 +28,7 @@
 #include "gstvaapicompat.h"
 #include "gstvaapiutils.h"
 #include "gstvaapiimage.h"
-#include "gstvaapiobject_priv.h"
+#include "gstvaapi_priv.h"
 
 #define DEBUG 1
 #include "gstvaapidebug.h"
index 9c627b8..368166f 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "config.h"
 #include "gstvaapiobject.h"
-#include "gstvaapiobject_priv.h"
+#include "gstvaapi_priv.h"
 #include "gstvaapiparamspecs.h"
 #include "gstvaapivalue.h"
 #include "gstvaapimarshal.h"
index 4566a32..ae79b78 100644 (file)
@@ -28,7 +28,7 @@
 #include "gstvaapicompat.h"
 #include "gstvaapiutils.h"
 #include "gstvaapisubpicture.h"
-#include "gstvaapiobject_priv.h"
+#include "gstvaapi_priv.h"
 
 #define DEBUG 1
 #include "gstvaapidebug.h"
index 635f111..08269a8 100644 (file)
@@ -28,7 +28,7 @@
 #include "gstvaapiutils.h"
 #include "gstvaapisurface.h"
 #include "gstvaapiimage.h"
-#include "gstvaapiobject_priv.h"
+#include "gstvaapi_priv.h"
 
 #define DEBUG 1
 #include "gstvaapidebug.h"
index 155d7d4..92f9994 100644 (file)
@@ -29,7 +29,7 @@
 #include "gstvaapiutils.h"
 #include "gstvaapiutils_glx.h"
 #include "gstvaapidisplay_glx.h"
-#include "gstvaapiobject_priv.h"
+#include "gstvaapi_priv.h"
 
 #define DEBUG 1
 #include "gstvaapidebug.h"
index 5f521d4..8e5e58b 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "config.h"
 #include "gstvaapiwindow.h"
-#include "gstvaapiobject_priv.h"
+#include "gstvaapi_priv.h"
 
 #define DEBUG 1
 #include "gstvaapidebug.h"
index bd905e9..d050c4f 100644 (file)
@@ -28,7 +28,7 @@
 #include "gstvaapidisplay_x11.h"
 #include "gstvaapiutils_x11.h"
 #include "gstvaapiutils_glx.h"
-#include "gstvaapiobject_priv.h"
+#include "gstvaapi_priv.h"
 
 #define DEBUG 1
 #include "gstvaapidebug.h"
index f10860c..f2ffbef 100644 (file)
@@ -31,7 +31,7 @@
 #include "gstvaapidisplay_x11.h"
 #include "gstvaapiutils.h"
 #include "gstvaapiutils_x11.h"
-#include "gstvaapiobject_priv.h"
+#include "gstvaapi_priv.h"
 
 #define DEBUG 1
 #include "gstvaapidebug.h"