[Libreoffice-commits] core.git: Branch 'feature/vlc' - avmedia/source
Minh Ngo
nlminhtl at gmail.com
Sat Jul 13 00:35:18 PDT 2013
avmedia/source/vlc/vlcplayer.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit e963770ca687b9761b8bc803cb13e57e2afc3085
Author: Minh Ngo <nlminhtl at gmail.com>
Date: Sat Jul 13 10:34:42 2013 +0300
Fixing volume changing ability
Change-Id: Ie6b175fd039a868a57afdfe7bd05a2de69c39a7c
diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx
index 0a15a72..d94206c 100644
--- a/avmedia/source/vlc/vlcplayer.cxx
+++ b/avmedia/source/vlc/vlcplayer.cxx
@@ -96,13 +96,13 @@ void SAL_CALL VLCPlayer::setPlaybackLoop( ::sal_Bool bSet )
void SAL_CALL VLCPlayer::setVolumeDB( ::sal_Int16 nDB )
{
::osl::MutexGuard aGuard(m_aMutex);
- libvlc_audio_set_volume( mPlayer.get(), nDB );
+ libvlc_audio_set_volume( mPlayer.get(), static_cast<sal_Int16>( ( nDB + 40 ) * 10.0 / 4 ) );
}
::sal_Int16 SAL_CALL VLCPlayer::getVolumeDB()
{
::osl::MutexGuard aGuard(m_aMutex);
- return libvlc_audio_get_volume( mPlayer.get() );
+ return static_cast<sal_Int16>( libvlc_audio_get_volume( mPlayer.get() ) / 10.0 * 4 - 40 );
}
void SAL_CALL VLCPlayer::setMute( ::sal_Bool bSet )
@@ -168,7 +168,7 @@ uno::Reference< css::media::XPlayerWindow > SAL_CALL VLCPlayer::createPlayerWind
uno::Reference< css::media::XFrameGrabber > SAL_CALL VLCPlayer::createFrameGrabber()
{
::osl::MutexGuard aGuard(m_aMutex);
- return uno::Reference< css::media::XFrameGrabber >(new VLCFrameGrabber());
+ return uno::Reference< css::media::XFrameGrabber >( new VLCFrameGrabber() );
}
::rtl::OUString SAL_CALL VLCPlayer::getImplementationName()
More information about the Libreoffice-commits
mailing list