Attention is currently required from: J Kardatzke, John Rummell.
Xiaohan Wang would like John Rummell and J Kardatzke to review this change.
media: Add encrypted Dolby Vision support
Add a new build flag ENABLE_PLATFORM_ENCRYPTED_DOLBY_VISION. When
enabled, encrypted Dolby Vision (DV) could be supported if the platform
supports it. Clear DV will not be supported.
This build flag is disabled by default to allow prototyping.
KeySystemConfigSelector and MediaSource code are updated to allow DV
even when clear DV is not supported.
A browser test is added to cover the change in KeySystemConfigSelector.
The changes in source_buffer_state.cc and media_source.cc are manually
tested by doing an encrypted DV playback in the browser.
Bug: b/198001221
Test: See above.
Change-Id: I1d50020359b8b3251ed41aea66078af6f59dae02
---
M chrome/browser/media/encrypted_media_supported_types_browsertest.cc
M content/browser/media/cdm_registry_impl.cc
M media/BUILD.gn
M media/filters/source_buffer_state.cc
M media/media_options.gni
M third_party/blink/renderer/modules/mediasource/media_source.cc
M third_party/blink/renderer/platform/media/key_system_config_selector.cc
7 files changed, 142 insertions(+), 4 deletions(-)
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: J Kardatzke, John Rummell.
1 comment:
Patchset:
jrummell: PTAL as media/ owner
jkardatzke: PTAL since you know a lot of why we have these hacks
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: J Kardatzke, John Rummell, Matthew Wolenetz.
Xiaohan Wang would like Matthew Wolenetz to review this change.
media: Add encrypted Dolby Vision support
Add a new build flag ENABLE_PLATFORM_ENCRYPTED_DOLBY_VISION. When
enabled, encrypted Dolby Vision (DV) could be supported if the platform
supports it. Clear DV will not be supported.
This build flag is disabled by default to allow prototyping.
KeySystemConfigSelector and MediaSource code are updated to allow DV
even when clear DV is not supported.
A browser test is added to cover the change in KeySystemConfigSelector.
The changes in source_buffer_state.cc and media_source.cc are manually
tested by doing an encrypted DV playback in the browser.
Bug: b/198001221
Test: See above.
Change-Id: I1d50020359b8b3251ed41aea66078af6f59dae02
---
M chrome/browser/media/encrypted_media_supported_types_browsertest.cc
M content/browser/media/cdm_registry_impl.cc
M media/BUILD.gn
M media/filters/source_buffer_state.cc
M media/media_options.gni
M third_party/blink/renderer/modules/mediasource/media_source.cc
M third_party/blink/renderer/platform/media/key_system_config_selector.cc
7 files changed, 142 insertions(+), 4 deletions(-)
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: J Kardatzke, John Rummell, Matthew Wolenetz.
1 comment:
Patchset:
wolenetz: Please review MediaSource related changes.
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: J Kardatzke, John Rummell, Matthew Wolenetz, Xiaohan Wang.
Patch set 1:Code-Review +1
2 comments:
Patchset:
Ewww...its back. :) LGTM w/ nit
File chrome/browser/media/encrypted_media_supported_types_browsertest.cc:
// Pretend that we support hardware secure decryption for vp8 and vp9, but
// not for avc1. This will also pretend that there is support for vorbis
// audio.
Update this comment to reflect adding dolbyvision below.
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: J Kardatzke, John Rummell, Matthew Wolenetz, Xiaohan Wang.
1 comment:
File third_party/blink/renderer/platform/media/key_system_config_selector.cc:
Patch Set #1, Line 153: #if BUILDFLAG(ENABLE_PLATFORM_ENCRYPTED_DOLBY_VISION)
Unlike the HEVC equivalent we used to have, this isn't always true. How are you handling detection of actual DV support? Or does Windows guarantee it'll work everywhere even on non-DV hardware?
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Dale Curtis, J Kardatzke, John Rummell, Matthew Wolenetz.
2 comments:
File chrome/browser/media/encrypted_media_supported_types_browsertest.cc:
// Pretend that we support hardware secure decryption for vp8 and vp9, but
// not for avc1. This will also pretend that there is support for vorbis
// audio.
Update this comment to reflect adding dolbyvision below.
Done
File third_party/blink/renderer/platform/media/key_system_config_selector.cc:
Patch Set #1, Line 153: #if BUILDFLAG(ENABLE_PLATFORM_ENCRYPTED_DOLBY_VISION)
Unlike the HEVC equivalent we used to have, this isn't always true. […]
The actual DV support is done as part of the CDM capability query. On Windows, this will start the MediaFoundationService and call into MediaFoundation. You can see related code in https://chromium-review.googlesource.com/c/chromium/src/+/3788535.
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Dale Curtis, J Kardatzke, John Rummell, Matthew Wolenetz.
Xiaohan Wang has uploaded this change for review.
media: Add encrypted Dolby Vision support
Add a new build flag ENABLE_PLATFORM_ENCRYPTED_DOLBY_VISION. When
enabled, encrypted Dolby Vision (DV) could be supported if the platform
supports it. Clear DV will not be supported.
This build flag is disabled by default to allow prototyping.
KeySystemConfigSelector and MediaSource code are updated to allow DV
even when clear DV is not supported.
A browser test is added to cover the change in KeySystemConfigSelector.
The changes in source_buffer_state.cc and media_source.cc are manually
tested by doing an encrypted DV playback in the browser.
Bug: b/198001221
Test: See above.
Change-Id: I1d50020359b8b3251ed41aea66078af6f59dae02
---
M chrome/browser/media/encrypted_media_supported_types_browsertest.cc
M content/browser/media/cdm_registry_impl.cc
M media/BUILD.gn
M media/filters/source_buffer_state.cc
M media/media_options.gni
M third_party/blink/renderer/modules/mediasource/media_source.cc
M third_party/blink/renderer/platform/media/key_system_config_selector.cc
7 files changed, 145 insertions(+), 7 deletions(-)
Attention is currently required from: Dale Curtis, J Kardatzke, John Rummell, Matthew Wolenetz.
1 comment:
Patchset:
frankli: FYI
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Dale Curtis, J Kardatzke, John Rummell, Xiaohan Wang.
4 comments:
Commit Message:
Patch Set #3, Line 11: Clear DV will not be supported.
Do I understand correctly that clear DV will not be supported, regardless of the value of the new build flag? Is prevention of support for clear DV tested?
Patchset:
A couple questions and a nit.
File media/filters/source_buffer_state.cc:
Where does clear DV get rejected in MSE parse time or addSourceBuffer/changeType time (long before decode) in the case where the new buildflag is NOT enabled?
File third_party/blink/renderer/modules/mediasource/media_source.cc:
Patch Set #3, Line 594: ersus addSourceBuffer
nit: "versus addSourceBuffer or changeType" .. (if false)
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Dale Curtis, J Kardatzke, John Rummell, Matthew Wolenetz.
3 comments:
Commit Message:
Patch Set #3, Line 11: Clear DV will not be supported.
Do I understand correctly that clear DV will not be supported, regardless of the value of the new build flag?
Right now yes:
Is prevention of support for clear DV tested?
I tested manually
This is supported:
```
navigator.requestMediaKeySystemAccess("com.widevine.alpha", [{
initDataTypes: ["cenc"],
distinctiveIdentifier: "required",
persistentState: "required",
sessionTypes: ["temporary"],
videoCapabilities: [{
robustness: "HW_SECURE_ALL",
contentType: "video/mp4; codecs=dvhe.04.09",
}],
}]);
```
This is NOT supported:
```
MediaSource.isTypeSupported('video/mp4; codecs="dvhe.04.09"');
```
File media/filters/source_buffer_state.cc:
Where does clear DV get rejected in MSE parse time or addSourceBuffer/changeType time (long before d […]
I think it's through MediaSource::IsTypeSupportedInternal() which calls HTMLMediaElement::GetSupportsType(content_type), which is why we need to workaround here.
File third_party/blink/renderer/modules/mediasource/media_source.cc:
Patch Set #3, Line 594: ersus addSourceBuffer
nit: "versus addSourceBuffer or changeType" .. […]
Done
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: J Kardatzke, John Rummell, Matthew Wolenetz, Xiaohan Wang.
1 comment:
File third_party/blink/renderer/platform/media/key_system_config_selector.cc:
Patch Set #1, Line 153: #if BUILDFLAG(ENABLE_PLATFORM_ENCRYPTED_DOLBY_VISION)
The actual DV support is done as part of the CDM capability query. […]
Ah, great, thanks!
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: John Rummell, Matthew Wolenetz.
Xiaohan Wang removed J Kardatzke from this change.
media: Add encrypted Dolby Vision support
Add a new build flag ENABLE_PLATFORM_ENCRYPTED_DOLBY_VISION. When
enabled, encrypted Dolby Vision (DV) could be supported if the platform
supports it. Clear DV will not be supported.
This build flag is disabled by default to allow prototyping.
KeySystemConfigSelector and MediaSource code are updated to allow DV
even when clear DV is not supported.
A browser test is added to cover the change in KeySystemConfigSelector.
The changes in source_buffer_state.cc and media_source.cc are manually
tested by doing an encrypted DV playback in the browser.
Bug: b/198001221
Test: See above.
Change-Id: I1d50020359b8b3251ed41aea66078af6f59dae02
---
M chrome/browser/media/encrypted_media_supported_types_browsertest.cc
M content/browser/media/cdm_registry_impl.cc
M media/BUILD.gn
M media/filters/source_buffer_state.cc
M media/media_options.gni
M third_party/blink/renderer/modules/mediasource/media_source.cc
M third_party/blink/renderer/platform/media/key_system_config_selector.cc
7 files changed, 145 insertions(+), 7 deletions(-)
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: John Rummell, Matthew Wolenetz.
1 comment:
Patchset:
jrummell / wolenetz: Kindly ping!
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: John Rummell, Xiaohan Wang.
Patch set 4:Code-Review +1
3 comments:
Commit Message:
Patch Set #3, Line 11: Clear DV will not be supported.
> Do I understand correctly that clear DV will not be supported, regardless of the value of the new […]
Ack - thanks for the detailed explanatation, it really helps!
Patchset:
LGTM
File media/filters/source_buffer_state.cc:
I think it's through MediaSource::IsTypeSupportedInternal() which calls HTMLMediaElement::GetSupport […]
Ack
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Xiaohan Wang.
Patch set 4:Code-Review +1
2 comments:
Patchset:
LGTM
File third_party/blink/renderer/modules/mediasource/media_source.cc:
Patch Set #4, Line 662: codecs
`codecs` is the original here, so it would still contain DV. Patchset description seems to imply that's OK as MSE will say DV is allowed, but just wanted to note this in case it's an issue.
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
1 comment:
File third_party/blink/renderer/modules/mediasource/media_source.cc:
Patch Set #4, Line 662: codecs
`codecs` is the original here, so it would still contain DV. […]
Good point. I looked at the code; this will call into StreamParserFactory::IsTypeSupported() which will then call into
https://source.chromium.org/chromium/chromium/src/+/main:media/filters/stream_parser_factory.cc;drc=ddce2fc4e67fd4500d29cbe5f4993b3fb8e4e2ba;l=483
IIUIC, this is basically to check whether the demuxer can demux it. Since ENABLE_PLATFORM_DOLBY_VISION is true, demuxing DV content should be fine so it should be fine to use the original `codecs` here.
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
Patch set 4:Commit-Queue +2
Chromium LUCI CQ submitted this change.
media: Add encrypted Dolby Vision support
Add a new build flag ENABLE_PLATFORM_ENCRYPTED_DOLBY_VISION. When
enabled, encrypted Dolby Vision (DV) could be supported if the platform
supports it. Clear DV will not be supported.
This build flag is disabled by default to allow prototyping.
KeySystemConfigSelector and MediaSource code are updated to allow DV
even when clear DV is not supported.
A browser test is added to cover the change in KeySystemConfigSelector.
The changes in source_buffer_state.cc and media_source.cc are manually
tested by doing an encrypted DV playback in the browser.
Bug: b/198001221
Test: See above.
Change-Id: I1d50020359b8b3251ed41aea66078af6f59dae02
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3790285
Reviewed-by: Jeffrey Kardatzke <jkard...@google.com>
Commit-Queue: Xiaohan Wang <xhw...@chromium.org>
Reviewed-by: Matthew Wolenetz <wole...@chromium.org>
Reviewed-by: John Rummell <jrum...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1030817}
---
M chrome/browser/media/encrypted_media_supported_types_browsertest.cc
M content/browser/media/cdm_registry_impl.cc
M media/BUILD.gn
M media/filters/source_buffer_state.cc
M media/media_options.gni
M third_party/blink/renderer/modules/mediasource/media_source.cc
M third_party/blink/renderer/platform/media/key_system_config_selector.cc
7 files changed, 151 insertions(+), 7 deletions(-)
1 comment:
Patchset:
@Xiaohan, I have two question for this, do we support dolby vision profile5 for encrypted content? this profile uses `IPTPQc2` color space as i know, how we handle that colorspace conversion here? also another question is do we have a plan to support DV for clear content and enabled the dolbyvision build flag by default in the future as well?
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
1 comment:
Patchset:
@Xiaohan, I have two question for this, do we support dolby vision profile5 for encrypted content? t […]
@Sida, DV on Windows PC supports profiles of 4/5/8.
There is another Media Foundation For Clear playback project in Chromium which should able support DV in clear.
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
1 comment:
Patchset:
@Sida, DV on Windows PC supports profiles of 4/5/8. […]
What Frank said :) Thanks Frank!
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
1 comment:
Patchset:
What Frank said :) Thanks Frank!
Thanks @Frank @Xiaohan, still questions about this:
1. I know currently the only official solution to playback DV5 is using Windows10 builtin App `Movies and TV` with both `HEVC Extension` and `Dolby Video Extensions` installed (though mpv support it as well). So how can we directly support DV5 encrypted content without those extension installed (or I missed something)? Does it means that `Media Foundation For Clear playback` doesn't rely on other extension and has builtin ability to decode HEVC + DV5?
2. Just curious seems `Media Foundation For Clear playback` feature only exits in Edge not Chromium? I just search for the code, seems not much related code in chromium repo, also the flag only available in Edge as well not chromium.
3. Edge seems doesn't support DV Profile5 for clear content as well from my test result, just tried to disable `enable-media-foundation-clear` meanwhile make sure `HEVC Extension` and `Dolby Video Extensions` installed on my machine, DV5 not able to display correct color just like Chromium which use D3D11VA implement, then I tried enable the `enable-media-foundation-clear` switch, after that, I am not even able to play HEVC contents now, not to mention the DV Profile5.
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
1 comment:
Patchset:
Thanks @Frank @Xiaohan, still questions about this: […]
1. It uses Windows Media Foundation pipeline to do the rendering and hence it still needs those extensions installed.
2. "Media Foundation For Clear playback" - it is still under development in Chromium. In Edge, it is not enabled by default too.
3. As far as I know, there might be an issue with local file playback. How do you test the playback? If you wanted, I could start an email with you and DV Dolby offline to get into details of it.
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
1 comment:
Patchset:
1. […]
Thanks Frank, very details response. Will send you a email with sample video for the third question. The way that i tested on my side is quiet simple: just drag a mp4 file to browser, then play directly.
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
1 comment:
Patchset:
Thanks Frank, very details response. Will send you a email with sample video for the third question. […]
>...just drag a mp4 file to browser...
I was told the browser is not set as the default handler for media files and hence it doesn't work.
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.
1 comment:
Patchset:
>...just drag a mp4 file to browser... […]
Thats weird, what about create a <video> element and set the src to the mp4 file path!?
To view, visit change 3790285. To unsubscribe, or for help writing mail filters, visit settings.