return info on current playlist item

This forum is about all development around libVLC.
innerspace
Blank Cone
Blank Cone
Posts: 28
Joined: 10 Aug 2008 22:47
VLC version: 0.8.6
Operating System: Windows / OsX
Location: Thailand & England

return info on current playlist item

Postby innerspace » 22 Nov 2008 11:01

I have an application built around libvlc and I need to read the filename of the playlist item that is currently playing.

Are there any handles to achieve this or would I need to modify VLC directly?

erwan10
Developer
Developer
Posts: 415
Joined: 02 Nov 2008 23:16

Re: return info on current playlist item

Postby erwan10 » 23 Nov 2008 22:48

If you stick to libvlc api, the right functions should be :

If you use media list, use the media player associated to it to retrieve the media currently being played back :

libvlc_media_t * libvlc_media_player_get_media( libvlc_media_player_t *, libvlc_exception_t * );

Once you get the media, ask for its mrl :

char * libvlc_media_get_mrl( libvlc_media_t * p_md, libvlc_exception_t * p_e );

If you still use playlist (deprecated in libvlc api), use the following to get the media player associated to it and do as above :

libvlc_media_player_t * libvlc_playlist_get_media_player(libvlc_instance_t *, libvlc_exception_t * );


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 2 guests