Commit 66e08e1b authored by Rémi Duraffort's avatar Rémi Duraffort

libvlcpp: directly access to the instance.

parent 9225ec11
......@@ -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();
......
......@@ -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;
......
......@@ -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;
}
......@@ -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;
......
......@@ -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()
......
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