[gst-devel] startup parameters

Benjamin Otte in7y118 at public.uni-hamburg.de
Sun Apr 6 08:06:02 CEST 2003


Hi people,

We're currently dealing with correct behaviour on wrong/erroneous startup
parameters in GStreamer. And we're thinking about what would be the
correct behaviour, when
1) An unknown parameter is given. (cat -a)
2) A parameter awaiting an option doesn't have one. (gnome-calculator
--sm-client-id)
3) There's an error parsing an option - a conversion error to int or so.
(gst-player --gst-scheduler=no-such-scheduler)
4) ...

Currently the behaviour is quite different across applications:
- GStreamer's gst_init exits when any of 1), 2) ,3) happens.
- Gnome's gnome_program_init exits when 2) or 3) happens, but just
ignores 1)
- XChat ignores 1), 2) and 3) but doesn't remove the options, instead it
tries to connect to them.
- echo does the same as xchat, but just prints them.
- cat exits on 1) and doesn't have 2) or 3)
- ping exits on 1), 2) and 3)

So what is "the right way" in this case?
I myself prefer exiting on any possible parsing errors, becuase a wrong
option obviously is a user error that should be corrected. Not correcting
it might make the program behave unexpected for the user, since he
supplied options that don't work as he expects them to.
But I'm not a usability guy, so it's up for you to discuss.

Cheers,
Benjamin (aka Company in #gnome)





More information about the gstreamer-devel mailing list