[vlc-commits] commit: qt4: Add OSX support to embedded video ( Juho Vähä-Herttua )

git at videolan.org git at videolan.org
Sat Jul 24 23:00:37 CEST 2010


vlc | branch: master | Juho Vähä-Herttua <juhovh at iki.fi> | Sat Jul 24 23:31:11 2010 +0300| [352fb477565081ff21f4ed3eeafe280a0e00c865] | committer: Rémi Denis-Courmont 

qt4: Add OSX support to embedded video

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

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

 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



More information about the vlc-commits mailing list