Commit 15a1277e authored by Xiaohan Wang's avatar Xiaohan Wang Committed by Commit Bot

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/+/2036257Reviewed-by: default avatarJohn Rummell <jrummell@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738795}
parent 799301b9
......@@ -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,6 +182,7 @@ bool CdmModule::Initialize(const base::FilePath& cdm_path) {
#endif // defined(OS_WIN)
#if BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION)
if (base::FeatureList::IsEnabled(media::kCdmHostVerification))
InitCdmHostVerification(library_.get(), cdm_path_, cdm_host_file_paths);
#endif // BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION)
......
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