libs: check that private headers remain private.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 23 Jan 2014 09:20:40 +0000 (10:20 +0100)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 23 Jan 2014 13:29:09 +0000 (14:29 +0100)
Make sure that libgstvaapi private headers remain internally used to
build libgstvaapi libraries only. All header dependencies were reviewed
and checks for IN_LIBGSTVAAPI definition were added accordingly.

Also rename GST_VAAPI_CORE definition to IN_LIBGSTVAAPI_CORE to keep
consistency.

13 files changed:
gst-libs/gst/vaapi/Makefile.am
gst-libs/gst/vaapi/gstvaapidecoder_unit.h
gst-libs/gst/vaapi/gstvaapidisplay_priv.h
gst-libs/gst/vaapi/gstvaapidisplaycache.h
gst-libs/gst/vaapi/gstvaapiminiobject.h
gst-libs/gst/vaapi/gstvaapiobject_priv.h
gst-libs/gst/vaapi/gstvaapipixmap_priv.h
gst-libs/gst/vaapi/gstvaapiutils.h
gst-libs/gst/vaapi/gstvaapiutils_glx.h
gst-libs/gst/vaapi/gstvaapiutils_h264_priv.h
gst-libs/gst/vaapi/gstvaapiutils_mpeg2_priv.h
gst-libs/gst/vaapi/gstvaapiutils_x11.h
gst-libs/gst/vaapi/gstvaapiwindow_priv.h

index 390d91eb925fab9f1b84c33e6c6b205f8e4a54f3..11efb4b63efdf176e09caf12b5618224afff0124 100644 (file)
@@ -20,7 +20,8 @@ libgstvaapi_includedir = \
        $(includedir)/gstreamer-$(GST_API_VERSION)/gst/vaapi
 
 libgstvaapi_cflags =                           \
-       -DGST_VAAPI_CORE                        \
+       -DIN_LIBGSTVAAPI                        \
+       -DIN_LIBGSTVAAPI_CORE                   \
        -DGST_USE_UNSTABLE_API                  \
        -I$(top_srcdir)/gst-libs                \
        -I$(top_builddir)/gst-libs              \
@@ -130,6 +131,7 @@ libgstvaapi_source_priv_h =                 \
        gstvaapivideopool_priv.h                \
        gstvaapiwindow_priv.h                   \
        gstvaapiworkarounds.h                   \
+       libgstvaapi_priv_check.h                \
        sysdeps.h                               \
        $(NULL)
 
@@ -291,6 +293,7 @@ libgstvaapi_drm_@GST_API_VERSION@includedir =       \
        $(libgstvaapi_includedir)
 
 libgstvaapi_drm_@GST_API_VERSION@_la_CFLAGS =  \
+       -DIN_LIBGSTVAAPI                        \
        -DGST_USE_UNSTABLE_API                  \
        -I$(top_srcdir)/gst-libs                \
        $(GLIB_CFLAGS)                          \
@@ -327,6 +330,7 @@ libgstvaapi_x11_@GST_API_VERSION@includedir =       \
        $(libgstvaapi_includedir)
 
 libgstvaapi_x11_@GST_API_VERSION@_la_CFLAGS =  \
+       -DIN_LIBGSTVAAPI                        \
        -DGST_USE_UNSTABLE_API                  \
        -I$(top_srcdir)/gst-libs                \
        $(GLIB_CFLAGS)                          \
@@ -365,6 +369,7 @@ libgstvaapi_glx_@GST_API_VERSION@includedir =       \
        $(libgstvaapi_includedir)
 
 libgstvaapi_glx_@GST_API_VERSION@_la_CFLAGS =  \
+       -DIN_LIBGSTVAAPI                        \
        -DGST_USE_UNSTABLE_API                  \
        -I$(top_srcdir)/gst-libs                \
        $(GLIB_CFLAGS)                          \
@@ -402,6 +407,7 @@ libgstvaapi_wayland_@GST_API_VERSION@includedir = \
        $(libgstvaapi_includedir)
 
 libgstvaapi_wayland_@GST_API_VERSION@_la_CFLAGS = \
+       -DIN_LIBGSTVAAPI                        \
        -DGST_USE_UNSTABLE_API                  \
        -I$(top_srcdir)/gst-libs                \
        $(GLIB_CFLAGS)                          \
index 7ee77a05cf571dd3a85b16be2c6de75d57c81f8e..32fa9bb4580e7aeed7bce529cda04fa9a71d1155 100644 (file)
@@ -23,6 +23,8 @@
 #ifndef GST_VAAPI_DECODER_UNIT_H
 #define GST_VAAPI_DECODER_UNIT_H
 
+#include "libgstvaapi_priv_check.h"
+
 G_BEGIN_DECLS
 
 typedef struct _GstVaapiDecoderUnit             GstVaapiDecoderUnit;
index 1d1396427b6917aa4c65b597f624d4ad9754dd93..92d466aa8c15699c3b3db800787474e36c675c17 100644 (file)
@@ -227,7 +227,7 @@ gst_vaapi_display_get_display_types (GstVaapiDisplay * display)
 }
 
 /* Inline reference counting for core libgstvaapi library */
