GNOME Bugzilla – Bug 141692
gst_init() type function that ignores arguments it doesn't understand
Last modified: 2004-12-22 21:47:04 UTC
There should be a gst_init() type function that works like gtk_init(), ie. that strips out and parses the --gst-* arguments and just ignores all the others. (Personally, I think GStreamer should drop its libpopt dependency altogether, but I have a feeling that is not too popular an option). Cheers -Tim
How should it work? How do we know if the argument requires an argument or not? So --my-funky-arg --gst-fatal-warnings: is --gst-fatal-warnings an argument for --my-funky-arg or not? It's impossible, or at least hard. Use popt and gst_init_get_popt_tables().
Granted, it's impossible to get perfectly right. However, gtk_init() and friends don't care too much about that, and it's also reasonable to say "the extremely rare case where '--gst-fatal-warnings' is a possible argument to your '--my-funky-arg', you'll just have to use it like '--my-funky-arg=--gst-fatal-warnings' or filter it out before you call gst_init()". gst_init() is not as convenient to use as it should be, and it's inconsistent with gfoo_init() usage elsewhere, IMHO. Cheers -Tim
This is obviously something that's not going to be fixed while we're API stable.
Actually, Johan fixed this after 0.8.3. I don't see why it can't be fixed in API stable, since it is more permissive, not less.