[vlc-commits] Add vout window support for OS/2

KO Myung-Hun git at videolan.org
Thu Oct 20 20:30:26 CEST 2011


vlc | branch: master | KO Myung-Hun <komh at chollian.net> | Thu Oct 20 21:30:23 2011 +0900| [2f6eb75c0d317e521e201e3a61a0b0642ee9e552] | committer: Rémi Denis-Courmont

Add vout window support for OS/2

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

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

 include/vlc_vout_window.h |    4 ++--
 lib/media_player.c        |    6 +++---
 src/libvlc.c              |    2 +-
 src/video_output/window.c |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
index b722d4b..aac70e0 100644
--- a/include/vlc_vout_window.h
+++ b/include/vlc_vout_window.h
@@ -46,7 +46,7 @@ enum {
     VOUT_WINDOW_TYPE_NSOBJECT,
 };
 
-#if defined (WIN32)
+#if defined (WIN32) || defined (__OS2__)
 # define VOUT_WINDOW_TYPE_NATIVE VOUT_WINDOW_TYPE_HWND
 #elif defined (__unix__)
 # define VOUT_WINDOW_TYPE_NATIVE VOUT_WINDOW_TYPE_XID
@@ -113,7 +113,7 @@ struct vout_window_t {
     vout_window_sys_t *sys;
 };
 
-/** 
+/**
  * Creates a new window.
  *
  * @param module plugin name (usually "$window")
diff --git a/lib/media_player.c b/lib/media_player.c
index 0fbd2e3..14d5bce 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -413,7 +413,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
     var_Create (mp, "vmem-height", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
     var_Create (mp, "vmem-pitch", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
     var_Create (mp, "drawable-xid", VLC_VAR_INTEGER);
-#ifdef WIN32
+#if defined (WIN32) || defined (__OS2__)
     var_Create (mp, "drawable-hwnd", VLC_VAR_INTEGER);
 #endif
 #ifdef __APPLE__
@@ -935,7 +935,7 @@ void libvlc_media_player_set_hwnd( libvlc_media_player_t *p_mi,
                                    void *drawable )
 {
     assert (p_mi != NULL);
-#ifdef WIN32
+#if defined (WIN32) || defined (__OS2__)
     var_SetString (p_mi, "window",
                    (drawable != NULL) ? "embed-hwnd,any" : "");
     var_SetInteger (p_mi, "drawable-hwnd", (uintptr_t)drawable);
@@ -950,7 +950,7 @@ void libvlc_media_player_set_hwnd( libvlc_media_player_t *p_mi,
 void *libvlc_media_player_get_hwnd( libvlc_media_player_t *p_mi )
 {
     assert (p_mi != NULL);
-#ifdef WIN32
+#if defined (WIN32) || defined (__OS2__)
     return (void *)(uintptr_t)var_GetInteger (p_mi, "drawable-hwnd");
 #else
     return NULL;
diff --git a/src/libvlc.c b/src/libvlc.c
index 44d7c6f..021f9f0 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -705,7 +705,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     var_Create( p_libvlc, "drawable-clip-right", VLC_VAR_INTEGER );
     var_Create( p_libvlc, "drawable-nsobject", VLC_VAR_ADDRESS );
 #endif
-#ifdef WIN32
+#if defined (WIN32) || defined (__OS2__)
     var_Create( p_libvlc, "drawable-hwnd", VLC_VAR_INTEGER );
 #endif
 
diff --git a/src/video_output/window.c b/src/video_output/window.c
index b98a3e9..7bf388c 100644
--- a/src/video_output/window.c
+++ b/src/video_output/window.c
@@ -64,7 +64,7 @@ vout_window_t *vout_window_New(vlc_object_t *obj,
 
     const char *type;
     switch (cfg->type) {
-#ifdef WIN32
+#if defined(WIN32) || defined(__OS2__)
     case VOUT_WINDOW_TYPE_HWND:
         type = "vout window hwnd";
         window->handle.hwnd = NULL;



More information about the vlc-commits mailing list