[gst-devel] source-filter link problem with python

Michael Smith msmith at fluendo.com
Wed Mar 14 10:44:45 CET 2007


On Tue, 2007-02-20 at 15:42 +0100, Carlos Niharra wrote:
> Hi,
> 
>   I'm a newbie in this list, so sorry if I'm not
> pointing my question in the right place.
> 
>   My problem is that I'm trying to link a source and a
> filter in a pipeline through python without any
> success. I could link them with version 0.8.x of
> gstreamer, but the change of version from 0.8.x to
> 0.10.x took some changes in the python bindings API,
> and the function set_get_function of gst.Pad has been
> removed, so I don't know how to link the stages.
> 
>   The code of my source (FileSource.py) stage (based
> on the filesrc.py example) is:

You'll want to make these two classes inherit from gst.BaseSource and
gst.BaseTransform, rather than gst.Element. Getting all the precise
details of these correct without using the appropriate base classes is
fairly difficult.

There's an example or two in gst-python/examples/

Once you've done that, some notes on your main program:
 1. It doesn't seem to have a sink element.
 2. In 0.10, you shouldn't manually iterate your pipeline.
 3. You don't put your elements into the pipeline, so setting the
pipeline to PLAYING won't do anything

Mike




More information about the gstreamer-devel mailing list