Commit 353da33
committed
[EME] Check support for full content type (including codecs)
https://bugs.webkit.org/show_bug.cgi?id=310709
Reviewed by Jer Noble and Xabier Rodriguez-Calvar.
When evaluating media capabilities for requestMediaKeySystemAccess,
we use pass ParsedContentType's m_mimeType to the MediaSource,
which omits parameters of the MIME type like codecs.
The right field to use here is m_contentType, so MediaSource
can check support against the full MIME type, rather than just
its container type.
* LayoutTests/media/encrypted-media/mock-navigator-requestMediaKeySystemAccess-expected.txt:
* LayoutTests/media/encrypted-media/mock-navigator-requestMediaKeySystemAccess.html: Add test with supported type but unknown codec.
* LayoutTests/platform/glib/TestExpectations: Unflag mock-navigator-requestMediaKeySystemAccess.html.
* LayoutTests/platform/ios/TestExpectations: Ditto.
* LayoutTests/platform/mac/TestExpectations: Ditto.
* Source/WebCore/platform/encryptedmedia/CDMPrivate.cpp:
(WebCore::CDMPrivate::getSupportedCapabilitiesForAudioVideoType): Use full contentType for MediaEngineSupportParameters.
* Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::MockMediaPlayerMediaSource::supportsType): Return NotSupported if codec is 'unknown' or 'invalid'.
* Source/WebCore/platform/network/ParsedContentType.h:
(WebCore::ParsedContentType::contentType const): Added, returns m_contentType.
Original author: Andrzej Surdej <Andrzej_Surdej@comcast.com>
See: #1643
Canonical link: https://commits.webkit.org/310696@main1 parent ba8a9c5 commit 353da33
8 files changed
Lines changed: 21 additions & 6 deletions
File tree
- LayoutTests
- media/encrypted-media
- platform
- glib
- ios
- mac
- Source/WebCore/platform
- encryptedmedia
- mock/mediasource
- network
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
69 | 80 | | |
70 | 81 | | |
71 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2597 | 2597 | | |
2598 | 2598 | | |
2599 | 2599 | | |
2600 | | - | |
2601 | 2600 | | |
2602 | 2601 | | |
2603 | 2602 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2727 | 2727 | | |
2728 | 2728 | | |
2729 | 2729 | | |
2730 | | - | |
2731 | | - | |
2732 | | - | |
2733 | 2730 | | |
2734 | 2731 | | |
2735 | 2732 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1118 | 1118 | | |
1119 | 1119 | | |
1120 | 1120 | | |
1121 | | - | |
1122 | 1121 | | |
1123 | 1122 | | |
1124 | 1123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
| 423 | + | |
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
0 commit comments