[Libreoffice-commits] core.git: Branch 'feature/vlc' - avmedia/source

Minh Ngo nlminhtl at gmail.com
Sat Aug 10 00:59:55 PDT 2013


 avmedia/source/vlc/vlcplayer.cxx      |    8 ++------
 avmedia/source/vlc/wrapper/Player.cxx |    9 ++++++++-
 avmedia/source/vlc/wrapper/Player.hxx |    2 +-
 3 files changed, 11 insertions(+), 8 deletions(-)

New commits:
commit cb84b2cdecd7953ffac63b137e1d7a631aee2963
Author: Minh Ngo <nlminhtl at gmail.com>
Date:   Sat Aug 10 10:58:36 2013 +0300

    MacOS/Windows stuff
    
    Change-Id: I237cf543fc198a65af2d90ca6044f9e429b09b98

diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx
index 64d8565..945d7d9 100644
--- a/avmedia/source/vlc/vlcplayer.cxx
+++ b/avmedia/source/vlc/vlcplayer.cxx
@@ -179,13 +179,9 @@ uno::Reference< css::media::XPlayerWindow > SAL_CALL VLCPlayer::createPlayerWind
 
     const int winID = GetWindowID( aArguments );
 
-    if (winID != -1)
+    if ( winID != -1 )
     {
-#if defined(WIN32) && !defined(UNIX)
-        //TODO: Not works, will be crashed
-#else
-        mPlayer.setXWindow( winID );
-#endif
+        mPlayer.setWindow( winID );
     }
 
     return uno::Reference< css::media::XPlayerWindow >( window );
diff --git a/avmedia/source/vlc/wrapper/Player.cxx b/avmedia/source/vlc/wrapper/Player.cxx
index 29f2536..37779d1 100644
--- a/avmedia/source/vlc/wrapper/Player.cxx
+++ b/avmedia/source/vlc/wrapper/Player.cxx
@@ -131,9 +131,16 @@ namespace VLC
         return libvlc_audio_get_mute( mPlayer );
     }
 
-    void Player::setXWindow( int id )
+
+    void Player::setWindow( int id )
     {
+#if defined( UNX )
         libvlc_media_player_set_xwindow( mPlayer, id );
+#elif defined( MACOS )
+        libvlc_media_player_set_nsobject( mPlayer, reinterpret_cast<void*>( id ) );
+#elif defined( WNT )
+        libvlc_media_player_set_hwnd( mPlayer, reinterpret_cast<void*>( id ) );
+#endif
     }
 
     void Player::takeSnapshot(const rtl::OUString& file)
diff --git a/avmedia/source/vlc/wrapper/Player.hxx b/avmedia/source/vlc/wrapper/Player.hxx
index f1b3958..7832ad9 100644
--- a/avmedia/source/vlc/wrapper/Player.hxx
+++ b/avmedia/source/vlc/wrapper/Player.hxx
@@ -52,7 +52,7 @@ namespace VLC
         void setMute( bool mute);
         bool getMute() const;
 
-        void setXWindow( int id );
+        void setWindow( int id );
 
         void takeSnapshot(const rtl::OUString& file);
 


More information about the Libreoffice-commits mailing list