[vlc-devel] [PATCH] libvlc: expand media player API to reveal full information about titles and chapters

Felix Paul Kühne fkuehne at videolan.org
Mon Jan 26 22:58:54 CET 2015


Hello Rémi,

> On 26 Jan 2015, at 22:19, Rémi Denis-Courmont <remi at remlab.net> wrote:
> 
> Le lundi 26 janvier 2015, 21:55:53 Felix Paul Kühne a écrit :
>>> On 26 Jan 2015, at 21:36, Rémi Denis-Courmont <remi at remlab.net> wrote:
>>> 
>>> Sorry but to label all this "useful" makes me pretty sure that this is
>>> just
>>> code written without even looking and thinking.
>> 
>> Can you please elaborate?
> 
> OK, so the time offset is useful, albeit only indirectly, to build a time line. 
> The duration is informative. But the rest...
> 
> What do you think is the use case for byte offset and length?

tbh, I included those numbers because they are exposed in the internal VLC API already. Since I didn’t want to expand those structs in 3.1 because random guy comes around and needs that, I figured that it would be nicer to have them available in the first place. If you think that this is not a problem and it would be better if the numbers are stripped from the patch, I’ll happily do that. I don’t have hard opinions on that.

> Did you actually think about your code before dumping it for review?

In fact, yes.

> What does the menu mean in general?

This is up to the access. Typically, a special sequence where the user can touch controls on the video.

> What is the use for the application to know which of the tracks are the menus? You can use navigation or seeking if 
> you want to go (back) to the hypothetical menu. And you can't use the flag as a 
> hint for user interaction either.

On iOS and Android, we use an overlay video control UI for play/pause/crap. This is in the way when showing a menu and must be hidden so the user gets a chance to access all the buttons provided by the menu. Therefore, the client app must know if it shows a menu or not.
Additionally, you probably want to provide a button in the UI called “Go back to Menu”, so again, the client must know which out of N titles is the menu. Usually, this is title 0, but if I understood correctly from VLC’s code, this is just an implementation detail within dvdnav and far from being a standard.

> The names would be useful where they actually exist, not just as numbers as on 
> CDs and DVDs. But then they would need to be localized. How do you specify the 
> expected language with your proposal?

I don’t expect those names to be localized in the first place. If you review the dvdnav access, you’ll see that it assigns well defined names to defined parts of a DVD menu to precisely navigate to (like chapter overview, making off, what not). But yes, you are in so far right, those constants are not published within the libvlc API and my patch, what they should be to be useful to externals.
Besides, if I remember correctly, containers like MP4 support chapters, too, even with names. So if a chapter got a name defined by the media creator, IMO it should be displayed to the user. 

Cheers,

Felix




More information about the vlc-devel mailing list