[vlc-devel] commit: libvlcpp: fix compilation. ( Rémi Duraffort )
git version control
git at videolan.org
Sun Jan 31 22:20:04 CET 2010
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Jan 31 22:19:48 2010 +0100| [0851b345b93451a2cd0c61f12680b055fbfef027] | committer: Rémi Duraffort
libvlcpp: fix compilation.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0851b345b93451a2cd0c61f12680b055fbfef027
---
bindings/libvlcpp/src/audio.cpp | 27 ++++-------
bindings/libvlcpp/src/audio.hpp | 6 +--
bindings/libvlcpp/src/media_player.cpp | 78 +++++++++++---------------------
bindings/libvlcpp/src/video.cpp | 6 +--
4 files changed, 38 insertions(+), 79 deletions(-)
diff --git a/bindings/libvlcpp/src/audio.cpp b/bindings/libvlcpp/src/audio.cpp
index e0fb46f..01bb812 100644
--- a/bindings/libvlcpp/src/audio.cpp
+++ b/bindings/libvlcpp/src/audio.cpp
@@ -22,16 +22,12 @@
*****************************************************************************/
#include "audio.hpp"
-#include "exception.hpp"
using namespace libvlc;
-Audio::Audio( libvlc_instance_t *libvlcInstance, libvlc_media_player_t *player )
+Audio::Audio( libvlc_media_player_t *player )
{
- m_libvlcInstance = libvlcInstance;
- libvlc_retain( m_libvlcInstance );
-
m_player = player;
libvlc_media_player_retain( m_player );
}
@@ -39,50 +35,45 @@ Audio::Audio( libvlc_instance_t *libvlcInstance, libvlc_media_player_t *player )
Audio::~Audio()
{
libvlc_media_player_release( m_player );
- libvlc_release( m_libvlcInstance );
}
void Audio::toggleMute()
{
- libvlc_audio_toggle_mute( m_libvlcInstance );
+ libvlc_audio_toggle_mute( m_player );
}
int Audio::mute()
{
- return libvlc_audio_get_mute( m_libvlcInstance );
+ return libvlc_audio_get_mute( m_player );
}
void Audio::setMute( int mute )
{
- libvlc_audio_set_mute( m_libvlcInstance, mute );
+ libvlc_audio_set_mute( m_player, mute );
}
int Audio::volume()
{
- return libvlc_audio_get_volume( m_libvlcInstance );
+ return libvlc_audio_get_volume( m_player );
}
void Audio::setVolume( int volume )
{
- Exception ex;
- libvlc_audio_set_volume( m_libvlcInstance, volume, &ex.ex );
+ libvlc_audio_set_volume( m_player, volume );
}
int Audio::track()
{
- Exception ex;
- return libvlc_audio_get_track( m_player, &ex.ex );
+ return libvlc_audio_get_track( m_player );
}
int Audio::trackCount()
{
- Exception ex;
- return libvlc_audio_get_track_count( m_player, &ex.ex );
+ return libvlc_audio_get_track_count( m_player );
}
void Audio::setTrack( int track )
{
- Exception ex;
- libvlc_audio_set_track( m_player, track, &ex.ex );
+ libvlc_audio_set_track( m_player, track );
}
diff --git a/bindings/libvlcpp/src/audio.hpp b/bindings/libvlcpp/src/audio.hpp
index 7f7bb40..f7c98f0 100644
--- a/bindings/libvlcpp/src/audio.hpp
+++ b/bindings/libvlcpp/src/audio.hpp
@@ -38,10 +38,9 @@ class Audio
public:
/**
* Constructor
- * @param libvlcInstance: the libvlc instance
* @param player: the player handling the audio
*/
- Audio( libvlc_instance_t *libvlcInstance, libvlc_media_player_t *player );
+ Audio( libvlc_media_player_t *player );
/** Destructor */
~Audio();
@@ -111,9 +110,6 @@ public:
private:
/** The media player instance of libvlc */
libvlc_media_player_t *m_player;
-
- /** The instance of libvlc */
- libvlc_instance_t *m_libvlcInstance;
};
};
diff --git a/bindings/libvlcpp/src/media_player.cpp b/bindings/libvlcpp/src/media_player.cpp
index 6aa3719..cc4401a 100644
--- a/bindings/libvlcpp/src/media_player.cpp
+++ b/bindings/libvlcpp/src/media_player.cpp
@@ -28,14 +28,12 @@ using namespace libvlc;
MediaPlayer::MediaPlayer( libVLC &libvlcInstance )
{
- Exception ex;
- m_player = libvlc_media_player_new( libvlcInstance.m_instance, &ex.ex );
+ m_player = libvlc_media_player_new( libvlcInstance.m_instance );
}
MediaPlayer::MediaPlayer( Media &media )
{
- Exception ex;
- m_player = libvlc_media_player_new_from_media( media.m_media, &ex.ex );
+ m_player = libvlc_media_player_new_from_media( media.m_media );
}
MediaPlayer::~MediaPlayer()
@@ -55,14 +53,12 @@ int MediaPlayer::isPlaying()
void MediaPlayer::play()
{
- Exception ex;
- libvlc_media_player_play( m_player, &ex.ex );
+ libvlc_media_player_play( m_player );
}
void MediaPlayer::pause()
{
- Exception ex;
- libvlc_media_player_pause( m_player, &ex.ex );
+ libvlc_media_player_pause( m_player );
}
void MediaPlayer::stop()
@@ -112,104 +108,87 @@ void *MediaPlayer::hwnd()
int64_t MediaPlayer::lenght()
{
- Exception ex;
- return libvlc_media_player_get_length( m_player, &ex.ex );
+ return libvlc_media_player_get_length( m_player );
}
int64_t MediaPlayer::time()
{
- Exception ex;
- return libvlc_media_player_get_time( m_player, &ex.ex );
+ return libvlc_media_player_get_time( m_player );
}
void MediaPlayer::setTime( int64_t new_time )
{
- Exception ex;
- libvlc_media_player_set_time( m_player, new_time, &ex.ex );
+ libvlc_media_player_set_time( m_player, new_time );
}
float MediaPlayer::position()
{
- Exception ex;
- return libvlc_media_player_get_position( m_player, &ex.ex );
+ return libvlc_media_player_get_position( m_player );
}
void MediaPlayer::setPosition( float position )
{
- Exception ex;
- libvlc_media_player_set_position( m_player, position, &ex.ex );
+ libvlc_media_player_set_position( m_player, position );
}
int MediaPlayer::chapter()
{
- Exception ex;
- return libvlc_media_player_get_chapter( m_player, &ex.ex );
+ return libvlc_media_player_get_chapter( m_player );
}
int MediaPlayer::chapterCount()
{
- Exception ex;
- return libvlc_media_player_get_chapter_count( m_player, &ex.ex );
+ return libvlc_media_player_get_chapter_count( m_player );
}
int MediaPlayer::chapterCount( int title )
{
- Exception ex;
- return libvlc_media_player_get_chapter_count_for_title( m_player, title, &ex.ex );
+ return libvlc_media_player_get_chapter_count_for_title( m_player, title );
}
void MediaPlayer::setChapter( int title )
{
- Exception ex;
- libvlc_media_player_set_chapter( m_player, title, &ex.ex );
+ libvlc_media_player_set_chapter( m_player, title );
}
int MediaPlayer::willPlay()
{
- Exception ex;
- return libvlc_media_player_will_play( m_player, &ex.ex );
+ return libvlc_media_player_will_play( m_player );
}
int MediaPlayer::title()
{
- Exception ex;
- return libvlc_media_player_get_title( m_player, &ex.ex );
+ return libvlc_media_player_get_title( m_player );
}
int MediaPlayer::titleCount()
{
- Exception ex;
- return libvlc_media_player_get_title_count( m_player, &ex.ex );
+ return libvlc_media_player_get_title_count( m_player );
}
void MediaPlayer::setTitle( int title )
{
- Exception ex;
- libvlc_media_player_set_title( m_player, title, &ex.ex );
+ libvlc_media_player_set_title( m_player, title );
}
void MediaPlayer::previousChapter()
{
- Exception ex;
- libvlc_media_player_previous_chapter( m_player, &ex.ex );
+ libvlc_media_player_previous_chapter( m_player );
}
void MediaPlayer::nextChapter()
{
- Exception ex;
- libvlc_media_player_next_chapter( m_player, &ex.ex );
+ libvlc_media_player_next_chapter( m_player );
}
float MediaPlayer::rate()
{
- Exception ex;
- return libvlc_media_player_get_rate( m_player, &ex.ex );
+ return libvlc_media_player_get_rate( m_player );
}
void MediaPlayer::setRate( float rate )
{
- Exception ex;
- libvlc_media_player_set_rate( m_player, rate, &ex.ex );
+ libvlc_media_player_set_rate( m_player, rate );
}
libvlc_state_t MediaPlayer::state()
@@ -219,31 +198,26 @@ libvlc_state_t MediaPlayer::state()
float MediaPlayer::fps()
{
- Exception ex;
- return libvlc_media_player_get_fps( m_player, &ex.ex );
+ return libvlc_media_player_get_fps( m_player );
}
int MediaPlayer::hasVout()
{
- Exception ex;
- return libvlc_media_player_has_vout( m_player, &ex.ex );
+ return libvlc_media_player_has_vout( m_player );
}
int MediaPlayer::isSeekable()
{
- Exception ex;
- return libvlc_media_player_is_seekable( m_player, &ex.ex );
+ return libvlc_media_player_is_seekable( m_player );
}
int MediaPlayer::canPause()
{
- Exception ex;
- return libvlc_media_player_can_pause( m_player, &ex.ex );
+ return libvlc_media_player_can_pause( m_player );
}
void MediaPlayer::nextFrame()
{
- Exception ex;
- libvlc_media_player_next_frame( m_player, &ex.ex );
+ libvlc_media_player_next_frame( m_player );
}
void MediaPlayer::toggleFullscreen()
diff --git a/bindings/libvlcpp/src/video.cpp b/bindings/libvlcpp/src/video.cpp
index 97b2d67..14e23b7 100644
--- a/bindings/libvlcpp/src/video.cpp
+++ b/bindings/libvlcpp/src/video.cpp
@@ -76,8 +76,7 @@ void Video::setSpu( int spu )
void Video::setSubtitleFile( const char *subtitle_file )
{
- Exception ex;
- libvlc_video_set_subtitle_file( m_player, subtitle_file, &ex.ex );
+ libvlc_video_set_subtitle_file( m_player, subtitle_file );
}
char *Video::cropGeometry()
@@ -100,8 +99,7 @@ int Video::track()
int Video::trackCount()
{
- Exception ex;
- return libvlc_video_get_track_count( m_player, &ex.ex );
+ return libvlc_video_get_track_count( m_player );
}
void Video::setTrack( int track )
More information about the vlc-devel
mailing list