-#ifdef GST_VAAPI_CORE
+#ifdef IN_LIBGSTVAAPI_CORE
 #define gst_vaapi_display_ref_internal(display) \
     ((gpointer)gst_vaapi_mini_object_ref(GST_VAAPI_MINI_OBJECT(display)))
 
index bbd243673521d64113ec429b483472b58e0aa274..62f7b901c38fb4f4e8a95946b61637573aafd374 100644 (file)
@@ -23,6 +23,7 @@
 #ifndef GSTVAAPIDISPLAYCACHE_H
 #define GSTVAAPIDISPLAYCACHE_H
 
+#include "libgstvaapi_priv_check.h"
 #include <gst/vaapi/gstvaapidisplay.h>
 
 typedef struct _GstVaapiDisplayCache            GstVaapiDisplayCache;
index 5f5ada948d77c3aa5eb1478d04d84dfcc0fa80c6..058378d470721b7e36f4162fea853ed1e38c701f 100644 (file)
@@ -24,6 +24,7 @@
 #define GST_VAAPI_MINI_OBJECT_H
 
 #include <glib.h>
+#include "libgstvaapi_priv_check.h"
 
 G_BEGIN_DECLS
 
index 4c91149c9fed76b22b706409a1af847a0bd9e09c..f6f3a5860ca2a249b9efb42391cf0faf6c97b9db 100644 (file)
@@ -219,7 +219,7 @@ gst_vaapi_object_new(const GstVaapiObjectClass *klass,
     GstVaapiDisplay *display);
 
 /* Inline reference counting for core libgstvaapi library */
-#ifdef GST_VAAPI_CORE
+#ifdef IN_LIBGSTVAAPI_CORE
 static inline gpointer
 gst_vaapi_object_ref_internal(gpointer object)
 {
index 577fda884b2211c9223d836f5b2a02ebcc5e72bd..9219bf65965965594c8bb3c0364d18187a2a0ce9 100644 (file)
@@ -109,7 +109,7 @@ gst_vaapi_pixmap_new_from_native(const GstVaapiPixmapClass *pixmap_class,
     GstVaapiDisplay *display, gpointer native_pixmap);
 
 /* Inline reference counting for core libgstvaapi library */
-#ifdef GST_VAAPI_CORE
+#ifdef IN_LIBGSTVAAPI_CORE
 #define gst_vaapi_pixmap_ref_internal(pixmap) \
     ((gpointer)gst_vaapi_mini_object_ref(GST_VAAPI_MINI_OBJECT(pixmap)))
 
index 21d13c2665e0f68d6f0a9a06700351161276754b..9fcab47146123ff3f4d5813b6d942c4f7f829c1e 100644 (file)
@@ -26,6 +26,7 @@
 #define GST_VAAPI_UTILS_H
 
 #include "config.h"
+#include "libgstvaapi_priv_check.h"
 #include <glib.h>
 #include <va/va.h>
 
index 5d4f75a727a79c1e649ef0fd49c076653bec3878..3df92ae8e4161c37c38582b28bb005aaeb70a142 100644 (file)
@@ -26,6 +26,7 @@
 #define GST_VAAPI_UTILS_GLX_H
 
 #include "config.h"
+#include "libgstvaapi_priv_check.h"
 #include <GL/gl.h>
 #include <GL/glext.h>
 #include <GL/glx.h>
index 5bfbf874b0b0401089cf5d6c59a20062a6b727bd..85eb184c9ea284914afd279e2e527ca75edce737 100644 (file)
@@ -24,6 +24,7 @@
 #define GST_VAAPI_UTILS_H264_PRIV_H
 
 #include "gstvaapiutils_h264.h"
+#include "libgstvaapi_priv_check.h"
 
 G_BEGIN_DECLS
 
index 179fed3e2b7b54aebe1fe46af28457921e7ad033..3f96eca6acf92a732424531e298f37feb116e6e3 100644 (file)
@@ -24,6 +24,7 @@
 #define GST_VAAPI_UTILS_MPEG2_PRIV_H
 
 #include "gstvaapiutils_mpeg2.h"
+#include "libgstvaapi_priv_check.h"
 
 G_BEGIN_DECLS
 
index 1229b34cff55c285b430535f1580fd4b38820fa1..f6faf257fc4b9a8223e61f601f733347374e341c 100644 (file)
@@ -26,6 +26,7 @@
 #define GST_VAAPI_UTILS_X11_H
 
 #include "config.h"
+#include "libgstvaapi_priv_check.h"
 #include <X11/Xlib.h>
 #include <glib.h>
 
index f0dc9a51be4df31106c4dca2b40a554b47bf8279..3abf421e0253b3dc43f755a4706524757d9cfd4a 100644 (file)
@@ -108,7 +108,7 @@ gst_vaapi_window_new_from_native(const GstVaapiWindowClass *window_class,
     GstVaapiDisplay *display, gpointer native_window);
 
 /* Inline reference counting for core libgstvaapi library */
-#ifdef GST_VAAPI_CORE
+#ifdef IN_LIBGSTVAAPI_CORE
 #define gst_vaapi_window_ref_internal(window) \
     ((gpointer)gst_vaapi_mini_object_ref(GST_VAAPI_MINI_OBJECT(window)))