[MPlayer-dev-eng] [PATCH] sub properties and metadata as properties
Alban Bedel
albeu at free.fr
Wed May 30 00:21:45 CEST 2007
On Sun, 27 May 2007 00:03:16 +0200
Benjamin Zores <ben at geexbox.org> wrote:
> Alban Bedel a écrit :
> > 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")
>
> Hi Alban,
>
> I finally took more time to have a look at your patches.
>
> #1: metadata-property.diff
> I'd say it's pretty completely and should probably gets commited.
> This would unify the metadata/property API.
> There's just 2 malloc in it that are casted where they shouldn't be.
>
> #2: sub-properties.diff
> I don't have much complains either and again, the best we can improve
> libmenu the best it is for me.
>
> So imho, better have these commited.
> Just don't forget to update the menu.conf sample file accordingly.
Commited with the malloc fixed, the menu.conf will come in the next round
with the real change in the menu.
Albeu
More information about the MPlayer-dev-eng
mailing list