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 753623 - pad: implement default handling of accept-caps using the template caps
pad: implement default handling of accept-caps using the template caps
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal enhancement
: 1.5.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-08-14 11:56 UTC by Thiago Sousa Santos
Modified: 2015-08-16 13:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pad: add GST_PAD_FLAG_ACCEPT_TEMPLATE (3.83 KB, patch)
2015-08-14 11:56 UTC, Thiago Sousa Santos
committed Details | Review
tests: pad: tests for accept-caps default handling (4.67 KB, patch)
2015-08-14 11:57 UTC, Thiago Sousa Santos
committed Details | Review
audiodecoder: expose default query handling function (2.67 KB, patch)
2015-08-14 12:08 UTC, Thiago Sousa Santos
needs-work Details | Review
videodecoder: expose default query handling function (2.49 KB, patch)
2015-08-14 12:08 UTC, Thiago Sousa Santos
needs-work Details | Review
avauddec: use template caps intersection for accept-caps (2.62 KB, patch)
2015-08-14 12:08 UTC, Thiago Sousa Santos
needs-work Details | Review
avviddec: use template caps intersection for accept-caps (2.57 KB, patch)
2015-08-14 12:08 UTC, Thiago Sousa Santos
needs-work Details | Review
avauddec: use template caps intersection for accept-caps (2.54 KB, patch)
2015-08-14 12:14 UTC, Thiago Sousa Santos
committed Details | Review
avviddec: use template caps intersection for accept-caps (2.49 KB, patch)
2015-08-14 12:14 UTC, Thiago Sousa Santos
committed Details | Review
audioparsers: enable accept-template flag (4.47 KB, patch)
2015-08-14 14:42 UTC, Thiago Sousa Santos
committed Details | Review
tests: aacparse: use caps query instead of accept-caps (1.65 KB, patch)
2015-08-14 14:42 UTC, Thiago Sousa Santos
committed Details | Review
videoparsers: enable accept-template flag (4.14 KB, patch)
2015-08-14 14:44 UTC, Thiago Sousa Santos
committed Details | Review
pngparse: enable accept-intersect and accept-template flags on sinkpad (994 bytes, patch)
2015-08-14 14:44 UTC, Thiago Sousa Santos
committed Details | Review

Description Thiago Sousa Santos 2015-08-14 11:56:20 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.
Comment 1 Thiago Sousa Santos 2015-08-14 11:56:58 UTC
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
Comment 2 Thiago Sousa Santos 2015-08-14 11:57:03 UTC
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.
Comment 3 Thiago Sousa Santos 2015-08-14 12:08:06 UTC
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
Comment 4 Thiago Sousa Santos 2015-08-14 12:08:11 UTC
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
Comment 5 Thiago Sousa Santos 2015-08-14 12:08:48 UTC
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
Comment 6 Thiago Sousa Santos 2015-08-14 12:08:52 UTC
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 7 Sebastian Dröge (slomo) 2015-08-14 12:09:56 UTC
Comment on attachment 309261 [details] [review]
audiodecoder: expose default query handling function

Add docs and Since marker :)
Comment 8 Sebastian Dröge (slomo) 2015-08-14 12:10:10 UTC
Comment on attachment 309262 [details] [review]
videodecoder: expose default query handling function

Add docs and Since marker :)
Comment 9 Sebastian Dröge (slomo) 2015-08-14 12:12:46 UTC
Comment on attachment 309265 [details] [review]
avviddec: use template caps intersection for accept-caps

INTERSECT shouldn't be needed
Comment 10 Sebastian Dröge (slomo) 2015-08-14 12:12:51 UTC
Comment on attachment 309264 [details] [review]
avauddec: use template caps intersection for accept-caps

INTERSECT shouldn't be needed
Comment 11 Thiago Sousa Santos 2015-08-14 12:14:23 UTC
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
Comment 12 Thiago Sousa Santos 2015-08-14 12:14:29 UTC
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
Comment 13 Sebastian Dröge (slomo) 2015-08-14 13:04:17 UTC
gst-validate is happy with your changes
Comment 14 Thiago Sousa Santos 2015-08-14 14:42:50 UTC
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
Comment 15 Thiago Sousa Santos 2015-08-14 14:42:55 UTC
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.
Comment 16 Thiago Sousa Santos 2015-08-14 14:44:51 UTC
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
Comment 17 Thiago Sousa Santos 2015-08-14 14:44:56 UTC
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
Comment 18 Sebastian Dröge (slomo) 2015-08-14 15:46:43 UTC
gst-validate is also happy with the new patches
Comment 19 Thiago Sousa Santos 2015-08-14 16:44:20 UTC
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 20 Thiago Sousa Santos 2015-08-14 16:45:47 UTC
Comment on attachment 309261 [details] [review]
audiodecoder: expose default query handling function

Pushed a new version with documentation.
Comment 21 Thiago Sousa Santos 2015-08-14 16:46:08 UTC
Comment on attachment 309262 [details] [review]
videodecoder: expose default query handling function

New version with documentation was merged.