Kaydet (Commit) 79ae3492 authored tarafından Minh Ngo's avatar Minh Ngo Kaydeden (comit) Michael Meeks

Fixing pausing/stopping media features

Change-Id: I3a1c5201481be819f84e8475719a1ce9f15e20ec
üst 2fadc5a8
......@@ -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 );
}
......
#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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment