[gst-devel] Python binding and creation of new elements

Michael Smith msmith at xiph.org
Thu Aug 19 20:38:35 CEST 2010


2010/8/19 José Luis Segura Lucas <josel.segura at gmx.es>:
> Hi people!
> I'm using the Gstreamer Python binding and I need to create two new
> elements: a pure-source and a pure-sink element.
> For the sink element, I can use the base class gst.BaseSink and it works
> fine, but I can't say the same with gst.BaseSrc.
> I need a lower control on the source element, and I can't find the way for
> doing it inheriting from gst.BaseSrc or gst.Element.
> My problem is more complicated, but imaging that I want to implement the
> example of source with sometimes pad [1] seen on the plugin writer guide,
> but in Python. In this example, a loop method is used to read the "header"
> of the file and get the pads available when each line of the input file is
> read.
> How can I write this example in Python? Is it really possible? I don't find
> on the python-binding documetation anything about loop function in
> gst.Element class.

Why would this be a source element? If it's getting data from a file,
it should probably be a demuxer (based on your description), not a
source at all.

You should be able to write a pipeline-driving demuxer element with gst-python.

Mike




More information about the gstreamer-devel mailing list