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

Side by Side Diff: components/cdm/browser/cdm_message_filter_android.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 unified diff | Download patch
« no previous file with comments | « components/cdm/DEPS ('k') | components/cdm/common/widevine_drm_delegate_android.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/cdm/browser/cdm_message_filter_android.h" 5 #include "components/cdm/browser/cdm_message_filter_android.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 23 matching lines...) Expand all
34 CodecType codec_type; 34 CodecType codec_type;
35 const char* codec_name; 35 const char* codec_name;
36 const char* container_mime_type; 36 const char* container_mime_type;
37 }; 37 };
38 38
39 const CodecInfo kCodecsToQuery[] = { 39 const CodecInfo kCodecsToQuery[] = {
40 {media::EME_CODEC_WEBM_OPUS, CODEC_AUDIO, "opus", "video/webm"}, 40 {media::EME_CODEC_WEBM_OPUS, CODEC_AUDIO, "opus", "video/webm"},
41 {media::EME_CODEC_WEBM_VORBIS, CODEC_AUDIO, "vorbis", "video/webm"}, 41 {media::EME_CODEC_WEBM_VORBIS, CODEC_AUDIO, "vorbis", "video/webm"},
42 {media::EME_CODEC_WEBM_VP8, CODEC_VIDEO, "vp8", "video/webm"}, 42 {media::EME_CODEC_WEBM_VP8, CODEC_VIDEO, "vp8", "video/webm"},
43 {media::EME_CODEC_WEBM_VP9, CODEC_VIDEO, "vp9", "video/webm"}, 43 {media::EME_CODEC_WEBM_VP9, CODEC_VIDEO, "vp9", "video/webm"},
44 #if defined(USE_PROPRIETARY_CODECS) 44 #if BUILDFLAG(USE_PROPRIETARY_CODECS)
45 {media::EME_CODEC_MP4_AAC, CODEC_AUDIO, "mp4a", "video/mp4"}, 45 {media::EME_CODEC_MP4_AAC, CODEC_AUDIO, "mp4a", "video/mp4"},
46 {media::EME_CODEC_MP4_AVC1, CODEC_VIDEO, "avc1", "video/mp4"}, 46 {media::EME_CODEC_MP4_AVC1, CODEC_VIDEO, "avc1", "video/mp4"},
47 #if BUILDFLAG(ENABLE_HEVC_DEMUXING) 47 #if BUILDFLAG(ENABLE_HEVC_DEMUXING)
48 {media::EME_CODEC_MP4_HEVC, CODEC_VIDEO, "hvc1", "video/mp4"}, 48 {media::EME_CODEC_MP4_HEVC, CODEC_VIDEO, "hvc1", "video/mp4"},
49 #endif 49 #endif
50 #endif // defined(USE_PROPRIETARY_CODECS) 50 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
51 }; 51 };
52 52
53 static SupportedCodecs GetSupportedCodecs( 53 static SupportedCodecs GetSupportedCodecs(
54 const SupportedKeySystemRequest& request, 54 const SupportedKeySystemRequest& request,
55 bool video_must_be_compositable) { 55 bool video_must_be_compositable) {
56 const std::string& key_system = request.key_system; 56 const std::string& key_system = request.key_system;
57 SupportedCodecs supported_codecs = media::EME_CODEC_NONE; 57 SupportedCodecs supported_codecs = media::EME_CODEC_NONE;
58 58
59 for (size_t i = 0; i < arraysize(kCodecsToQuery); ++i) { 59 for (size_t i = 0; i < arraysize(kCodecsToQuery); ++i) {
60 const CodecInfo& info = kCodecsToQuery[i]; 60 const CodecInfo& info = kCodecsToQuery[i];
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 response->compositing_codecs = GetSupportedCodecs(request, true); 119 response->compositing_codecs = GetSupportedCodecs(request, true);
120 response->non_compositing_codecs = GetSupportedCodecs(request, false); 120 response->non_compositing_codecs = GetSupportedCodecs(request, false);
121 } 121 }
122 122
123 void CdmMessageFilterAndroid::OnGetPlatformKeySystemNames( 123 void CdmMessageFilterAndroid::OnGetPlatformKeySystemNames(
124 std::vector<std::string>* key_systems) { 124 std::vector<std::string>* key_systems) {
125 *key_systems = MediaDrmBridge::GetPlatformKeySystemNames(); 125 *key_systems = MediaDrmBridge::GetPlatformKeySystemNames();
126 } 126 }
127 127
128 } // namespace cdm 128 } // namespace cdm
OLDNEW
« no previous file with comments | « components/cdm/DEPS ('k') | components/cdm/common/widevine_drm_delegate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698