diff options
author | Minh Ngo <nlminhtl@gmail.com> | 2013-08-10 10:58:36 +0300 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-08-21 10:54:52 +0100 |
commit | c3de00df77fbab130526a49a2311da66181c5364 (patch) | |
tree | b306167a3fe0e3090937916bdd91a6d958223d75 /avmedia | |
parent | 254f7e8ffdf442398bfa361fc0e1bfeaec702ab0 (diff) |
MacOS/Windows stuff
Change-Id: I237cf543fc198a65af2d90ca6044f9e429b09b98
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/vlc/vlcplayer.cxx | 8 | ||||
-rw-r--r-- | avmedia/source/vlc/wrapper/Player.cxx | 9 | ||||
-rw-r--r-- | avmedia/source/vlc/wrapper/Player.hxx | 2 |
3 files changed, 11 insertions, 8 deletions
diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx index 64d8565a19c7..945d7d9bc404 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 29f2536b5045..37779d1a5ea0 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 f1b395841a44..7832ad9c3676 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); |