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

Side by Side Diff: media/base/mime_util_internal.cc

Issue 1747073003: EME on Android: Improve accuracy of Key System availability. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/mime_util_internal.h" 5 #include "media/base/mime_util_internal.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 } 267 }
268 #endif 268 #endif
269 269
270 MimeUtil::MimeUtil() : allow_proprietary_codecs_(false) { 270 MimeUtil::MimeUtil() : allow_proprietary_codecs_(false) {
271 #if defined(OS_ANDROID) 271 #if defined(OS_ANDROID)
272 platform_info_.is_unified_media_pipeline_enabled = 272 platform_info_.is_unified_media_pipeline_enabled =
273 IsUnifiedMediaPipelineEnabled(); 273 IsUnifiedMediaPipelineEnabled();
274 // When the unified media pipeline is enabled, we need support for both GPU 274 // When the unified media pipeline is enabled, we need support for both GPU
275 // video decoders and MediaCodec; indicated by HasPlatformDecoderSupport(). 275 // video decoders and MediaCodec; indicated by HasPlatformDecoderSupport().
276 // When the Android pipeline is used, we only need access to MediaCodec. 276 // When the Android pipeline is used, we only need access to MediaCodec.
277 platform_info_.has_platform_decoders = 277 platform_info_.has_platform_decoders = ArePlatformDecodersAvailable();
278 platform_info_.is_unified_media_pipeline_enabled
279 ? HasPlatformDecoderSupport()
280 : MediaCodecUtil::IsMediaCodecAvailable();
281 platform_info_.has_platform_vp8_decoder = 278 platform_info_.has_platform_vp8_decoder =
282 MediaCodecUtil::IsVp8DecoderAvailable(); 279 MediaCodecUtil::IsVp8DecoderAvailable();
283 platform_info_.supports_opus = PlatformHasOpusSupport(); 280 platform_info_.supports_opus = PlatformHasOpusSupport();
284 platform_info_.supports_vp9 = PlatformHasVp9Support(); 281 platform_info_.supports_vp9 = PlatformHasVp9Support();
285 #endif 282 #endif
286 283
287 InitializeMimeTypeMaps(); 284 InitializeMimeTypeMaps();
288 } 285 }
289 286
290 MimeUtil::~MimeUtil() {} 287 MimeUtil::~MimeUtil() {}
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 const std::string& mime_type_lower_case, 649 const std::string& mime_type_lower_case,
653 bool is_encrypted) const { 650 bool is_encrypted) const {
654 Codec default_codec = Codec::INVALID_CODEC; 651 Codec default_codec = Codec::INVALID_CODEC;
655 if (!GetDefaultCodecLowerCase(mime_type_lower_case, &default_codec)) 652 if (!GetDefaultCodecLowerCase(mime_type_lower_case, &default_codec))
656 return false; 653 return false;
657 return IsCodecSupported(default_codec, mime_type_lower_case, is_encrypted); 654 return IsCodecSupported(default_codec, mime_type_lower_case, is_encrypted);
658 } 655 }
659 656
660 } // namespace internal 657 } // namespace internal
661 } // namespace media 658 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698