Page 1 of 1

Accessing title of current item being played

Posted: 15 Dec 2011 19:40
by jml674
I 'm after adding a routine called libvlc_media_player_get_title() which will return the title of the item currently played.
The ultimate goal is to provide access to this information to the Mozilla plugin thru a new field in the API called "input.title" .
This can be the dvb-t program name or the title of the DVD. I decided to start with the latest first which seemed the simplest.

I spotted in file dvdnav.c a Control routine which returns exactly what I'm after with the DEMUX_GET_META enum as a parameter.

Now I'm trying to figure out how to tie libvlc_media_player_get_title() to this Control one which is unfortunately static.

I may use the wrong method here (maybe the meta info is already referenced in the player structure ?)

Newbie at developping around vlc, I'm looking for help.

regards,

Re: Accessing title of current item being played

Posted: 15 Dec 2011 21:31
by RĂ©mi Denis-Courmont
You cannot call demux functions directly from LibVLC. Even if you did get hold of the demuxer instance, it runs in a different thread and is not re-entrant.

Every thing has to through the input_thread object interface.

Re: Accessing title of current item being played

Posted: 16 Dec 2011 00:06
by jml674
OK thanks a bunch - I was indeed able to get it thru input_thread.

Re: Accessing title of current item being played

Posted: 02 Feb 2012 18:12
by jml674
All meta information is now available in VLC 2.0 thru the mediaDescription object.
For more info, please check http://wiki.videolan.org/Documentation:WebPlugin.

Re: Accessing title of current item being played

Posted: 06 Feb 2012 18:11
by Jean-Baptiste Kempf
Only in NPAPI...