summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Ngo <nlminhtl@gmail.com>2013-07-13 23:09:47 +0300
committerMinh Ngo <nlminhtl@gmail.com>2013-07-13 23:09:47 +0300
commit9303e7460191bf2864c57a8882b64941a3484995 (patch)
treeefb054892e0eccc5f113941d9f1cbfc8aa562567
parentb5f4002ec180c5b1e25d052461700d94fc2ccea1 (diff)
Fixing pausing/stopping media features
Change-Id: I3a1c5201481be819f84e8475719a1ce9f15e20ec
-rw-r--r--avmedia/source/vlc/vlcplayer.cxx8
-rw-r--r--avmedia/source/vlc/vlcwindow.cxx2
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()