summaryrefslogtreecommitdiff
path: root/avmedia
diff options
context:
space:
mode:
authorMinh Ngo <nlminhtl@gmail.com>2013-06-24 09:53:22 +0300
committerMichael Meeks <michael.meeks@suse.com>2013-07-26 10:50:18 +0100
commit51d7b654a556db96a2870918bc51a348f1b32260 (patch)
tree7b7d8d2d8d5a5ca22319e6181e8d747f5153c3c5 /avmedia
parenta1c329f6b5a482d8339db6213c8d40f73e176883 (diff)
get/set methods implementations
Change-Id: Ia60d54def159b2ffc18d63315d23fc195ecece94
Diffstat (limited to 'avmedia')
-rw-r--r--avmedia/source/vlc/vlccommon.hxx2
-rw-r--r--avmedia/source/vlc/vlcplayer.cxx12
2 files changed, 10 insertions, 4 deletions
diff --git a/avmedia/source/vlc/vlccommon.hxx b/avmedia/source/vlc/vlccommon.hxx
index e9cc86448264..62551d01d79b 100644
--- a/avmedia/source/vlc/vlccommon.hxx
+++ b/avmedia/source/vlc/vlccommon.hxx
@@ -19,6 +19,8 @@
#ifndef _VLCCOMMON_HXX
#define _VLCCOMMON_HXX
+//TODO: Remove it before committing
+#define SAL_CALL
#include <vlc/libvlc.h>
diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx
index c48b1f3d3c44..b308636e83f9 100644
--- a/avmedia/source/vlc/vlcplayer.cxx
+++ b/avmedia/source/vlc/vlcplayer.cxx
@@ -36,16 +36,18 @@ void SAL_CALL VLCPlayer::stop()
double SAL_CALL VLCPlayer::getDuration()
{
- return 0.f;
+ libvlc_media_t* media = libvlc_media_player_get_media( mPlayer.get() );
+ return libvlc_media_get_duration( media );
}
void SAL_CALL VLCPlayer::setMediaTime( double fTime )
{
+ libvlc_media_player_set_time( mPlayer.get(), fTime );
}
double SAL_CALL VLCPlayer::getMediaTime()
{
- return 0.f;
+ return libvlc_media_player_get_time( mPlayer.get() );
}
double SAL_CALL VLCPlayer::getRate()
@@ -64,20 +66,22 @@ void SAL_CALL VLCPlayer::setPlaybackLoop( ::sal_Bool bSet )
void SAL_CALL VLCPlayer::setVolumeDB( ::sal_Int16 nDB )
{
+ libvlc_audio_set_volume( mPlayer.get(), nDB );
}
::sal_Int16 SAL_CALL VLCPlayer::getVolumeDB()
{
- return 1;
+ return libvlc_audio_get_volume( mPlayer.get() );
}
void SAL_CALL VLCPlayer::setMute( ::sal_Bool bSet )
{
+ libvlc_audio_set_mute( mPlayer.get(), bSet );
}
::sal_Bool SAL_CALL VLCPlayer::isMute()
{
- return false;
+ return libvlc_audio_get_mute( mPlayer.get() );
}
css::awt::Size SAL_CALL VLCPlayer::getPreferredPlayerWindowSize()