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 795309 - input-selector: "pushing reconfigure event in wrong direction" warning when selecting source pad as active pad
input-selector: "pushing reconfigure event in wrong direction" warning when s...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.x
Other Linux
: Normal normal
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-04-16 20:13 UTC by huglhuglhugl
Modified: 2018-04-17 18:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
python code that triggers the warning (2.15 KB, text/x-python)
2018-04-16 20:13 UTC, huglhuglhugl
  Details
inputselector, outputselector: add guards for wrong pads being set as active pads (2.10 KB, patch)
2018-04-17 10:03 UTC, Tim-Philipp Müller
committed Details | Review

Description huglhuglhugl 2018-04-16 20:13:17 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.
Comment 1 Thiago Sousa Santos 2018-04-16 21:44:44 UTC
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.
Comment 2 Tim-Philipp Müller 2018-04-17 10:03:51 UTC
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.
Comment 3 Thiago Sousa Santos 2018-04-17 16:37:04 UTC
Review of attachment 371026 [details] [review]:

Should we also check the parent on the input-selector case? Otherwise looks good.
Comment 4 Tim-Philipp Müller 2018-04-17 16:44:42 UTC
> 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..
Comment 5 Tim-Philipp Müller 2018-04-17 17:58:33 UTC
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 6 Tim-Philipp Müller 2018-04-17 17:58:53 UTC
Comment on attachment 371026 [details] [review]
inputselector, outputselector: add guards for wrong pads being set as active pads

pushed with extra parent check.