[vlc-devel] commit: libvlcpp: directly access to the instance. ( Rémi Duraffort )
git version control
git at videolan.org
Tue Jan 26 13:12:30 CET 2010
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue Jan 26 12:12:03 2010 +0100| [66e08e1b6f78b5edf75fcbcc1d137747f4bdc365] | committer: Rémi Duraffort
libvlcpp: directly access to the instance.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=66e08e1b6f78b5edf75fcbcc1d137747f4bdc365
---
bindings/libvlcpp/src/libvlc.cpp | 5 -----
bindings/libvlcpp/src/libvlc.hpp | 6 ------
bindings/libvlcpp/src/media.cpp | 6 +-----
bindings/libvlcpp/src/media.hpp | 6 ------
bindings/libvlcpp/src/media_player.cpp | 6 +++---
5 files changed, 4 insertions(+), 25 deletions(-)
diff --git a/bindings/libvlcpp/src/libvlc.cpp b/bindings/libvlcpp/src/libvlc.cpp
index 839f1e5..a29fc5b 100644
--- a/bindings/libvlcpp/src/libvlc.cpp
+++ b/bindings/libvlcpp/src/libvlc.cpp
@@ -37,11 +37,6 @@ libVLC::~libVLC()
libvlc_release( m_instance );
}
-libvlc_instance_t *libVLC::instance()
-{
- return m_instance;
-}
-
const char *libVLC::version()
{
return libvlc_get_version();
diff --git a/bindings/libvlcpp/src/libvlc.hpp b/bindings/libvlcpp/src/libvlc.hpp
index 780e4dd..036b0d2 100644
--- a/bindings/libvlcpp/src/libvlc.hpp
+++ b/bindings/libvlcpp/src/libvlc.hpp
@@ -64,12 +64,6 @@ public:
const char *chanset();
private:
- /**
- * Get the instance of libvlc that cannot be modified
- * @return the instance of libvlc
- */
- libvlc_instance_t *instance();
-
/** The instance of libvlc */
libvlc_instance_t *m_instance;
diff --git a/bindings/libvlcpp/src/media.cpp b/bindings/libvlcpp/src/media.cpp
index 4c65ddf..800bbd0 100644
--- a/bindings/libvlcpp/src/media.cpp
+++ b/bindings/libvlcpp/src/media.cpp
@@ -29,7 +29,7 @@ using namespace libvlc;
Media::Media( libVLC &libvlcInstance, const char *psz_mrl )
{
Exception ex;
- m_media = libvlc_media_new( libvlcInstance.instance(), psz_mrl, &ex.ex );
+ m_media = libvlc_media_new( libvlcInstance.m_instance, psz_mrl, &ex.ex );
}
Media::Media( const Media& original )
@@ -98,7 +98,3 @@ void *Media::userData()
return libvlc_media_get_user_data( m_media );
}
-libvlc_media_t *Media::instance()
-{
- return m_media;
-}
diff --git a/bindings/libvlcpp/src/media.hpp b/bindings/libvlcpp/src/media.hpp
index ca337ff..4402eef 100644
--- a/bindings/libvlcpp/src/media.hpp
+++ b/bindings/libvlcpp/src/media.hpp
@@ -135,12 +135,6 @@ public:
void *userData();
private:
- /**
- * Get the instance of the libvlc_media_t
- * @return the pointer to libvlc_media_t
- */
- libvlc_media_t *instance();
-
/** The media */
libvlc_media_t *m_media;
diff --git a/bindings/libvlcpp/src/media_player.cpp b/bindings/libvlcpp/src/media_player.cpp
index c44189f..7eab608 100644
--- a/bindings/libvlcpp/src/media_player.cpp
+++ b/bindings/libvlcpp/src/media_player.cpp
@@ -29,13 +29,13 @@ using namespace libvlc;
MediaPlayer::MediaPlayer( libVLC &libvlcInstance )
{
Exception ex;
- m_player = libvlc_media_player_new( libvlcInstance.instance(), &ex.ex );
+ m_player = libvlc_media_player_new( libvlcInstance.m_instance, &ex.ex );
}
MediaPlayer::MediaPlayer( Media &media )
{
Exception ex;
- m_player = libvlc_media_player_new_from_media( media.instance(), &ex.ex );
+ m_player = libvlc_media_player_new_from_media( media.m_media, &ex.ex );
}
MediaPlayer::~MediaPlayer()
@@ -45,7 +45,7 @@ MediaPlayer::~MediaPlayer()
void MediaPlayer::setMedia( Media &media )
{
- libvlc_media_player_set_media( m_player, media.instance() );
+ libvlc_media_player_set_media( m_player, media.m_media );
}
int MediaPlayer::isPlaying()
More information about the vlc-devel
mailing list