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

Minh Ngo nlminhtl at gmail.com
Sat Jul 13 13:11:01 PDT 2013


 avmedia/source/vlc/vlcplayer.cxx |    8 +++++++-
 avmedia/source/vlc/vlcwindow.cxx |    2 ++
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 9303e7460191bf2864c57a8882b64941a3484995
Author: Minh Ngo <nlminhtl at gmail.com>
Date:   Sat Jul 13 23:09:47 2013 +0300

    Fixing pausing/stopping media features
    
    Change-Id: I3a1c5201481be819f84e8475719a1ce9f15e20ec

diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx
index f62b711..d54cb2c 100644
--- a/avmedia/source/vlc/vlcplayer.cxx
+++ b/avmedia/source/vlc/vlcplayer.cxx
@@ -51,7 +51,7 @@ void SAL_CALL VLCPlayer::start()
 void SAL_CALL VLCPlayer::stop()
 {
     ::osl::MutexGuard aGuard(m_aMutex);
-    libvlc_media_player_stop( mPlayer.get() );
+    libvlc_media_player_pause( mPlayer.get() );
 }
 
 ::sal_Bool SAL_CALL VLCPlayer::isPlaying()
@@ -69,6 +69,12 @@ double SAL_CALL VLCPlayer::getDuration()
 void SAL_CALL VLCPlayer::setMediaTime( double fTime )
 {
     ::osl::MutexGuard aGuard(m_aMutex);
+
+    if ( fTime < 0.00000001 && !libvlc_media_player_is_playing( mPlayer.get() ) )
+    {
+        libvlc_media_player_stop( mPlayer.get() );
+    }
+
     libvlc_media_player_set_time( mPlayer.get(), fTime * MS_IN_SEC );
 }
 
diff --git a/avmedia/source/vlc/vlcwindow.cxx b/avmedia/source/vlc/vlcwindow.cxx
index e61398e..72f0572 100644
--- a/avmedia/source/vlc/vlcwindow.cxx
+++ b/avmedia/source/vlc/vlcwindow.cxx
@@ -1,3 +1,4 @@
+#include <iostream>
 #include "vlcwindow.hxx"
 
 using namespace ::com::sun::star;
@@ -81,6 +82,7 @@ void SAL_CALL VLCWindow::setVisible( sal_Bool Visible )
 void SAL_CALL VLCWindow::setEnable( sal_Bool Enable )
     throw (uno::RuntimeException)
 {
+    std::cout << __PRETTY_FUNCTION__ << " " << Enable << std::endl;
 }
 
 void SAL_CALL VLCWindow::setFocus()


More information about the Libreoffice-commits mailing list