base::UmaHistogramBoolean(Test results when `kHardwareSecureDecryptionDolbyVisionWithHdrCheck` is enabled.
a) With **HDR primary display** + external display (**non-HDR**),
- Histogram: Media.EME.MediaFoundationService.DolbyVisionSupport.WithoutHdrCheck recorded 1 samples, mean = 1.0 (flags = 0x41) [#]
0 O (0 = 0.0%)
1 -O (1 = 100.0%) {0.0%}
2 O (0 = 0.0%) {100.0%}
```
- Capability report:
```
Capabilities
{
"Audio Codecs": [
"aac"
],
"Encryption Schemes": [
"CENC",
"CBCS"
],
"Session Types": [
"temporary"
],
"Video Codecs": {
"av1": [],
"dolbyvision": [
"dolby vision profile 5",
"dolby vision profile 8"
],
"h264": [],
"hevc": []
}
}
```
b) With external display only (**non-HDR**),
- Histogram: Media.EME.MediaFoundationService.DolbyVisionSupport.WithoutHdrCheck recorded 1 samples, mean = 1.0 (flags = 0x41) [#]
0 O (0 = 0.0%)
1 -O (1 = 100.0%) {0.0%}
2 O (0 = 0.0%) {100.0%}
```
- Capability report:
```
Capabilities
{
"Audio Codecs": [
"aac"
],
"Encryption Schemes": [
"CENC"
],
"Session Types": [
"temporary"
],
"Video Codecs": {
"h264": [],
"hevc": []
}
}
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
PTAL, thanks! Detailed test results: https://chromium-review.git.corp.google.com/c/chromium/src/+/7998779/comment/e9d3b1dd_501f8402/
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
@Piet.S...@microsoft.com and @vpasu...@chromium.org, PTAL since xhwang is OOO untile July 6. We want to add this before M151 branch cut (June 29).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
lgtm % one question / optimization.
base::FEATURE_DISABLED_BY_DEFAULT);In another CL, do you want to move this flag and the two above to under the IS_WIN buildflag?
bool dv_support_with_hdr = is_type_supported_cb.Run(Do you want to guard all of (#2 + the Histogram reporting for WithHdrCheck) with the `if(base::FeatureList::IsEnabled(kHardwareSecureDecryptionDolbyVisionWithHdrCheck))`?.
Because otherwise, we spend time checking with HDR with an extra IsTypeSupported query, but we don't use it (apart from reporting to histogram).
Maybe you want to report both but only determine the final support based on feature flag, so the code is correct the way it is. Feel free to resolve if that was your intention.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
bool dv_support_with_hdr = is_type_supported_cb.Run(Do you want to guard all of (#2 + the Histogram reporting for WithHdrCheck) with the `if(base::FeatureList::IsEnabled(kHardwareSecureDecryptionDolbyVisionWithHdrCheck))`?.
Because otherwise, we spend time checking with HDR with an extra IsTypeSupported query, but we don't use it (apart from reporting to histogram).Maybe you want to report both but only determine the final support based on feature flag, so the code is correct the way it is. Feel free to resolve if that was your intention.
Good point but we still want to report both before/after enabling the feature since things can get changed. Once everything is working well, we can remove both metrics and query only one DV check with HDR.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
@eug...@chromium.org, could you please take a look at this for media_switches/media_foundation_service since Xiaohan and Dale both are OOO? Thanks!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
bool dv_support_with_hdr = is_type_supported_cb.Run(Sangbaek ParkDo you want to guard all of (#2 + the Histogram reporting for WithHdrCheck) with the `if(base::FeatureList::IsEnabled(kHardwareSecureDecryptionDolbyVisionWithHdrCheck))`?.
Because otherwise, we spend time checking with HDR with an extra IsTypeSupported query, but we don't use it (apart from reporting to histogram).Maybe you want to report both but only determine the final support based on feature flag, so the code is correct the way it is. Feel free to resolve if that was your intention.
Good point but we still want to report both before/after enabling the feature since things can get changed. Once everything is working well, we can remove both metrics and query only one DV check with HDR.
SGTM, thank you!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
#if BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION)There is a buildflag mismatch that will cause compilation failures in certain configurations. The constants `kHdrQueryName` and `kDolbyVisionSupportUmaPrefix` are defined under the preprocessor guard `#if BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION)`.
However, they are used inside `GetCdmCapability()` under a block guarded by `#if BUILDFLAG(ENABLE_PLATFORM_ENCRYPTED_DOLBY_VISION)`.
bool dv_support_with_hdr = is_type_supported_cb.Run(This code unconditionally executes the second Media Foundation query (`dv_support_with_hdr`) even if the first query (`dv_support_without_hdr`) returns `false`
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
There is a buildflag mismatch that will cause compilation failures in certain configurations. The constants `kHdrQueryName` and `kDolbyVisionSupportUmaPrefix` are defined under the preprocessor guard `#if BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION)`.
However, they are used inside `GetCdmCapability()` under a block guarded by `#if BUILDFLAG(ENABLE_PLATFORM_ENCRYPTED_DOLBY_VISION)`.
Thank you for catching this! Corrected `ENABLE_PLATFORM_DOLBY_VISION` to `ENABLE_PLATFORM_ENCRYPTED_DOLBY_VISION`.
This code unconditionally executes the second Media Foundation query (`dv_support_with_hdr`) even if the first query (`dv_support_without_hdr`) returns `false`
That's a great point to save the query time, thanks! Done.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
1 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: media/mojo/services/media_foundation_service.cc
Insertions: 14, Deletions: 8.
@@ -61,11 +61,11 @@
const char kRobustnessQueryName[] = "encryption-robustness";
const char kEncryptionSchemeQueryName[] = "encryption-type";
const char kEncryptionIvQueryName[] = "encryption-iv-size";
-#if BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION)
+#if BUILDFLAG(ENABLE_PLATFORM_ENCRYPTED_DOLBY_VISION)
const char kHdrQueryName[] = "hdr";
const char kDolbyVisionSupportUmaPrefix[] =
"Media.EME.MediaFoundationService.DolbyVisionSupport";
-#endif // BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION)
+#endif // BUILDFLAG(ENABLE_PLATFORM_ENCRYPTED_DOLBY_VISION)
const char kSwSecureRobustness[] = "SW_SECURE_DECODE";
const char kHwSecureRobustness[] = "HW_SECURE_ALL";
@@ -453,12 +453,18 @@
// 2. Query with HDR support. When multiple displays are connected to the
// device, the query result is expected to return TRUE if the primary
- // display (internal) is HDR.
- extra_features.insert({{kHdrQueryName, "1"}});
- bool dv_support_with_hdr = is_type_supported_cb.Run(
- is_hw_secure, GetTypeString(video_codec, /*audio_codec=*/std::nullopt,
- extra_features));
- extra_features.erase(kHdrQueryName);
+ // display (internal) is HDR. If the query result without HDR check is
+ // FALSE, we know the quer result with HDR check is expected to return
+ // FALSE as well.
+ bool dv_support_with_hdr = false;
+ if (dv_support_without_hdr) {
+ extra_features.insert({{kHdrQueryName, "1"}});
+ dv_support_with_hdr = is_type_supported_cb.Run(
+ is_hw_secure,
+ GetTypeString(video_codec, /*audio_codec=*/std::nullopt,
+ extra_features));
+ extra_features.erase(kHdrQueryName);
+ }
DVLOG(3) << __func__ << ": Dolby Vision support - dv_support_with_hdr="
<< dv_support_with_hdr
```
media: Report Dolby Vision capability histograms with/without HDR check
- Report Dolby Vision capability histograms with/without HDR check
```
Media.EME.MediaFoundationService.DolbyVisionSupport.WithHdrCheck
Media.EME.MediaFoundationService.DolbyVisionSupport.WithoutHdrCheck
```
- Add feature flag `kHardwareSecureDecryptionDolbyVisionWithHdrCheck`.
If this flag is on, we enable hardware secure Dolby Vision decoding
always with HDR display check. Disabled by default for now.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |