Commit 02f4a8fb authored by Xiaohan Wang's avatar Xiaohan Wang Committed by Commit Bot

Reland "media: Add a feature for CdmHostVerification"

This reverts commit 8de1c11b.

Reason for revert: This CL is not related to the test failures.

Original change's description:
> Revert "media: Add a feature for CdmHostVerification"
> 
> This reverts commit 15a1277e.
> 
> Reason for revert: Suspecting cause for CDM test failures
> https://ci.chromium.org/p/chromium/builders/ci/Network%20Service%20Linux/396
> 
> Original change's description:
> > media: Add a feature for CdmHostVerification
> > 
> > By default it's enabled. No effect if ENABLE_CDM_HOST_VERIFICATION
> > buildflag is false.
> > 
> > To disable this feature for testing, type the following in the command
> > line:
> >   --disable-features=CdmHostVerification
> > 
> > Bug: 658036
> > Test: Manually tested with the feature disabled
> > Change-Id: Ia2d077436a1a8445aec29163a88d1bb4539c4811
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036257
> > Reviewed-by: John Rummell <jrummell@chromium.org>
> > Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#738795}
> 
> TBR=xhwang@chromium.org,jrummell@chromium.org,hmchen@chromium.org
> 
> Change-Id: I6fadbf600d281e3693001aab5abf9233cfa4c916
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 658036
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2040642
> Reviewed-by: Keishi Hattori <keishi@chromium.org>
> Commit-Queue: Keishi Hattori <keishi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#738842}

TBR=xhwang@chromium.org,jrummell@chromium.org,keishi@chromium.org,hmchen@chromium.org

Change-Id: I0b77bea43815ebe6131a56645e6473585b5d2db1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 658036
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2042399Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738996}
parent e4822b9d
......@@ -253,6 +253,11 @@ const base::Feature kUseAndroidOverlayAggressively{
const base::Feature kBackgroundVideoPauseOptimization{
"BackgroundVideoPauseOptimization", base::FEATURE_ENABLED_BY_DEFAULT};
// CDM host verification is enabled by default. Can be disabled for testing.
// Has no effect if ENABLE_CDM_HOST_VERIFICATION buildflag is false.
const base::Feature kCdmHostVerification{"CdmHostVerification",
base::FEATURE_ENABLED_BY_DEFAULT};
// Make MSE garbage collection algorithm more aggressive when we are under
// moderate or critical memory pressure. This will relieve memory pressure by
// releasing stale data from MSE buffers.
......
......@@ -106,6 +106,7 @@ MEDIA_EXPORT extern const base::Feature kAutoplayDisableSettings;
MEDIA_EXPORT extern const base::Feature kAutoplayWhitelistSettings;
MEDIA_EXPORT extern const base::Feature kBackgroundVideoPauseOptimization;
MEDIA_EXPORT extern const base::Feature kBresenhamCadence;
MEDIA_EXPORT extern const base::Feature kCdmHostVerification;
MEDIA_EXPORT extern const base::Feature kD3D11PrintCodecOnCrash;
MEDIA_EXPORT extern const base::Feature kD3D11VideoDecoder;
MEDIA_EXPORT extern const base::Feature kD3D11VideoDecoderIgnoreWorkarounds;
......
......@@ -13,6 +13,8 @@
#include "components/crash/core/common/crash_key.h"
#if BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION)
#include "base/feature_list.h"
#include "media/base/media_switches.h"
#include "media/cdm/cdm_host_files.h"
#endif // BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION)
......@@ -180,7 +182,8 @@ bool CdmModule::Initialize(const base::FilePath& cdm_path) {
#endif // defined(OS_WIN)
#if BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION)
InitCdmHostVerification(library_.get(), cdm_path_, cdm_host_file_paths);
if (base::FeatureList::IsEnabled(media::kCdmHostVerification))
InitCdmHostVerification(library_.get(), cdm_path_, cdm_host_file_paths);
#endif // BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION)
ReportLoadResult(LoadResult::kLoadSuccess);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment