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

Unified Diff: chrome/browser/media/encrypted_media_message_filter_android.cc

Issue 246033002: Store SupportedCodecs in KeySystemInfo and KeySystems. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: eme_codec.h Created 6 years, 8 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 | « android_webview/renderer/aw_key_systems.cc ('k') | chrome/common/encrypted_media_messages_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/encrypted_media_message_filter_android.cc
diff --git a/chrome/browser/media/encrypted_media_message_filter_android.cc b/chrome/browser/media/encrypted_media_message_filter_android.cc
index c935fde54c6928dbecf022e5a54b07a33795be00..7afbec803a99a695b58a5e51fda1466fd307f340 100644
--- a/chrome/browser/media/encrypted_media_message_filter_android.cc
+++ b/chrome/browser/media/encrypted_media_message_filter_android.cc
@@ -12,6 +12,7 @@
#include "media/base/android/media_drm_bridge.h"
using content::BrowserThread;
+using content::SupportedCodecs;
using media::MediaCodecBridge;
using media::MediaDrmBridge;
@@ -25,26 +26,26 @@ enum CodecType {
};
struct CodecInfo {
- android::SupportedCodecs codec;
+ SupportedCodecs codec;
CodecType codec_type;
const char* codec_name;
const char* container_mime_type;
};
const CodecInfo kCodecsToQuery[] = {
- {android::WEBM_VORBIS, CODEC_AUDIO, "vorbis", "video/webm"},
- {android::WEBM_VP8, CODEC_VIDEO, "vp8", "video/webm"},
+ {content::EME_CODEC_WEBM_VORBIS, CODEC_AUDIO, "vorbis", "video/webm"},
+ {content::EME_CODEC_WEBM_VP8, CODEC_VIDEO, "vp8", "video/webm"},
#if defined(USE_PROPRIETARY_CODECS)
- {android::MP4_AAC, CODEC_AUDIO, "mp4a", "video/mp4"},
- {android::MP4_AVC1, CODEC_VIDEO, "avc1", "video/mp4"}
+ {content::EME_CODEC_MP4_AAC, CODEC_AUDIO, "mp4a", "video/mp4"},
+ {content::EME_CODEC_MP4_AVC1, CODEC_VIDEO, "avc1", "video/mp4"}
#endif // defined(USE_PROPRIETARY_CODECS)
};
-static android::SupportedCodecs GetSupportedCodecs(
+static SupportedCodecs GetSupportedCodecs(
const SupportedKeySystemRequest& request,
bool video_must_be_compositable) {
const std::string& key_system = request.key_system;
- android::SupportedCodecs supported_codecs = android::NO_CODECS;
+ SupportedCodecs supported_codecs = content::EME_CODEC_NONE;
for (size_t i = 0; i < arraysize(kCodecsToQuery); ++i) {
const CodecInfo& info = kCodecsToQuery[i];
@@ -56,8 +57,7 @@ static android::SupportedCodecs GetSupportedCodecs(
MediaDrmBridge::IsKeySystemSupportedWithType(
key_system, info.container_mime_type) &&
MediaCodecBridge::CanDecode(info.codec_name, is_secure)) {
- supported_codecs = static_cast<android::SupportedCodecs>(
- supported_codecs | info.codec);
+ supported_codecs |= info.codec;
}
}
@@ -104,8 +104,7 @@ void EncryptedMediaMessageFilterAndroid::OnGetSupportedKeySystems(
if (!MediaDrmBridge::IsKeySystemSupported(request.key_system))
return;
- DCHECK_EQ(request.codecs & android::INVALID_CODECS, android::NO_CODECS)
- << "unrecognized codec";
+ DCHECK(request.codecs & content::EME_CODEC_ALL) << "unrecognized codec";
response->key_system = request.key_system;
// TODO(qinmin): check composition is supported or not.
response->compositing_codecs = GetSupportedCodecs(request, true);
« no previous file with comments | « android_webview/renderer/aw_key_systems.cc ('k') | chrome/common/encrypted_media_messages_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698