Accessing title of current item being played

This forum is about all development around libVLC.
jml674
Blank Cone
Blank Cone
Posts: 38
Joined: 03 Feb 2010 19:54
Location: France

Accessing title of current item being played

Postby jml674 » 15 Dec 2011 19:40

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,

Rémi Denis-Courmont
Developer
Developer
Posts: 15231
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Accessing title of current item being played

Postby Rémi Denis-Courmont » 15 Dec 2011 21:31

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

jml674
Blank Cone
Blank Cone
Posts: 38
Joined: 03 Feb 2010 19:54
Location: France

Re: Accessing title of current item being played

Postby jml674 » 16 Dec 2011 00:06

OK thanks a bunch - I was indeed able to get it thru input_thread.

jml674
Blank Cone
Blank Cone
Posts: 38
Joined: 03 Feb 2010 19:54
Location: France

Re: Accessing title of current item being played

Postby jml674 » 02 Feb 2012 18:12

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.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Accessing title of current item being played

Postby Jean-Baptiste Kempf » 06 Feb 2012 18:11

Only in NPAPI...
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 7 guests