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

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

Issue 2803823003: Query LibVPX for VP9 profile support.
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « media/base/decode_capabilities.cc ('k') | media/base/mime_util_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <map> 7 #include <map>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 case H264PROFILE_HIGH10PROFILE: 722 case H264PROFILE_HIGH10PROFILE:
723 // FFmpeg is not generally used for encrypted videos, so we do not 723 // FFmpeg is not generally used for encrypted videos, so we do not
724 // know whether 10-bit is supported. 724 // know whether 10-bit is supported.
725 ambiguous_platform_support = is_encrypted; 725 ambiguous_platform_support = is_encrypted;
726 break; 726 break;
727 #endif 727 #endif
728 default: 728 default:
729 ambiguous_platform_support = true; 729 ambiguous_platform_support = true;
730 } 730 }
731 } else if (codec == MimeUtil::VP9 && video_profile != VP9PROFILE_PROFILE0) { 731 } else if (codec == MimeUtil::VP9 && video_profile != VP9PROFILE_PROFILE0) {
732 // We don't know if the underlying platform supports these profiles. Need 732 #if defined(OS_ANDROID)
733 // to add platform level querying to get supported profiles. 733 // TODO(chcunningham): Get unambiguous answer for android platform support.
734 // Desktop support is described in calls to media::IsSupportedVideoConfig()
735 // below. In the future Android will use the same path.
736 // https://crbug.com/695264
737 ambiguous_platform_support = true;
738 #else
739 // TODO(chcunningham): Pass Key System configuration through to MediaClient
740 // to describe support for specific profiles. For now we don't know what
741 // Key System is being used, nor what profile's it supports.
734 // https://crbug.com/604566 742 // https://crbug.com/604566
735 ambiguous_platform_support = true; 743 ambiguous_platform_support = is_encrypted;
744 #endif
736 } 745 }
737 746
738 AudioCodec audio_codec = MimeUtilToAudioCodec(codec); 747 AudioCodec audio_codec = MimeUtilToAudioCodec(codec);
739 if (audio_codec != kUnknownAudioCodec) { 748 if (audio_codec != kUnknownAudioCodec) {
740 AudioConfig audio_config = {audio_codec}; 749 AudioConfig audio_config = {audio_codec};
741 750
742 // If MediaClient is provided use it to check for decoder support. 751 // If MediaClient is provided use it to check for decoder support.
743 MediaClient* media_client = GetMediaClient(); 752 MediaClient* media_client = GetMediaClient();
744 if (media_client && !media_client->IsSupportedAudioConfig(audio_config)) 753 if (media_client && !media_client->IsSupportedAudioConfig(audio_config))
745 return IsNotSupported; 754 return IsNotSupported;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 SupportsType MimeUtil::IsDefaultCodecSupported(const std::string& mime_type, 836 SupportsType MimeUtil::IsDefaultCodecSupported(const std::string& mime_type,
828 bool is_encrypted) const { 837 bool is_encrypted) const {
829 Codec default_codec = Codec::INVALID_CODEC; 838 Codec default_codec = Codec::INVALID_CODEC;
830 if (!GetDefaultCodec(mime_type, &default_codec)) 839 if (!GetDefaultCodec(mime_type, &default_codec))
831 return IsNotSupported; 840 return IsNotSupported;
832 return IsSimpleCodecSupported(mime_type, default_codec, is_encrypted); 841 return IsSimpleCodecSupported(mime_type, default_codec, is_encrypted);
833 } 842 }
834 843
835 } // namespace internal 844 } // namespace internal
836 } // namespace media 845 } // namespace media
OLDNEW
« no previous file with comments | « media/base/decode_capabilities.cc ('k') | media/base/mime_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698