[openbeos] Re: decoder config options

  • From: "David McPaul" <dlmcpaul@xxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Mon, 18 Feb 2008 11:55:58 +1100

Not so old. :-)

On 17/02/2008, Simon Taylor <simontaylor1@xxxxxxxxxxxx> wrote:
> Old thread, sorry.
>
> Urias McCullough wrote:
> > On 07/02/2008, David McPaul <dlmcpaul@xxxxxxxxx> wrote:
> >> Does anyone have any suggestions about the best way for a decoder to
> >> read user settable options?
> >>
> >> Currently I have this on my todo
> >> //  TODO We should have an option to control this for users that want
> >> to use other decoders for DIV/XVID
> >> //      uint32 decodewhat = (DIV3) | (DIV4<<1) | (DIV5<<2) | (XVID<<3) | 
> >> (OTHER<<4);
> >>         uint32 decodewhat = (true) | (true<<1) | (true<<2) | (true<<3) | 
> >> (false<<4);
> >>
> >> It would be nice to make this user selectable.
> >>
> >> I was thinking of just a file in config/settings/3ivx.decoder or something.
> >
> > At the expense of sounding extremely uninformed (I don't honestly know
> > the inner workings of BeOS/Haiku's media kit and how decoders are
> > chosen and loaded) - should the decision of whether a decoder
> > will/won't handle a specific format be the responsibility of the
> > decoder itself?
> >
> > Shouldn't the decoder simply state what it's capable of decoding, and
> > then, if several exist for a certain codec, the user decides which
> > will be used?
>
> Or even better the decoder gives itself a score as to how well it
> decodes each codec, and the media-kit chooses the highest.

I think the example I used was probably not the best.

Certainly there are issues under BeOS/Haiku where 2 decoders could
register for the same Container/Codec (eg AVI/XVID).  Under BeOS and I
expect Haiku the first decoder found is used (which is alphabetical I
believe).  Control of this should be handled by the OS in some way.
Some sort of control panel that shows all decoders and their
registered values so the end use can override in some way.

Which is all very well and nice to have but we don't have it.

Windows uses merit levels but doesn't have an overall configuration
panel so most end uses don't know much about it and just get confused
when things don't work because the wrong decoder was chosen.

Problems can arise when a decoder says it can decode a stream but
doesn't really handle the full stream.

> I think it's such a minority features to allow users to choose decoders
> that I would be against making it any more visible to the user than as a
> settings file, if it is necessary at all.

A decoder may well expose more configuration options other than my
example so I was hoping for some thoughts before I write code to read
a config file.  (Another example is post processing filters.  The 3ivx
decoder is now dynamically controlling the level of Post Processing
but I can see where someone might want to specify a level (or even 0))

Also wasn't there a class that made reading/writing config files easy?

-- 
Cheers
David

Other related posts: