Bug 195855

Summary: [MSE][GStreamer] Fix handling of resolution changes in AppendPipeline
Product: WebKit Reporter: Alicia Boya García <aboya>
Component: WebKitGTKAssignee: Alicia Boya García <aboya>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, calvaris, commit-queue, ews-watchlist, rniwa
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews104 for mac-highsierra-wk2
none
Archive of layout-test-results from ews100 for mac-highsierra
none
Archive of layout-test-results from ews115 for mac-highsierra
none
Patch
none
Archive of layout-test-results from ews101 for mac-highsierra
none
Archive of layout-test-results from ews105 for mac-highsierra-wk2
none
Archive of layout-test-results from ews116 for mac-highsierra
none
Patch
none
Archive of layout-test-results from ews103 for mac-highsierra
none
Archive of layout-test-results from ews106 for mac-highsierra-wk2
none
Archive of layout-test-results from ews112 for mac-highsierra
none
Patch
none
Archive of layout-test-results from ews204 for win-future
none
Patch none

Alicia Boya García
Reported 2019-03-16 13:01:59 PDT
MediaSample instances produced by the AppendPipeline were not accounting for resolution changes. The causes of this are twofold: 1) m_presentationSize is set by connectDemuxerSrcPadToAppsink() (by calling parseDemuxerSrcPadCaps()), but not by appsinkCapsChanged(). 2) appsinkCapsChanged() was being called in the main thread as an asynchronous task. In consequence, even if m_presentationSize is set there, many samples with the new resolution would still be wrapped in a MediaSampleGStreamer using the old resolution by the main thread running consumeAppsinkAvailableSamples() before appsinkCapsChanged() is dispatched. This patch fixes these problems by updating m_presentationSize in appsinkCapsChanged() and making the streaming thread block until the main thread has dispatched appsinkCapsChanged(). This way the handling of caps changes is serialized with the handling of frames.
Attachments
Patch (511.19 KB, patch)
2019-03-16 18:29 PDT, Alicia Boya García
no flags
Archive of layout-test-results from ews104 for mac-highsierra-wk2 (2.95 MB, application/zip)
2019-03-16 19:23 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews100 for mac-highsierra (2.48 MB, application/zip)
2019-03-16 19:33 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews115 for mac-highsierra (2.32 MB, application/zip)
2019-03-16 20:15 PDT, EWS Watchlist
no flags
Patch (405.58 KB, patch)
2019-03-17 08:24 PDT, Alicia Boya García
no flags
Archive of layout-test-results from ews101 for mac-highsierra (2.46 MB, application/zip)
2019-03-17 09:27 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews105 for mac-highsierra-wk2 (2.70 MB, application/zip)
2019-03-17 09:41 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews116 for mac-highsierra (2.26 MB, application/zip)
2019-03-17 10:11 PDT, EWS Watchlist
no flags
Patch (405.58 KB, patch)
2019-03-19 07:09 PDT, Alicia Boya García
no flags
Archive of layout-test-results from ews103 for mac-highsierra (2.47 MB, application/zip)
2019-03-19 08:12 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews106 for mac-highsierra-wk2 (2.72 MB, application/zip)
2019-03-19 08:24 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews112 for mac-highsierra (2.26 MB, application/zip)
2019-03-19 08:54 PDT, EWS Watchlist
no flags
Patch (403.91 KB, patch)
2019-03-19 08:59 PDT, Alicia Boya García
no flags
Archive of layout-test-results from ews204 for win-future (12.87 MB, application/zip)
2019-03-19 10:49 PDT, EWS Watchlist
no flags
Patch (403.91 KB, patch)
2019-03-19 12:55 PDT, Alicia Boya García
no flags
Alicia Boya García
Comment 1 2019-03-16 18:29:38 PDT
EWS Watchlist
Comment 2 2019-03-16 19:23:34 PDT
Comment on attachment 364952 [details] Patch Attachment 364952 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/11537034 New failing tests: media/media-source/media-source-samples-resolution-change.html
EWS Watchlist
Comment 3 2019-03-16 19:23:36 PDT
Created attachment 364954 [details] Archive of layout-test-results from ews104 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 4 2019-03-16 19:33:09 PDT
Comment on attachment 364952 [details] Patch Attachment 364952 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/11537090 New failing tests: media/media-source/media-source-samples-resolution-change.html
EWS Watchlist
Comment 5 2019-03-16 19:33:11 PDT
Created attachment 364955 [details] Archive of layout-test-results from ews100 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 6 2019-03-16 20:15:53 PDT
Comment on attachment 364952 [details] Patch Attachment 364952 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/11537137 New failing tests: media/media-source/media-source-samples-resolution-change.html
EWS Watchlist
Comment 7 2019-03-16 20:15:55 PDT
Created attachment 364956 [details] Archive of layout-test-results from ews115 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-highsierra Platform: Mac OS X 10.13.6
Alicia Boya García
Comment 8 2019-03-17 08:24:13 PDT
EWS Watchlist
Comment 9 2019-03-17 09:27:54 PDT
Comment on attachment 364964 [details] Patch Attachment 364964 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/11541407 New failing tests: media/media-source/media-source-samples-resolution-change.html
EWS Watchlist
Comment 10 2019-03-17 09:27:55 PDT
Created attachment 364967 [details] Archive of layout-test-results from ews101 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 11 2019-03-17 09:40:58 PDT
Comment on attachment 364964 [details] Patch Attachment 364964 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/11541422 New failing tests: media/media-source/media-source-samples-resolution-change.html
EWS Watchlist
Comment 12 2019-03-17 09:41:00 PDT
Created attachment 364968 [details] Archive of layout-test-results from ews105 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 13 2019-03-17 10:11:14 PDT
Comment on attachment 364964 [details] Patch Attachment 364964 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/11541459 New failing tests: media/media-source/media-source-samples-resolution-change.html
EWS Watchlist
Comment 14 2019-03-17 10:11:15 PDT
Created attachment 364969 [details] Archive of layout-test-results from ews116 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-highsierra Platform: Mac OS X 10.13.6
Xabier Rodríguez Calvar
Comment 15 2019-03-18 00:30:50 PDT
Comment on attachment 364964 [details] Patch It looks like you need to flag the test for mac.
Xabier Rodríguez Calvar
Comment 16 2019-03-18 02:34:30 PDT
And another comment, could you try to write this test in the W3C test suite and then backport it here?
Alicia Boya García
Comment 17 2019-03-18 03:56:53 PDT
Unfortunately no. This test uses WebKit `internals` methods that are only available in WebKit test runner.
Alicia Boya García
Comment 18 2019-03-18 03:58:36 PDT
(and there is no standard APIs to poke in these internals)
Alicia Boya García
Comment 19 2019-03-19 07:09:40 PDT
EWS Watchlist
Comment 20 2019-03-19 08:12:24 PDT
Comment on attachment 365152 [details] Patch Attachment 365152 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/11565758 New failing tests: media/media-source/media-source-samples-resolution-change.html
EWS Watchlist
Comment 21 2019-03-19 08:12:26 PDT
Created attachment 365158 [details] Archive of layout-test-results from ews103 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 22 2019-03-19 08:24:37 PDT
Comment on attachment 365152 [details] Patch Attachment 365152 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/11565832 New failing tests: media/media-source/media-source-samples-resolution-change.html
EWS Watchlist
Comment 23 2019-03-19 08:24:39 PDT
Created attachment 365160 [details] Archive of layout-test-results from ews106 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 24 2019-03-19 08:54:54 PDT
Comment on attachment 365152 [details] Patch Attachment 365152 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/11565864 New failing tests: media/media-source/media-source-samples-resolution-change.html
EWS Watchlist
Comment 25 2019-03-19 08:54:56 PDT
Created attachment 365166 [details] Archive of layout-test-results from ews112 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-highsierra Platform: Mac OS X 10.13.6
Alicia Boya García
Comment 26 2019-03-19 08:59:33 PDT
EWS Watchlist
Comment 27 2019-03-19 10:49:09 PDT
Comment on attachment 365167 [details] Patch Attachment 365167 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/11567380 New failing tests: storage/indexeddb/modern/gc-closes-database-private.html
EWS Watchlist
Comment 28 2019-03-19 10:49:21 PDT
Created attachment 365184 [details] Archive of layout-test-results from ews204 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews204 Port: win-future Platform: CYGWIN_NT-6.1-2.10.0-0.325-5-3-x86_64-64bit
Alicia Boya García
Comment 29 2019-03-19 12:55:13 PDT
WebKit Commit Bot
Comment 30 2019-03-20 06:11:15 PDT
Comment on attachment 365213 [details] Patch Clearing flags on attachment: 365213 Committed r243199: <https://trac.webkit.org/changeset/243199>
WebKit Commit Bot
Comment 31 2019-03-20 06:11:17 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.