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

Minh Ngo nlminhtl at gmail.com
Sat Aug 10 00:35:54 PDT 2013


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

New commits:
commit 7f3273d1bf2ef1ad239e80281764d3bf21cf3d8b
Author: Minh Ngo <nlminhtl at gmail.com>
Date:   Sat Aug 10 10:34:13 2013 +0300

    Disabling the mouse handling event in the VLC engine.
    
    Change-Id: I348f7830b2ed86ddc21a48e0b482adfafc0175cd

diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx
index ba304f7..64d8565 100644
--- a/avmedia/source/vlc/vlcplayer.cxx
+++ b/avmedia/source/vlc/vlcplayer.cxx
@@ -19,7 +19,7 @@ const char * const VLC_ARGS[] = {
     "-Vdummy",
     "--snapshot-format=png",
     "--ffmpeg-threads",
-    "--verbose=-1",
+    "--verbose=2"
 };
 
 const int MS_IN_SEC = 1000; // Millisec in sec
@@ -33,6 +33,7 @@ VLCPlayer::VLCPlayer( const rtl::OUString& url )
     , mUrl( url )
     , mPlaybackLoop( false )
 {
+    mPlayer.setMouseHandling(false);
 }
 
 const rtl::OUString& VLCPlayer::url() const
diff --git a/avmedia/source/vlc/wrapper/Player.cxx b/avmedia/source/vlc/wrapper/Player.cxx
index b67f1b2..29f2536 100644
--- a/avmedia/source/vlc/wrapper/Player.cxx
+++ b/avmedia/source/vlc/wrapper/Player.cxx
@@ -30,6 +30,7 @@ namespace VLC
                                 unsigned int i_height );
         void ( *libvlc_media_player_set_xwindow ) ( libvlc_media_player_t *p_mi, uint32_t drawable );
         unsigned ( *libvlc_media_player_has_vout ) ( libvlc_media_player_t *p_mi );
+        void ( *libvlc_video_set_mouse_input ) ( libvlc_media_player_t *p_mi, unsigned on);
 
         ApiMap VLC_PLAYER_API[] =
         {
@@ -49,7 +50,8 @@ namespace VLC
             SYM_MAP( libvlc_audio_get_mute ),
             SYM_MAP( libvlc_video_take_snapshot ),
             SYM_MAP( libvlc_media_player_set_xwindow ),
-            SYM_MAP( libvlc_media_player_has_vout )
+            SYM_MAP( libvlc_media_player_has_vout ),
+            SYM_MAP( libvlc_video_set_mouse_input )
         };
     }
 
@@ -89,6 +91,11 @@ namespace VLC
         return libvlc_media_player_get_time( mPlayer );
     }
 
+    void Player::setMouseHandling(bool flag)
+    {
+        libvlc_video_set_mouse_input( mPlayer, flag );
+    }
+
     bool Player::isPlaying() const
     {
         return libvlc_media_player_is_playing( mPlayer ) == 1;
diff --git a/avmedia/source/vlc/wrapper/Player.hxx b/avmedia/source/vlc/wrapper/Player.hxx
index e23acb7..f1b3958 100644
--- a/avmedia/source/vlc/wrapper/Player.hxx
+++ b/avmedia/source/vlc/wrapper/Player.hxx
@@ -63,6 +63,8 @@ namespace VLC
             return mPlayer;
         }
 
+        void setMouseHandling(bool flag);
+
     private:
         libvlc_media_player_t *mPlayer;
     };


More information about the Libreoffice-commits mailing list