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 754112 - pad: don't fallback to caps queries with proxy pads
pad: don't fallback to caps queries with proxy pads
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 1.7.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-08-26 11:37 UTC by Thiago Sousa Santos
Modified: 2015-11-06 14:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pad: don't fallback to caps queries with proxy pads (1.08 KB, patch)
2015-08-26 11:37 UTC, Thiago Sousa Santos
committed Details | Review
pad: tests for accept-caps handling with proxy pads (7.06 KB, patch)
2015-09-30 11:31 UTC, Thiago Sousa Santos
committed Details | Review
pad: check template caps for proxy pads in accept-caps (2.01 KB, patch)
2015-11-05 19:16 UTC, Thiago Sousa Santos
committed Details | Review

Description Thiago Sousa Santos 2015-08-26 11:37:18 UTC
See attached patch. A proxy-pad should have its 'proxyness' respected,
if it failed the accept-caps that's it, no need to try again via a query
caps.
Comment 1 Thiago Sousa Santos 2015-08-26 11:37:38 UTC
Created attachment 310022 [details] [review]
pad: don't fallback to caps queries with proxy pads

A proxy-pad should always proxy the caps related queries
and events to its down or upstream peers on the other side
of the element. Falling back to a caps query seems wrong.
Comment 2 Sebastian Dröge (slomo) 2015-08-26 11:58:43 UTC
Comment on attachment 310022 [details] [review]
pad: don't fallback to caps queries with proxy pads

Looks good, please run through gst-validate and all unit tests and stuff :)
Comment 3 Thiago Sousa Santos 2015-08-26 17:18:34 UTC
unit tests and validate tests passing.
Comment 4 Thiago Sousa Santos 2015-09-26 10:30:27 UTC
commit 4b5e79cd1896de4c0f81aa1ac8b9b37d22fb428e
Author: Thiago Santos <thiagoss@osg.samsung.com>
Date:   Tue Aug 25 19:37:30 2015 -0300

    pad: don't fallback to caps queries with proxy pads
    
    A proxy-pad should always proxy the caps related queries
    and events to its down or upstream peers on the other side
    of the element. Falling back to a caps query seems wrong.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754112
Comment 5 Jan Schmidt 2015-09-26 10:57:52 UTC
Doesn't this mean that a proxy pad will no longer check against its own pad template if there's no peer yet?
Comment 6 Thiago Sousa Santos 2015-09-26 11:30:49 UTC
Good point, let me write unit tests to verify those cases.
Comment 7 Thiago Sousa Santos 2015-09-28 14:23:41 UTC
Indeed it seems to always reply TRUE when there is no pad to proxy. (There is a FIXME in the code about it, even though I think TRUE is a good default here)

Should we always intersect with the template caps? Or only when there is no proxy?

The caps query always intersects with the template it seems. To be aligned with that I guess it should always intersect, too.
Comment 8 Thiago Sousa Santos 2015-09-30 11:31:25 UTC
Created attachment 312420 [details] [review]
pad: tests for accept-caps handling with proxy pads

Adds 3 new tests for testing accept-caps behavior with
proxy-caps pads.

1) A scenario where there is no proxy. The caps should be compared to the
template caps of the pad

2) A scenario where there is a compatible pad. The caps should be compared
to the proxied pad caps (and also with the template)

3) A scenario where there is an incompatible proxy pad. No caps should be
possible at all.
Comment 9 Thiago Sousa Santos 2015-11-05 15:10:01 UTC
Any opinions here?
Comment 10 Jan Schmidt 2015-11-05 15:36:25 UTC
I agreed with your logic - I should have said so at the time, sorry :)
Comment 11 Thiago Sousa Santos 2015-11-05 19:16:46 UTC
Created attachment 314937 [details] [review]
pad: check template caps for proxy pads in accept-caps

Validate that the proxy pad indeed accepts the caps by also
comparing with the pad template caps, otherwise when the pad
had no internally linked pads it would always return true.
Comment 12 Thiago Sousa Santos 2015-11-06 14:12:15 UTC
commit 533d0ac7f1d8dea1d2915a359225184302c74fc9
Author: Thiago Santos <thiagoss@osg.samsung.com>
Date:   Tue Sep 29 21:14:19 2015 -0300

    pad: tests for accept-caps handling with proxy pads
    
    Adds 3 new tests for testing accept-caps behavior with
    proxy-caps pads.
    
    1) A scenario where there is no proxy. The caps should be compared to the
    template caps of the pad
    
    2) A scenario where there is a compatible pad. The caps should be compared
    to the proxied pad caps (and also with the template)
    
    3) A scenario where there is an incompatible proxy pad. No caps should be
    possible at all.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754112

commit 02d88fc3f3168e662750829c2488997eb2aba9ac
Author: Thiago Santos <thiagoss@osg.samsung.com>
Date:   Thu Nov 5 16:15:22 2015 -0300

    pad: check template caps for proxy pads in accept-caps
    
    Validate that the proxy pad indeed accepts the caps by also
    comparing with the pad template caps, otherwise when the pad
    had no internally linked pads it would always return true.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754112