[vlc-devel] [PATCH 2/3] Add MusicBrainzAlbumID to the metadata

Wieland Hoffmann themineo at gmail.com
Mon Jan 20 12:54:54 CET 2014


Hallo Jean-Baptiste Kempf:
> On 17 Jan, Wieland Hoffmann wrote :
> > Hallo Jean-Baptiste Kempf:
> > > And do we need it as a main Meta? or can't we use it as an extra one?
> > 
> > Well, as mentioned before, saving them as extra tags would mean to
> > either not normalise the tag names and thereby force all code using the
> > ID to do that normalisation itself OR normalising the names which would
> > mean that this one specific track would get extra treatment compared to
> > the other extra tags, whose key in extra_tags is basically their name in
> > the file. AFAICT vlc_meta_type_t is currently used for all tags that get
> > such special treatment.
> 
> Sure, but for minor meta, we could have an helper to read those.
> I'm just wondering about the space taken by this, since vlc_meta_t size
> increases at the same time (src/input/meta.c)

Could you give me a hint about how to properly implement this with
helper functions (maybe there's already something like this in VLC and I
just didn't see it)? I thought about simply letting the albumid be
stored in the extra tags and explicitly defining the
vlc_meta_{Set,Get}... methods, which seems like an easy thing to do for
the Get method (loop over all possible tag names of the MBID, return the
value of the first one found), but seems hard for the setter, because it
wouldn't know which tag to use, if there's not already an MBID in the
file.

-- 
Wieland



More information about the vlc-devel mailing list