]> git.sesse.net Git - vlc/commitdiff
XCB: split picture (X11/XV) and events (all) header
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 13 Jun 2013 18:35:53 +0000 (21:35 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 13 Jun 2013 18:38:10 +0000 (21:38 +0300)
This fixes namespace pollution of picture_sys_t.

modules/video_output/Modules.am
modules/video_output/xcb/events.c
modules/video_output/xcb/events.h [moved from modules/video_output/xcb/xcb_vlc.h with 76% similarity]
modules/video_output/xcb/glx.c
modules/video_output/xcb/keys.c
modules/video_output/xcb/pictures.c
modules/video_output/xcb/pictures.h [new file with mode: 0644]
modules/video_output/xcb/window.c
modules/video_output/xcb/x11.c
modules/video_output/xcb/xvideo.c

index 7407e627ea85cb04bfffa51d38054059ddeabea4..7efe10a60856b205fcb1b69814880be17f4c3f73 100644 (file)
@@ -42,31 +42,27 @@ libvlc_LTLIBRARIES += \
 
 ### XCB ###
 libxcb_x11_plugin_la_SOURCES = \
-       xcb/xcb_vlc.h \
-       xcb/x11.c \
-       xcb/pictures.c \
-       xcb/events.c
+       xcb/pictures.c xcb/pictures.h \
+       xcb/events.c xcb/events.h \
+       xcb/x11.c
 libxcb_x11_plugin_la_CFLAGS = $(AM_CFLAGS) \
        $(XCB_CFLAGS) $(XCB_SHM_CFLAGS)
 libxcb_x11_plugin_la_LIBADD = $(AM_LIBADD) \
        $(XCB_LIBS) $(XCB_SHM_LIBS)
 
 libxcb_xv_plugin_la_SOURCES = \
-       xcb/xcb_vlc.h \
-       xcb/xvideo.c \
-       xcb/pictures.c \
-       xcb/events.c
+       xcb/pictures.c xcb/pictures.h \
+       xcb/events.c xcb/events.h \
+       xcb/xvideo.c
 libxcb_xv_plugin_la_CFLAGS = $(AM_CFLAGS) \
        $(XCB_CFLAGS) $(XCB_SHM_CFLAGS) $(XCB_XV_CFLAGS)
 libxcb_xv_plugin_la_LIBADD = $(AM_LIBADD) \
        $(XCB_LIBS) $(XCB_SHM_LIBS) $(XCB_XV_LIBS)
 
 libxcb_glx_plugin_la_SOURCES = \
-       xcb/xcb_vlc.h \
-       xcb/glx.c \
-       opengl.h \
-       opengl.c \
-       xcb/events.c
+       opengl.c opengl.h \
+       xcb/events.c xcb/events.h \
+       xcb/glx.c
 libxcb_glx_plugin_la_CFLAGS = $(AM_CFLAGS) \
        $(XCB_CFLAGS) $(GL_CFLAGS)
 libxcb_glx_plugin_la_LIBADD = $(AM_LIBADD) \
index 998d13ddb55a8af20b87f7f6dc3975eb30ff0781..efb3adb8c18632a742108048289adc7428be8547 100644 (file)
@@ -32,7 +32,7 @@
 #include <vlc_common.h>
 #include <vlc_vout_display.h>
 
-#include "xcb_vlc.h"
+#include "events.h"
 
 /**
  * Check for an error
similarity index 76%
rename from modules/video_output/xcb/xcb_vlc.h
rename to modules/video_output/xcb/events.h
index 81931e9497dc55d7d0521043adcef139cd66beee..c50cd038e2bca9c569a866fbec997feb644eccd2 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file xcb_vlc.h
+ * @file events.h
  * @brief X C Bindings VLC module common header
  */
 /*****************************************************************************
  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#ifdef WORDS_BIGENDIAN
-# define ORDER XCB_IMAGE_ORDER_MSB_FIRST
-#else
-# define ORDER XCB_IMAGE_ORDER_LSB_FIRST
-#endif
-
 #ifndef XCB_CURSOR_NONE
 # define XCB_CURSOR_NONE ((xcb_cursor_t) 0U)
 #endif
 
-#include <vlc_picture.h>
 #include <vlc_vout_display.h>
 
 /* keys.c */
@@ -50,17 +43,3 @@ struct vout_window_t *XCB_parent_Create (vout_display_t *obj,
 xcb_cursor_t XCB_cursor_Create (xcb_connection_t *, const xcb_screen_t *);
 
 int XCB_Manage (vout_display_t *vd, xcb_connection_t *conn, bool *);
-
-/* common.c */
-bool XCB_shm_Check (vlc_object_t *obj, xcb_connection_t *conn);
-
-/* FIXME
- * maybe it would be better to split this header in 2 */
-#include <xcb/shm.h>
-struct picture_sys_t
-{
-    xcb_shm_seg_t segment;
-};
-int XCB_pictures_Alloc (vout_display_t *, picture_resource_t *, size_t size,
-                        xcb_connection_t *, bool attach);
-void XCB_pictures_Free (picture_resource_t *, xcb_connection_t *);
index 05683a488c111469ce78b8bbef953068e06d9d57..e5661a4c675f7a6658acaa4723536bae5d93e6fd 100644 (file)
@@ -39,7 +39,7 @@
 #include <vlc_opengl.h>
 #include "../opengl.h"
 
-#include "xcb_vlc.h"
+#include "events.h"
 
 static int  Open (vlc_object_t *);
 static void Close (vlc_object_t *);
index f7c1c4937b474386344de77af645100ac3150f8e..baac6cae0183015f9cbca7be591abc85a263f04e 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <xcb/xcb.h>
 #include <vlc_common.h>
-#include "xcb_vlc.h"
+#include "events.h"
 
 #ifdef HAVE_XCB_KEYSYMS
 #include <xcb/xcb_keysyms.h>
index 3bce8ce61980f9c3efbbfc3fd9b1f88e6a5ed595..8efc5bbc92da3cbc04b6404d094d7bf5ebd443ca 100644 (file)
@@ -39,7 +39,8 @@
 #include <vlc_common.h>
 #include <vlc_vout_display.h>
 
-#include "xcb_vlc.h"
+#include "pictures.h"
+#include "events.h"
 
 /** Check MIT-SHM shared memory support */
 bool XCB_shm_Check (vlc_object_t *obj, xcb_connection_t *conn)
diff --git a/modules/video_output/xcb/pictures.h b/modules/video_output/xcb/pictures.h
new file mode 100644 (file)
index 0000000..9ee54c7
--- /dev/null
@@ -0,0 +1,41 @@
+/**
+ * @file pictures.h
+ * @brief XCB pictures allocation header
+ */
+/*****************************************************************************
+ * Copyright © 2009 Rémi Denis-Courmont
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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.
+ *****************************************************************************/
+
+#ifdef WORDS_BIGENDIAN
+# define ORDER XCB_IMAGE_ORDER_MSB_FIRST
+#else
+# define ORDER XCB_IMAGE_ORDER_LSB_FIRST
+#endif
+
+#include <vlc_picture.h>
+#include <vlc_vout_display.h>
+#include <xcb/shm.h>
+
+bool XCB_shm_Check (vlc_object_t *obj, xcb_connection_t *conn);
+
+struct picture_sys_t
+{
+    xcb_shm_seg_t segment;
+};
+int XCB_pictures_Alloc (vout_display_t *, picture_resource_t *, size_t size,
+                        xcb_connection_t *, bool attach);
+void XCB_pictures_Free (picture_resource_t *, xcb_connection_t *);
index 247f06e07f4ba731cb826913aadaadab3f8eeddc..07cd0301bfbf0f8758340370ee9a662ec6133662 100644 (file)
@@ -38,7 +38,7 @@ typedef xcb_atom_t Atom;
 #include <vlc_plugin.h>
 #include <vlc_vout_window.h>
 
-#include "xcb_vlc.h"
+#include "events.h"
 
 #define DISPLAY_TEXT N_("X11 display")
 #define DISPLAY_LONGTEXT N_( \
index 88752c05d4b064a3140e9d0feae1b31eef9bbc11..1a6864f9ba6d17dad524769665c0bd72a716ae2b 100644 (file)
@@ -35,7 +35,8 @@
 #include <vlc_vout_display.h>
 #include <vlc_picture_pool.h>
 
-#include "xcb_vlc.h"
+#include "pictures.h"
+#include "events.h"
 
 static int  Open (vlc_object_t *);
 static void Close (vlc_object_t *);
index b62cb2619e352b9b2cdff4a701f4f05bd7f06686..5121747c70e90edc76a70ffeb59b2e2a773ef75a 100644 (file)
@@ -38,7 +38,8 @@
 #include <vlc_picture_pool.h>
 #include <vlc_dialog.h>
 
-#include "xcb_vlc.h"
+#include "pictures.h"
+#include "events.h"
 
 #define ADAPTOR_TEXT N_("XVideo adaptor number")
 #define ADAPTOR_LONGTEXT N_( \