[gst-devel] RFC: dynamic ranks
Steve Baker
steve at stevebaker.org
Wed Nov 12 21:54:43 CET 2003
On Thu, 2003-11-13 at 02:19, Benjamin Otte wrote:
> Just an idea I had recently:
>
> Do you think it would be useful to add a function to the element class
> like this:
>
> guint (* get_dynamic_rank) (void);
>
> Looks unspectacular, but would allow every element class to provide a
> dynamic rank additional to the current static ranks we provide on
> gst_element_register.
>
> What would that be useful for?
> Element classes could adjust their rank based on stuff that is only
> available on runtime. Or more specific: It eases autoselecting
> output/input plugins.
>
> examples:
> esdsink would return GST_RANK_NONE if esd wasn't running. Xvideosink would
> return GST_RANK_NONE if the X server had no xv support. v4l would return
> GST_RANK_NONE if the kernel didn't have v4l compiled in or there was no
> video capture card.
>
> Does that make sense?
> Or is it too general as quite some plugins don't need it and an interface
> would be nicer?
>
I was thinking of creating an interface called "usable" which had a
boolean function gst_usable_is_usable or somesuch.
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.
cheers
--
Steve Baker <steve at stevebaker.org>
More information about the gstreamer-devel
mailing list