Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(873)

Unified Diff: media/base/key_systems.cc

Issue 2643333002: Convert USE_PROPRIETARY_CODECS to a buildflag header. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/eme_constants.h ('k') | media/base/media_file_checker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/key_systems.cc
diff --git a/media/base/key_systems.cc b/media/base/key_systems.cc
index 2bd244a1e38c2da85b2990324da9e65a71a7788d..ef16ad65fbdc6bab3830ea998e7f9c7f5ec402ee 100644
--- a/media/base/key_systems.cc
+++ b/media/base/key_systems.cc
@@ -22,6 +22,7 @@
#include "media/base/media_switches.h"
#include "ppapi/features/features.h"
#include "media/base/media_client.h"
+#include "media/media_features.h"
#include "third_party/widevine/cdm/widevine_cdm_common.h"
namespace media {
@@ -43,10 +44,10 @@ struct NamedCodec {
static const NamedCodec kMimeTypeToCodecMasks[] = {
{"audio/webm", EME_CODEC_WEBM_AUDIO_ALL},
{"video/webm", EME_CODEC_WEBM_VIDEO_ALL},
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
{"audio/mp4", EME_CODEC_MP4_AUDIO_ALL},
{"video/mp4", EME_CODEC_MP4_VIDEO_ALL}
-#endif // defined(USE_PROPRIETARY_CODECS)
+#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
};
// Mapping between codec names and enum values.
@@ -57,7 +58,7 @@ static const NamedCodec kCodecStrings[] = {
{"vp8.0", EME_CODEC_WEBM_VP8}, // VP8.
{"vp9", EME_CODEC_WEBM_VP9}, // VP9.
{"vp9.0", EME_CODEC_WEBM_VP9}, // VP9.
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
{"vp09", EME_CODEC_MP4_VP9}, // VP9 in MP4.
{"mp4a", EME_CODEC_MP4_AAC}, // AAC.
{"avc1", EME_CODEC_MP4_AVC1}, // AVC1.
@@ -66,7 +67,7 @@ static const NamedCodec kCodecStrings[] = {
{"hev1", EME_CODEC_MP4_HEVC}, // HEV1.
{"hvc1", EME_CODEC_MP4_HEVC}, // HVC1.
#endif
-#endif // defined(USE_PROPRIETARY_CODECS)
+#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
};
class ClearKeyProperties : public KeySystemProperties {
@@ -74,7 +75,7 @@ class ClearKeyProperties : public KeySystemProperties {
std::string GetKeySystemName() const override { return kClearKeyKeySystem; }
bool IsSupportedInitDataType(EmeInitDataType init_data_type) const override {
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
if (init_data_type == EmeInitDataType::CENC)
return true;
#endif
@@ -88,9 +89,9 @@ class ClearKeyProperties : public KeySystemProperties {
// VP9 support is device dependent.
SupportedCodecs codecs = EME_CODEC_WEBM_ALL;
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
codecs |= EME_CODEC_MP4_ALL;
-#endif // defined(USE_PROPRIETARY_CODECS)
+#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
return codecs;
}
« no previous file with comments | « media/base/eme_constants.h ('k') | media/base/media_file_checker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698