diff options
author | Minh Ngo <nlminhtl@gmail.com> | 2013-07-13 23:09:47 +0300 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-07-26 10:50:23 +0100 |
commit | 79ae34928c134c8143cb21da651b67caabd21794 (patch) | |
tree | 35255891fccece939412f075b4e60f2e1538a8fe | |
parent | 2fadc5a8dd2bb61869b3e39cd5acc17724899eb4 (diff) |
Fixing pausing/stopping media features
Change-Id: I3a1c5201481be819f84e8475719a1ce9f15e20ec
-rw-r--r-- | avmedia/source/vlc/vlcplayer.cxx | 8 | ||||
-rw-r--r-- | avmedia/source/vlc/vlcwindow.cxx | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx index f62b71180474..d54cb2cbcefe 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 e61398e75a61..72f05720771d 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() |