[vlc-devel] [PATCH 3/6] qt4: Add OSX support to embedded video

Juho Vähä-Herttua juhovh at iki.fi
Sat Jul 24 22:31:11 CEST 2010


---
 modules/gui/qt4/qt4.cpp |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 990b255..676a82b 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -248,12 +248,14 @@ vlc_module_begin ()
 
         set_callbacks( OpenDialogs, Close )
 
-#if defined(Q_WS_X11) || defined(Q_WS_WIN)
+#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_MAC)
     add_submodule ()
 #if defined(Q_WS_X11)
         set_capability( "vout window xid", 0 )
 #elif defined(Q_WS_WIN)
         set_capability( "vout window hwnd", 0 )
+#elif defined(Q_WS_MAC)
+        set_capability( "vout window nsobject", 0 )
 #endif
         set_callbacks( WindowOpen, WindowClose )
 #endif
@@ -574,6 +576,11 @@ static int WindowOpen( vlc_object_t *p_obj )
     p_wnd->handle.hwnd = p_mi->getVideo( &i_x, &i_y, &i_width, &i_height );
     if( !p_wnd->handle.hwnd )
         return VLC_EGENERIC;
+
+#elif defined (Q_WS_MAC)
+    p_wnd->handle.nsobject = (void *)p_mi->getVideo( &i_x, &i_y, &i_width, &i_height );
+    if( !p_wnd->handle.nsobject )
+        return VLC_EGENERIC;
 #else
 # error FIXME
 #endif
-- 
1.6.5.7




More information about the vlc-devel mailing list