[vlc-commits] vout:win32: don't access the events code directly from display modules

Steve Lhomme git at videolan.org
Tue Apr 2 16:33:19 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Mar 27 11:12:41 2019 +0100| [eee52d3d26695335eeafe2da6354f724ee4bc849] | committer: Steve Lhomme

vout:win32: don't access the events code directly from display modules

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eee52d3d26695335eeafe2da6354f724ee4bc849
---

 modules/video_output/win32/common.c    |  1 +
 modules/video_output/win32/common.h    | 14 +++++++++++++-
 modules/video_output/win32/events.c    |  1 +
 modules/video_output/win32/events.h    | 10 ----------
 modules/video_output/win32/sensors.cpp |  1 +
 5 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 152744fc19..1357de24a7 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -40,6 +40,7 @@
 #define COBJMACROS
 #include <shobjidl.h>
 
+#include "events.h"
 #include "common.h"
 #include "../video_chroma/copy.h"
 
diff --git a/modules/video_output/win32/common.h b/modules/video_output/win32/common.h
index 2e0a320bb6..30ce435995 100644
--- a/modules/video_output/win32/common.h
+++ b/modules/video_output/win32/common.h
@@ -22,10 +22,13 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#include <vlc_vout_display.h>
+
 /*****************************************************************************
  * event_thread_t: event thread
  *****************************************************************************/
-#include "events.h"
+
+typedef struct event_thread_t event_thread_t;
 
 typedef struct display_win32_area_t
 {
@@ -81,3 +84,12 @@ int  CommonControl(vout_display_t *, display_win32_area_t *, vout_display_sys_wi
 void UpdateRects (vout_display_t *, display_win32_area_t *, vout_display_sys_win32_t *);
 
 void InitArea(vout_display_t *, display_win32_area_t *, const vout_display_cfg_t *);
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+void* HookWindowsSensors(vout_display_t*, HWND);
+void UnhookWindowsSensors(void*);
+# ifdef __cplusplus
+}
+# endif
diff --git a/modules/video_output/win32/events.c b/modules/video_output/win32/events.c
index a387433667..debf38ea1c 100644
--- a/modules/video_output/win32/events.c
+++ b/modules/video_output/win32/events.c
@@ -39,6 +39,7 @@
 #include <windows.h>
 #include <windowsx.h>                                        /* GET_X_LPARAM */
 
+#include "events.h"
 #include "common.h"
 
 /*****************************************************************************
diff --git a/modules/video_output/win32/events.h b/modules/video_output/win32/events.h
index 83300afb38..7353ebacf9 100644
--- a/modules/video_output/win32/events.h
+++ b/modules/video_output/win32/events.h
@@ -51,13 +51,3 @@ int             EventThreadGetWindowStyle( event_thread_t * );
 void            EventThreadUpdatePlace( event_thread_t *p_event,
                                         const vout_display_place_t *p_place );
 bool            EventThreadGetAndResetSizeChanged( event_thread_t * );
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-void* HookWindowsSensors(vout_display_t*, HWND);
-void UnhookWindowsSensors(void*);
-# ifdef __cplusplus
-}
-# endif
-
diff --git a/modules/video_output/win32/sensors.cpp b/modules/video_output/win32/sensors.cpp
index 754e73d6c8..17727afaad 100644
--- a/modules/video_output/win32/sensors.cpp
+++ b/modules/video_output/win32/sensors.cpp
@@ -26,6 +26,7 @@
 #endif
 
 #include "events.h"
+#include "common.h"
 
 #include <initguid.h>
 #include <propsys.h> /* stupid mingw headers don't include this */



More information about the vlc-commits mailing list