OLD | NEW |
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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/strings/string_split.h" | 9 #include "base/strings/string_split.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 // TODO(servolk): Set |is_ambiguous| to true for now to make CanPlayType | 702 // TODO(servolk): Set |is_ambiguous| to true for now to make CanPlayType |
703 // return 'maybe' for HEVC codec ids, instead of probably. This needs to be | 703 // return 'maybe' for HEVC codec ids, instead of probably. This needs to be |
704 // changed to false after adding platform-level HEVC profile and level | 704 // changed to false after adding platform-level HEVC profile and level |
705 // checks, see crbug.com/601949. | 705 // checks, see crbug.com/601949. |
706 *is_ambiguous = true; | 706 *is_ambiguous = true; |
707 *codec = MimeUtil::HEVC; | 707 *codec = MimeUtil::HEVC; |
708 return true; | 708 return true; |
709 } | 709 } |
710 #endif | 710 #endif |
711 | 711 |
712 DVLOG(4) << __FUNCTION__ << ": Unrecognized codec id " << codec_id; | 712 DVLOG(4) << __func__ << ": Unrecognized codec id " << codec_id; |
713 return false; | 713 return false; |
714 } | 714 } |
715 | 715 |
716 bool MimeUtil::IsCodecSupported(Codec codec, | 716 bool MimeUtil::IsCodecSupported(Codec codec, |
717 const std::string& mime_type_lower_case, | 717 const std::string& mime_type_lower_case, |
718 bool is_encrypted) const { | 718 bool is_encrypted) const { |
719 DCHECK_NE(codec, INVALID_CODEC); | 719 DCHECK_NE(codec, INVALID_CODEC); |
720 | 720 |
721 #if defined(OS_ANDROID) | 721 #if defined(OS_ANDROID) |
722 if (!IsCodecSupportedOnPlatform(codec, mime_type_lower_case, is_encrypted, | 722 if (!IsCodecSupportedOnPlatform(codec, mime_type_lower_case, is_encrypted, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 const std::string& mime_type_lower_case, | 773 const std::string& mime_type_lower_case, |
774 bool is_encrypted) const { | 774 bool is_encrypted) const { |
775 Codec default_codec = Codec::INVALID_CODEC; | 775 Codec default_codec = Codec::INVALID_CODEC; |
776 if (!GetDefaultCodecLowerCase(mime_type_lower_case, &default_codec)) | 776 if (!GetDefaultCodecLowerCase(mime_type_lower_case, &default_codec)) |
777 return false; | 777 return false; |
778 return IsCodecSupported(default_codec, mime_type_lower_case, is_encrypted); | 778 return IsCodecSupported(default_codec, mime_type_lower_case, is_encrypted); |
779 } | 779 } |
780 | 780 |
781 } // namespace internal | 781 } // namespace internal |
782 } // namespace media | 782 } // namespace media |
OLD | NEW |