[vlc-devel] [PATCH] libvlc: add language and frame rate to libvlc_media_track_info_t
Rémi Denis-Courmont
remi at remlab.net
Wed Jan 30 17:55:47 CET 2013
Le mercredi 30 janvier 2013 18:33:30, Luca Barbato a écrit :
> On 09/10/12 16:49, Rémi Denis-Courmont wrote:
> > On Tue, 9 Oct 2012 16:34:03 +0200, Rafaël Carré <funman at videolan.org>
> >
> > wrote:
> >> From: Sébastien Toque <xilasz at gmail.com>
> >
> > Changing the size of libvlc_media_track_info_t is not allowed, since it
> > breaks binary compatibility.
>
> You should be safe if you mark the struct only allocable by the function
> providing the array of infos, only accessible by pointer, and you append
> fields in the end.
libvlc_media_track_info_t is returned as a table of structures, not a table of
pointers to individual structures. Your point is therefore unfortunately moot.
> If you feel somebody would do something stupid like making a
This is not about my feeling. It is about facts. The function returns a table
of structures, _not_ a table of pointers to individual structures. Therefore,
any change to the layout or size of the structure breaks binary compatibility:
int libvlc_media_get_tracks_info( libvlc_media_t *p_md,
libvlc_media_track_info_t **tracks );
> struct mine{
> libvlc_media_track_info_t info;
> int mine;
> }
>
> (or it is used)
>
> Then would be better come up with an additional info struct, marked
> accordingly and mark the old one for deprecation.
A new function and a new structure is needed, at the very least.
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list