Bug 195855 - [MSE][GStreamer] Fix handling of resolution changes in AppendPipeline
Summary: [MSE][GStreamer] Fix handling of resolution changes in AppendPipeline
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alicia Boya García
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-16 13:01 PDT by Alicia Boya García
Modified: 2019-03-20 06:11 PDT (History)
5 users (show)

See Also:


Attachments
Patch (511.19 KB, patch)
2019-03-16 18:29 PDT, Alicia Boya García
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews104 for mac-highsierra-wk2 (2.95 MB, application/zip)
2019-03-16 19:23 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews100 for mac-highsierra (2.48 MB, application/zip)
2019-03-16 19:33 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews115 for mac-highsierra (2.32 MB, application/zip)
2019-03-16 20:15 PDT, Build Bot
no flags Details
Patch (405.58 KB, patch)
2019-03-17 08:24 PDT, Alicia Boya García
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-highsierra (2.46 MB, application/zip)
2019-03-17 09:27 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-highsierra-wk2 (2.70 MB, application/zip)
2019-03-17 09:41 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews116 for mac-highsierra (2.26 MB, application/zip)
2019-03-17 10:11 PDT, Build Bot
no flags Details
Patch (405.58 KB, patch)
2019-03-19 07:09 PDT, Alicia Boya García
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-highsierra (2.47 MB, application/zip)
2019-03-19 08:12 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews106 for mac-highsierra-wk2 (2.72 MB, application/zip)
2019-03-19 08:24 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews112 for mac-highsierra (2.26 MB, application/zip)
2019-03-19 08:54 PDT, Build Bot
no flags Details
Patch (403.91 KB, patch)
2019-03-19 08:59 PDT, Alicia Boya García
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews204 for win-future (12.87 MB, application/zip)
2019-03-19 10:49 PDT, Build Bot
no flags Details
Patch (403.91 KB, patch)
2019-03-19 12:55 PDT, Alicia Boya García
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alicia Boya García 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.
Comment 1 Alicia Boya García 2019-03-16 18:29:38 PDT
Created attachment 364952 [details]
Patch
Comment 2 Build Bot 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
Comment 3 Build Bot 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
Comment 4 Build Bot 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
Comment 5 Build Bot 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
Comment 6 Build Bot 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
Comment 7 Build Bot 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
Comment 8 Alicia Boya García 2019-03-17 08:24:13 PDT
Created attachment 364964 [details]
Patch
Comment 9 Build Bot 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
Comment 10 Build Bot 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
Comment 11 Build Bot 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
Comment 12 Build Bot 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
Comment 13 Build Bot 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
Comment 14 Build Bot 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
Comment 15 Xabier Rodríguez Calvar 2019-03-18 00:30:50 PDT
Comment on attachment 364964 [details]
Patch

It looks like you need to flag the test for mac.
Comment 16 Xabier Rodríguez Calvar 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?
Comment 17 Alicia Boya García 2019-03-18 03:56:53 PDT
Unfortunately no. This test uses WebKit `internals` methods that are only available in WebKit test runner.
Comment 18 Alicia Boya García 2019-03-18 03:58:36 PDT
(and there is no standard APIs to poke in these internals)
Comment 19 Alicia Boya García 2019-03-19 07:09:40 PDT
Created attachment 365152 [details]
Patch
Comment 20 Build Bot 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
Comment 21 Build Bot 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
Comment 22 Build Bot 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
Comment 23 Build Bot 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
Comment 24 Build Bot 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
Comment 25 Build Bot 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
Comment 26 Alicia Boya García 2019-03-19 08:59:33 PDT
Created attachment 365167 [details]
Patch
Comment 27 Build Bot 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
Comment 28 Build Bot 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
Comment 29 Alicia Boya García 2019-03-19 12:55:13 PDT
Created attachment 365213 [details]
Patch
Comment 30 WebKit Commit Bot 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>
Comment 31 WebKit Commit Bot 2019-03-20 06:11:17 PDT
All reviewed patches have been landed.  Closing bug.