GNOME Bugzilla – Bug 754112
pad: don't fallback to caps queries with proxy pads
Last modified: 2015-11-06 14:12:51 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.
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 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 :)
unit tests and validate tests passing.
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
Doesn't this mean that a proxy pad will no longer check against its own pad template if there's no peer yet?
Good point, let me write unit tests to verify those cases.
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.
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.
Any opinions here?
I agreed with your logic - I should have said so at the time, sorry :)
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.
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