[gst-devel] RFC: dynamic ranks

in7y118 at public.uni-hamburg.de in7y118 at public.uni-hamburg.de
Thu Nov 13 08:39:17 CET 2003


Quoting Steve Baker <steve at stevebaker.org>:

> I don't have a real preference for either approach - I think I lean
> toward a "usable" interface since only a handful of elements will need
> this, and it seems a bit messy to overload ranks with this new meaning.
>
Any approach is fine with me.
 
Just use something different from a boolean. There might be a reason why a 
plugin would like more than 2 values. (Not that I know one right now, but just 
in case.) I don't like limiting me too much.

But it seems right to use an interface for that.

I prefer
guint gst_dynamic_rank_get (GstDynamicRank *element);
where the return value is in the range [0, 100].
You can then just return 0 or 100 in the boolean cases.
And the real rank can be computed by gst_plugin_feature_get_rank (factory) * 
gst_dynamic_rank_get (element) / 100.

Then you just take all elements from Sink/Audio, load them if they implement 
the interface to compute the rank or use the static rank if they don't 
implement the interface and you have your auto plugin selector.




More information about the gstreamer-devel mailing list