GNOME Bugzilla – Bug 666725
videomixer stops working if more than one sinkpads exist.
Last modified: 2012-01-31 19:13:25 UTC
I wanted to construct a pipeline that displays the output of videomixer and writes a file. As soon as a second sinkpad is connected to the "tee", it stops rendering. This one her works (nearly the same as the example): gst-launch videotestsrc pattern=1 ! tee name=t1 ! queue ! video/x-raw-rgb, framerate=\(fraction\)10/1, width=100, height=100 ! videomixer name=mix ! ffmpegcolorspace ! ximagesink videotestsrc ! video/x-raw-rgb, framerate=\(fraction\)5/1, width=320, height=240 ! mix. But as soon as I add "t1. ! queue ! fakesink" to the call above it does not overlay anymore. I even can jam it with an additional "fakesrc ! fakesink" Checked with 0.10.30 as well as with a quite new git. The same happens if I use videomixer2 instead.
Reproduced (with recent git), no overlay with an extra pad to fakesink.
Ahem. I spent about an hour looking at logs and not finding what's failing. In the end, it turns out that the addition of the fakesink branch causes the pads to be added in the other order, so the full size buffer is drawn over the smaller one, obscuring it. If you add "t1. ! queue ! fakesink" at the start of the pipeline, instead of at the end, if all works fine :) So, not a bug, though an annoying behavior since there's no way to assign a "layer" or "depth" to pads. It would work a lot better in an actual program since you'd control the ordering in which the pads are added.
Thanks a lot for investigating:) Works perfectly. So its rather an oddity in gst-launch.
It's just been pointed out to me that it should be possible to control ordering of the pads. See the "sink_1::alpha" syntax for pads on this page: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-videomixer2.html Pads also have a zorder property.