GNOME Bugzilla – Bug 795309
input-selector: "pushing reconfigure event in wrong direction" warning when selecting source pad as active pad
Last modified: 2018-04-17 18:05:57 UTC
Created attachment 371001 [details] python code that triggers the warning Attempting to switch the active-pad for an input-selector gives a GSteamer Warning: (chan.py:20838): GStreamer-WARNING **: pad videotestsrc0:src pushing reconfigure event in wrong direction The input is not switched. Python code is attached.
I think your code is trying to set the active-pad to be a src pad. It should be one of its sink pads. We should catch this and error out properly with a more meaningful message.
Created attachment 371026 [details] [review] inputselector, outputselector: add guards for wrong pads being set as active pads Catch users wrongly setting foreign pads or wrong pads as the selector's active pad, which leads to all kinds of other issues. It's a programming error so handle it just like we would if we had direct API.
Review of attachment 371026 [details] [review]: Should we also check the parent on the input-selector case? Otherwise looks good.
> Should we also check the parent on the input-selector case? > Otherwise looks good. I think it's implicit there because we have a pad subclass in the input-selector case and users would have to go to a lot of effort to create a GstSelectorPad that doesn't belong to the element. Although I guess it could be the sink pad of a different input selector..
Alright then: commit 65e0907798aa99df6b70b0cecd351033f834ea08 Author: Tim-Philipp Müller <tim@centricular.com> Date: Tue Apr 17 11:01:09 2018 +0100 inputselector, outputselector: add guards for wrong pads being set as active pads Catch users wrongly setting foreign pads or wrong pads as the selector's active pad, which leads to all kinds of other issues. It's a programming error so handle it just like we would if we had direct API. https://bugzilla.gnome.org/show_bug.cgi?id=795309
Comment on attachment 371026 [details] [review] inputselector, outputselector: add guards for wrong pads being set as active pads pushed with extra parent check.