After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 701109 - videomixer: z-ordering breaks if pads are added without setting zorder on it
videomixer: z-ordering breaks if pads are added without setting zorder on it
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.1.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-05-28 02:37 UTC by Nicolas Dufresne (ndufresne)
Modified: 2013-05-28 03:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nicolas Dufresne (ndufresne) 2013-05-28 02:37:58 UTC
The z-ordering is not correct if pad are added after having configured the z-ordering. To reproduce:

1) Request pad1 and set zorder to 2
2) Request pad2 (don't change z-order)

One can use this pipeline:
gst-launch-1.0 videotestsrc ! mix. videotestsrc ! mix. videomixer name=mix sink_1::xpos=100 sink_0::ypos=100 sink_0::zorder=2 ! video/x-raw,width=420,height=340 ! videoconvert ! xvimagesink

As default z-order is the pad number, it is expected that botton left (sink_0) is on top, as it has zorder=2 and sink_1 has zorder=1.
Comment 1 Nicolas Dufresne (ndufresne) 2013-05-28 02:47:29 UTC
Ok, that one was easy to fix:
commit cd30a81ee3f2b4626dc019a1026eace776c4cd1e
Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Date:   Mon May 27 22:43:25 2013 -0400

    videomixer: Maintain z-order when new pad are added
    
    https://bugzilla.gnome.org/show_bug.cgi?id=701109

This makes me notice that the sinkpads list is not thread safe, which mean changing zorder, creating new pad, or removing pads at runtime may lead to crash if done while streaming thread is iterating the list. Will file another bug.