[MPlayer-dev-eng] [PATCH] sub properties and metadata as properties

Alban Bedel albeu at free.fr
Sun May 20 00:17:40 CEST 2007


On Sat, 19 May 2007 23:46:32 +0200
Benjamin Zores <ben at geexbox.org> wrote:

> Alban Bedel a écrit :
> > Hi all,
> > 
> > this is the beggining of my work to get rid of the current metadata API and
> > use the property API instead. IMHO having a separate API for metadata doesn't
> > make much sense when everything else can be queried via the properties.
> > Another thing is the limitation of the metadata API as it only allow to query
> > a subset of the possible metadata.
> > 
> > The first patch rework the property API to allow having sub properties
> > such as metadata/title, etc.
> > 
> > The second patch add the needed stuff to be able to query all info currently
> > available via the metadata API with properties.
> > 
> > After that (and some more work on the menu) it should be possible to remove
> > the whole metadata API. IMHO the related commands (MP_CMD_GET_META_*) should
> > then also be removed. However i'd like to hear what others thinks about
> > removing useless commands. On the plus side we would get rid of quiet some
> > code, on the minus side it would break some frontend.
> > 
> > 	Albeu
> 
> Hey,
> 
> Just to help with the testing, could you just add to your patch the 
> required changes to etc/menu.conf, needed to use new features ?

For the menu some more changes are needed to get exactly what is currently
possible with metadata. What is missing is beeing able to use expandable
strings to allow displaying things like "${width} x ${height}".

However you can currently test by adding single properties to the menu or
with the get_property and osd_show_property_text commands, for ex.
get_property metadata/title or
osd_show_property_text "Title: ${metadata/title}"

Note that get_property use the TO_STRING control wich give an "exact"
parsable value. The menu and string expansion (used by
osd_show_property_text) use the PRINT control wich give a value for
presentation (in the case of a delay for ex. TO_STRING would give "0.123456"
and PRINT "123 ms")

	Albeu




More information about the MPlayer-dev-eng mailing list