[vlc-devel] [PATCH] libvlc: expand media player API to retrieve information about all available titles of the currently playing media item

Felix Paul Kühne fkuehne at videolan.org
Thu Mar 26 14:24:02 CET 2015


Hello Rémi,

> On 26 Mar 2015, at 14:14, Rémi Denis-Courmont <remi at remlab.net> wrote:
>> 
>> /**
>> + * Get the full description of available titles
>> + *
>> + * \param p_mi the media player *
>> + * \return list containing full description of available titles
>> + * \version LibVLC 3.0.0 and later.
>> + */
>> +LIBVLC_API libvlc_title_description_t *
>> +        libvlc_media_player_get_title_descriptions(
>> libvlc_media_player_t *p_mi );
> 
> Why do you return a list rather than a table?

Why not? :)

I thought it would be a nicer approach and it matches many other libvlc functions.

> 
>> +        case INPUT_GET_FULL_TITLE_INFO:
> 
> Why do you need a new control and why is it only used by LibVLC?

Because of your feedback from early February. I need to lock structures internal to libvlccore (p_input->p) as just like you said, the number of titles can change while storing all the information in a structure, which will lead to a runtime exception. By moving the locking and the collection of information to libvlccore, this problem is solved and my code no longer crashes, so thanks again for this valuable feedback!

Regarding usage beyond LibVLC, there is no reason why a UI module wouldn’t want to implement this control to receive and provide more information about available titles.

Best regards,

Felix


More information about the vlc-devel mailing list