FW: Migrating to gstreamer-1.0: cannot add dynamic pad

Philippe Normand phil at base-art.net
Fri Jan 18 00:26:54 PST 2013


On Fri, 2013-01-18 at 08:01 +0100, Robert Szelepcsenyi wrote:
> Hi,
> 
> 
> I am trying out python bindings for gstreamer-1.0. I have come across a problem. I don't know whether I am doing anything wrong or it is a bug.
> 
> I have this piece of code. 
> #!/usr/bin/python                                                               
> 
> import gi
> gi.require_version('Gst', '1.0')
> from gi.repository import GObject, Gst
> 
> GObject.threads_init()
> Gst.init(None)
> 
> pipe = Gst.Pipeline()
> adder = Gst.ElementFactory.make("adder","audiomixer")
> pipe.add(adder)
> 
> sinkpad=adder.get_request_pad("sink%d")
> print sinkpad
> 
> It just initializes gstreamer 1.0, creates a pipe, adds adder (audiomixer) and tries to create a dynamic pad.
> 
> The problem is that the pad is obviously not created and just None is returned.
> 
> In gstreamer-0.10
> 
> adder.get_request_pad("sink%d")
> 
> works without any problem.
> 

In 1.0 the sink pad pad template changed to "sink_%u".
You can check easily with gst-inspect adder.

Philippe



More information about the gstreamer-devel mailing list