[gst-devel] caps parsing error in gst.parse_launch

Florent fthiery at gmail.com
Wed Apr 22 18:52:38 CEST 2009


Hello,

I have an issue about caps declaration.

My project (gst-gengui) is intended to be used in the same fashion as
gst-launch. In other terms, my app gets all the arguments (argv) and
concanetes them to form the same string as in command line. Then,
gst.parse_launch launches the pipeline from the description. The
problem is that if the string contains some "capsfilter
caps='video/x-h264...' " there is a caps parsing error.

The only workaround i could find is to specify the caps somewhere
else, create them and set them as property :
1) cap = gst.caps_from_string(caps_string)
2) capsfilter.set_property("caps",cap)

I don't know why, but syntax is different for gst-gengui command line
usage and in the config file.

In config file, what works (no double quotes between caps) is
declaring the description as follows (no quotes, no named capsfilter
element):
pipeline_desc = "videotestsrc ! video/x-raw-yuv, format=(fourcc)YUY2,
width=(int)320, height=(int)240, framerate=(fraction)15/1 !
ffmpegcolorspace !  videobalance ! queue ! xvimagesink"

command line equivalent (quotes needed):
gst-gengui videotestsrc ! "video/x-raw-yuv, format=(fourcc)YUY2,
width=(int)320, height=(int)240, framerate=(fraction)50/1" ! queue !
xvimagesink

whereas gst-launch can work with
- video/x-raw-rgb
- "video/x-raw-rgb"
- capsfilter caps="video/x-raw-rgb"

I would be happy to find a nicer workaround than parsing the
description string for caps and setting the caps by hand, or defining
drastic declaration conventions...

Regards,

Florent




More information about the gstreamer-devel mailing list