Python GStreamer错误“;断言';商品及服务税是要素(src)和x27;“失败”;链接元素时

Python GStreamer错误“;断言';商品及服务税是要素(src)和x27;“失败”;链接元素时,python,python-3.x,gstreamer,gobject-introspection,Python,Python 3.x,Gstreamer,Gobject Introspection,我正在使用Python和GObject内省绑定开发一个基于GStreamer的程序。我正在尝试建立这个管道: videomixer name=mix ! autovideosink \ uridecodebin uri=v4l2:///dev/video0 ! mix. 管道使用gst-launch-1.0可以完美地工作,但我的Python程序给出了错误: (minimal.py:12168): GStreamer-CRITICAL **: gst_element_link_pads_full

我正在使用Python和GObject内省绑定开发一个基于GStreamer的程序。我正在尝试建立这个管道:

videomixer name=mix ! autovideosink \
uridecodebin uri=v4l2:///dev/video0 ! mix.
管道使用gst-launch-1.0可以完美地工作,但我的Python程序给出了错误:

(minimal.py:12168): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (src)' failed
on_error(): (GError('Internal data flow error.',), 'gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstV4l2Src:source:\nstreaming task paused, reason not-linked (-1)')
我的代码:
如果元素未与管道一起添加,则会发生此错误。确保有问题的元素与管道一起添加。

我发现了问题所在,我错误地链接了动态创建的焊盘:

src.link(dest)
应该是:

pad.link(dest.get_compatible_pad(pad, None))

该元素已经添加到源代码中,结果证明这不是问题所在。
pad.link(dest.get_compatible_pad(pad, None))