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 <nlmin...@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() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits