libvlc_release( m_instance );
}
-libvlc_instance_t *libVLC::getInstance()
+libvlc_instance_t *libVLC::instance()
{
return m_instance;
}
-const char *libVLC::getVersion()
+const char *libVLC::version()
{
return libvlc_get_version();
}
-const char *libVLC::getCompiler()
+const char *libVLC::compiler()
{
return libvlc_get_compiler();
}
-const char *libVLC::getChanset()
+const char *libVLC::chanset()
{
return libvlc_get_changeset();
}
* Get the version of libVLC
* @return the version
*/
- const char *getVersion();
+ const char *version();
/**
* Get the compiler use for this binari
* @return the compiler used
*/
- const char *getCompiler();
+ const char *compiler();
/**
* Get the chanset of libvlc
* @return thje changeset
*/
- const char *getChanset();
+ const char *chanset();
private:
/**
* Get the instance of libvlc that cannot be modified
* @return the instance of libvlc
*/
- libvlc_instance_t *getInstance();
+ libvlc_instance_t *instance();
/** The instance of libvlc */
libvlc_instance_t *m_instance;
Media::Media( libVLC &libvlcInstance, const char *psz_mrl )
{
Exception ex;
- m_media = libvlc_media_new( libvlcInstance.getInstance(), psz_mrl, &ex.ex );
+ m_media = libvlc_media_new( libvlcInstance.instance(), psz_mrl, &ex.ex );
}
Media::Media( const Media& original )
libvlc_media_add_option_flag( m_media, ppsz_options, flag );
}
-int64_t Media::getDuration()
+int64_t Media::duration()
{
Exception ex;
return libvlc_media_get_duration( m_media, &ex.ex );
return libvlc_media_is_preparsed( m_media );
}
-char *Media::getMrl()
+char *Media::mrl()
{
return libvlc_media_get_mrl( m_media );
}
-char *Media::getMeta( libvlc_meta_t e_meta )
+char *Media::meta( libvlc_meta_t e_meta )
{
return libvlc_media_get_meta( m_media, e_meta );
}
return libvlc_media_save_meta( m_media );
}
-libvlc_state_t Media::getState()
+libvlc_state_t Media::state()
{
return libvlc_media_get_state( m_media );
}
libvlc_media_set_user_data( m_media, p_user_data );
}
-void *Media::getUserData()
+void *Media::userData()
{
return libvlc_media_get_user_data( m_media );
}
-libvlc_media_t *Media::getInstance()
+libvlc_media_t *Media::instance()
{
return m_media;
}
* Get the duration of the media
* @return the duration
*/
- int64_t getDuration();
+ int64_t duration();
/**
* Get preparsed status of the media
* Get the MRL of the media
* @return the MRL of the media
*/
- char *getMrl();
+ char *mrl();
/**
* Get the requiered meta
* @param e_meta: type of the meta
* @return the requiered meta
*/
- char *getMeta( libvlc_meta_t e_meta );
+ char *meta( libvlc_meta_t e_meta );
/**
* Set the given meta
* Get the state of the media
* @return the state of the media
*/
- libvlc_state_t getState();
+ libvlc_state_t state();
/**
* Get some statistics about this media
* @return the statistics
*/
- libvlc_media_stats_t *getStats();
+ libvlc_media_stats_t *stats();
- /**\todo: getSubItems */
- /**\todo: getEventManager */
+ /**\todo: subItems */
+ /**\todo: eventManager */
/**
* Set media descriptor's user data
* Retrive user data specified by a call to setUserData
* @return the user data pointer
*/
- void *getUserData();
+ void *userData();
private:
/**
* Get the instance of the libvlc_media_t
* @return the pointer to libvlc_media_t
*/
- libvlc_media_t *getInstance();
+ libvlc_media_t *instance();
/** The media */
libvlc_media_t *m_media;
MediaPlayer::MediaPlayer( libVLC &libvlcInstance )
{
Exception ex;
- m_player = libvlc_media_player_new( libvlcInstance.getInstance(), &ex.ex );
+ m_player = libvlc_media_player_new( libvlcInstance.instance(), &ex.ex );
}
MediaPlayer::MediaPlayer( Media &media )
{
Exception ex;
- m_player = libvlc_media_player_new_from_media( media.getInstance(), &ex.ex );
+ m_player = libvlc_media_player_new_from_media( media.instance(), &ex.ex );
}
MediaPlayer::~MediaPlayer()
void MediaPlayer::setMedia( Media &media )
{
Exception ex;
- libvlc_media_player_set_media( m_player, media.getInstance(), &ex.ex );
+ libvlc_media_player_set_media( m_player, media.instance(), &ex.ex );
}
int MediaPlayer::isPlaying()
libvlc_media_player_set_nsobject( m_player, drawable, &ex.ex );
}
-void* MediaPlayer::getNSObject()
+void* MediaPlayer::nsobject()
{
return libvlc_media_player_get_nsobject( m_player );
}
libvlc_media_player_set_agl( m_player, drawable, &ex.ex );
}
-uint32_t MediaPlayer::getAgl()
+uint32_t MediaPlayer::agl()
{
return libvlc_media_player_get_agl( m_player );
}
libvlc_media_player_set_xwindow( m_player, drawable, &ex.ex );
}
-uint32_t MediaPlayer::getXWindow()
+uint32_t MediaPlayer::xwindow()
{
return libvlc_media_player_get_xwindow( m_player );
}
libvlc_media_player_set_hwnd( m_player, drawable, &ex.ex );
}
-void *MediaPlayer::getHwnd()
+void *MediaPlayer::hwnd()
{
return libvlc_media_player_get_hwnd( m_player );
}
-int64_t MediaPlayer::getLenght()
+int64_t MediaPlayer::lenght()
{
Exception ex;
return libvlc_media_player_get_length( m_player, &ex.ex );
}
-int64_t MediaPlayer::getTime()
+int64_t MediaPlayer::time()
{
Exception ex;
return libvlc_media_player_get_time( m_player, &ex.ex );
libvlc_media_player_set_time( m_player, new_time, &ex.ex );
}
-float MediaPlayer::getPosition()
+float MediaPlayer::position()
{
Exception ex;
return libvlc_media_player_get_position( m_player, &ex.ex );
libvlc_media_player_set_position( m_player, position, &ex.ex );
}
-int MediaPlayer::getChapter()
+int MediaPlayer::chapter()
{
Exception ex;
return libvlc_media_player_get_chapter( m_player, &ex.ex );
}
-int MediaPlayer::getChapterCount()
+int MediaPlayer::chapterCount()
{
Exception ex;
return libvlc_media_player_get_chapter_count( m_player, &ex.ex );
return libvlc_media_player_will_play( m_player, &ex.ex );
}
-/*int MediaPlayer::getTitle()
-{
- Exception ex;
- return libvlc_media_player_get_title( m_player, &ex.ex );
-}*/
-
* Get the media associated with the player
* @return the media
*/
- ///@todo getMedia();
+ ///@todo media();
/**
* Get the event manager associated to the media player
* @return the event manager
*/
- ///@todo getEventManager()
+ ///@todo eventManager()
/**
* Is the player playing
* Get the NSView handler associated with the media player
* @return the NSView handler
*/
- void* getNSObject();
+ void* nsobject();
/**
* Set the agl handler where the media player shoud render the video
* Get the agl handler associated with the media player
* @return the agl handler
*/
- uint32_t getAgl();
+ uint32_t agl();
/**
* Set the X Window drawable where the media player shoud render the video
* Get the X Window drawable associated with the media player
* @return the X Window drawable
*/
- uint32_t getXWindow();
+ uint32_t xwindow();
/**
* Set the Win32/Win64 API window handle where the media player shoud
* Get the Win32/Win64 API window handle associated with the media player
* @return the windows handle
*/
- void *getHwnd();
+ void *hwnd();
/**
* Get the movie lenght (in ms)
* @return the movie length
*/
- int64_t getLenght();
+ int64_t lenght();
/**
* Get the current movie time (in ms)
* @return the current movie time
*/
- int64_t getTime();
+ int64_t time();
/**
* Set the movie time (in ms)
* Get the movie position (in percent)
* @return the movie position
*/
- float getPosition();
+ float position();
/**
* Set the movie position (in percent)
* Get the current movie chapter
* @return the current chapter
*/
- int getChapter();
+ int chapter();
/**
* Get the movie chapter count
* @return the movie chapter count
*/
- int getChapterCount();
+ int chapterCount();
/**
* Is the player going to play the media (not dead or dying)