media: Add use_chromeos_protected_av1 buildflag
This has been defined in ChromeOS configs, but isn't used yet in Chrome
(we are waiting on resolution of another issue). Defining it now to
remove the warning associated with it being undefined.
BUG=b:155509025
TEST=Builds
Change-Id: I8aa2be6e6aafdb89fa2878425457e5f04dca925e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3057869
Commit-Queue: Jeffrey Kardatzke <jkardatzke@google.com>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#907243}
diff --git a/media/BUILD.gn b/media/BUILD.gn
index 7990b82..b3e92b8 100644
--- a/media/BUILD.gn
+++ b/media/BUILD.gn
@@ -44,6 +44,7 @@
"ENABLE_MSE_MPEG2TS_STREAM_PARSER=$enable_mse_mpeg2ts_stream_parser",
"ENABLE_CAST_STREAMING_RENDERER=$enable_cast_streaming_renderer",
"USE_CHROMEOS_MEDIA_ACCELERATION=$use_vaapi||$use_v4l2_codec",
+ "USE_CHROMEOS_PROTECTED_AV1=$use_chromeos_protected_av1",
"USE_CHROMEOS_PROTECTED_MEDIA=$use_chromeos_protected_media",
"USE_PROPRIETARY_CODECS=$proprietary_codecs",
]
diff --git a/media/gpu/args.gni b/media/gpu/args.gni
index 806d5949..33ab1fa3 100644
--- a/media/gpu/args.gni
+++ b/media/gpu/args.gni
@@ -28,6 +28,17 @@
# to enable the CDM daemon in Chrome OS as well as support for
# encrypted content with HW video decoders.
use_chromeos_protected_media = false
+
+ # Indicates if ChromeOS protected media supports the AV1 codec. By default
+ # H.264, VP9 and HEVC are enabled if protected media is enabled; AV1 is
+ # optional.
+ use_chromeos_protected_av1 = false
+}
+
+if (use_chromeos_protected_av1) {
+ assert(
+ use_chromeos_protected_media,
+ "use_chromeos_protected_media must be set if use_chromeos_protected_av1 is")
}
# GN requires args that depend on other args to be declared in successive