GNOME Bugzilla – Bug 753623
pad: implement default handling of accept-caps using the template caps
Last modified: 2015-08-16 13:38:44 UTC
Add a new flag to GstPad to use the template pad caps instead of doing a query-caps on the pad. The design docs confirms that accept-caps should do shallow checks instead of asking downstream.
Created attachment 309258 [details] [review] pad: add GST_PAD_FLAG_ACCEPT_TEMPLATE It will make the default accept-caps handler use the pad template caps instead of the query-caps result to check if the caps is acceptable. This is aligned with what the design docs says the accept-caps should do (be non-recursive) and should be faster. It is *not* enabled by default, though. API: GST_PAD_FLAG_ACCEPT_TEMPLATE API: GST_PAD_IS_ACCEPT_TEMPLATE API: GST_PAD_SET_ACCEPT_TEMPLATE API: GST_PAD_UNSET_ACCEPT_TEMPLATE
Created attachment 309259 [details] [review] tests: pad: tests for accept-caps default handling Check if all the default 4 accept-caps possibilities are working: subset or intersect check and query-caps or template caps comparisons.
Created attachment 309261 [details] [review] audiodecoder: expose default query handling function Subclasses can use it to select what queries they want to handle and forward the rest to the default handling function. API: gst_audio_decoder_sink_query_default
Created attachment 309262 [details] [review] videodecoder: expose default query handling function Subclasses can use it to select what queries they want to handle and forward the rest to the default handling function. API: gst_video_decoder_sink_query_default
Created attachment 309264 [details] [review] avauddec: use template caps intersection for accept-caps Avoid doing downstream caps queries when accept-caps should just do a shallow caps check on the element itself
Created attachment 309265 [details] [review] avviddec: use template caps intersection for accept-caps Avoid doing downstream caps queries when accept-caps should just do a shallow caps check on the element itself
Comment on attachment 309261 [details] [review] audiodecoder: expose default query handling function Add docs and Since marker :)
Comment on attachment 309262 [details] [review] videodecoder: expose default query handling function Add docs and Since marker :)
Comment on attachment 309265 [details] [review] avviddec: use template caps intersection for accept-caps INTERSECT shouldn't be needed
Comment on attachment 309264 [details] [review] avauddec: use template caps intersection for accept-caps INTERSECT shouldn't be needed
Created attachment 309267 [details] [review] avauddec: use template caps intersection for accept-caps Avoid doing downstream caps queries when accept-caps should just do a shallow caps check on the element itself
Created attachment 309268 [details] [review] avviddec: use template caps intersection for accept-caps Avoid doing downstream caps queries when accept-caps should just do a shallow caps check on the element itself
gst-validate is happy with your changes
Created attachment 309284 [details] [review] audioparsers: enable accept-template flag Do a quick check with the pad template caps as it is enough. Users should have figured the appropriate full caps on a previous caps query
Created attachment 309285 [details] [review] tests: aacparse: use caps query instead of accept-caps The accept-caps query just does a shallow check at the current element while at this test we want it to also look at downstream. So use caps query there.
Created attachment 309286 [details] [review] videoparsers: enable accept-template flag Do a quick check with the pad template caps as it is enough. Users should have figured the appropriate full caps on a previous caps query
Created attachment 309287 [details] [review] pngparse: enable accept-intersect and accept-template flags on sinkpad Do a quick check with the pad template caps as it is enough. Users should have figured the appropriate full caps on a previous caps query
gst-validate is also happy with the new patches
Core: commit a1b9bb8eacd866bd9160983ec5d6e6a9a5ff282a Author: Thiago Santos <thiagoss@osg.samsung.com> Date: Fri Aug 14 08:14:52 2015 -0300 tests: pad: tests for accept-caps default handling Check if all the default 4 accept-caps possibilities are working: subset or intersect check and query-caps or template caps comparisons. https://bugzilla.gnome.org/show_bug.cgi?id=753623 commit b76ecfd992b0d3a423cc9ace5539ecd2ba509d41 Author: Thiago Santos <thiagoss@osg.samsung.com> Date: Fri Aug 14 07:51:07 2015 -0300 pad: add GST_PAD_FLAG_ACCEPT_TEMPLATE It will make the default accept-caps handler use the pad template caps instead of the query-caps result to check if the caps is acceptable. This is aligned with what the design docs says the accept-caps should do (be non-recursive) and should be faster. It is *not* enabled by default, though. API: GST_PAD_FLAG_ACCEPT_TEMPLATE API: GST_PAD_IS_ACCEPT_TEMPLATE API: GST_PAD_SET_ACCEPT_TEMPLATE API: GST_PAD_UNSET_ACCEPT_TEMPLATE https://bugzilla.gnome.org/show_bug.cgi?id=753623 Base: commit ea9b6a7e3c4eea512650adf530b7f1acb0eccd84 Author: Thiago Santos <thiagoss@osg.samsung.com> Date: Fri Aug 14 08:59:51 2015 -0300 videodecoder: expose default query handling function Subclasses can use it to select what queries they want to handle and forward the rest to the default handling function. API: gst_video_decoder_sink_query_default https://bugzilla.gnome.org/show_bug.cgi?id=753623 commit 8a64592481dab985ca520a5b1cb394a609275c60 Author: Thiago Santos <thiagoss@osg.samsung.com> Date: Fri Aug 14 08:58:58 2015 -0300 audiodecoder: expose default query handling function Subclasses can use it to select what queries they want to handle and forward the rest to the default handling function. API: gst_audio_decoder_sink_query_default https://bugzilla.gnome.org/show_bug.cgi?id=753623 good: commit 2b1db231754a323d9264408f7b8e893a467f9988 Author: Thiago Santos <thiagoss@osg.samsung.com> Date: Fri Aug 14 11:41:42 2015 -0300 tests: aacparse: use caps query instead of accept-caps The accept-caps query just does a shallow check at the current element while at this test we want it to also look at downstream. So use caps query there. https://bugzilla.gnome.org/show_bug.cgi?id=753623 commit 9523fb23ed67440e30ce03e666052b64fe7e1801 Author: Thiago Santos <thiagoss@osg.samsung.com> Date: Fri Aug 14 11:40:22 2015 -0300 audioparsers: enable accept-template flag Do a quick check with the pad template caps as it is enough. Users should have figured the appropriate full caps on a previous caps query https://bugzilla.gnome.org/show_bug.cgi?id=753623 bad: commit 8f855a8b78ddeef4ed118a04354c6cd7dd767c03 Author: Thiago Santos <thiagoss@osg.samsung.com> Date: Fri Aug 14 11:43:57 2015 -0300 pngparse: enable accept-intersect and accept-template flags on sinkpad Do a quick check with the pad template caps as it is enough. Users should have figured the appropriate full caps on a previous caps query https://bugzilla.gnome.org/show_bug.cgi?id=753623 commit c4cd1ce4fde363bd4e22416cff32e0a15447a53f Author: Thiago Santos <thiagoss@osg.samsung.com> Date: Fri Aug 14 11:43:18 2015 -0300 videoparsers: enable accept-template flag Do a quick check with the pad template caps as it is enough. Users should have figured the appropriate full caps on a previous caps query https://bugzilla.gnome.org/show_bug.cgi?id=753623 gst-libav: commit 1a098de5eb61e67c8c76336fa7fb1d924fe28365 Author: Thiago Santos <thiagoss@osg.samsung.com> Date: Fri Aug 14 08:22:39 2015 -0300 avviddec: use template caps intersection for accept-caps Avoid doing downstream caps queries when accept-caps should just do a shallow caps check on the element itself https://bugzilla.gnome.org/show_bug.cgi?id=753623 commit 2b387ba827313c6835e3877653ea9571bb9a9086 Author: Thiago Santos <thiagoss@osg.samsung.com> Date: Fri Aug 14 08:21:51 2015 -0300 avauddec: use template caps intersection for accept-caps Avoid doing downstream caps queries when accept-caps should just do a shallow caps check on the element itself https://bugzilla.gnome.org/show_bug.cgi?id=753623
Comment on attachment 309261 [details] [review] audiodecoder: expose default query handling function Pushed a new version with documentation.
Comment on attachment 309262 [details] [review] videodecoder: expose default query handling function New version with documentation was merged.