[gst-devel] gst-python includes help ?!

Alexandre CONRAD aconrad.tlv at magic.fr
Mon Feb 23 13:01:01 CET 2004


Hi,

i've been trying to add options to my python program using the module 
"optparse" :

<-----cut here----->
import optparse, gstreamer

parser = optparse.OptionParser()
parser.add_option("-f", "--file", dest="filename")

(options, args) = parser.parse_args()

print options.filename

[my gstreamer stuff ...]
<-----cut here----->

but here I have an error message :

./live_server.py -f foo.txt
Error on option -f: unknown option.
Run './live_server.py --help' to see a full list of available command 
line options.
Segmentation fault

Okay. My program tells me to run --help... how friendly... (I didn't 
know I had AI programing capabilities) :

./live_server.py --help
Usage: live_server.py [OPTION...]

Help options:
   -?, --help                    Show this help message
   --usage                       Display brief usage message

GStreamer options:
   --gst-version                 Print the GStreamer version
   --gst-fatal-warnings          Make all warnings fatal
   --gst-debug-level=LEVEL       Default debug level from 1 (only error) 
to 5
                                 (anything) or 0 for no output
   --gst-debug=CATEGORIES        Comma-separated list of category_name:level
                                 pairs to set specific levels for the
                                 individual categories. Example:
                                 GST_AUTOPLUG:5,GST_ELEMENT_*:3
   --gst-debug-no-color          Disable color debugging output
   --gst-disable-debug           Disable debugging
   --gst-debug-help              Print available debug categories and exit
   --gst-disable-cpu-opt         Disable accelerated CPU instructions
   --gst-plugin-spew             Enable verbose plugin loading diagnostics
   --gst-plugin-path=PATHS       path list for loading plugins (separated by
                                 ':')
   --gst-plugin-load=PLUGINS     Comma-separated list of plugins to 
preload in
                                 addition to the list stored in env variable
                                 GST_PLUGIN_PATH
   --gst-disable-segtrap         Disable trapping of segmentation faults 
during
                                 plugin loading
   --gst-scheduler=SCHEDULER     Scheduler to use ('opt' is the default)
   --gst-registry=REGISTRY       Registry to use

So because of gstreamer, I can't add my options here. Is there a work 
around ? This shouldn't be there, right ?

Best regards,
-- 
Alexandre CONRAD - TLV
Research & Development
tel : +33 1 30 80 55 05
fax : +33 1 30 56 55 06
6, rue de la plaine
78860 - SAINT NOM LA BRETECHE
FRANCE





More information about the gstreamer-devel mailing list