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

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

Issue 2394873004: Enable OPUS and VP9 codecs on Android for Clear Key key system (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/key_systems.h" 5 #include "media/base/key_systems.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 return init_data_type == EmeInitDataType::WEBM || 79 return init_data_type == EmeInitDataType::WEBM ||
80 init_data_type == EmeInitDataType::KEYIDS; 80 init_data_type == EmeInitDataType::KEYIDS;
81 } 81 }
82 82
83 SupportedCodecs GetSupportedCodecs() const override { 83 SupportedCodecs GetSupportedCodecs() const override {
84 // On Android, Vorbis, VP8, AAC and AVC1 are supported in MediaCodec: 84 // On Android, Vorbis, VP8, AAC and AVC1 are supported in MediaCodec:
85 // http://developer.android.com/guide/appendix/media-formats.html 85 // http://developer.android.com/guide/appendix/media-formats.html
86 // VP9 support is device dependent. 86 // VP9 support is device dependent.
87 SupportedCodecs codecs = EME_CODEC_WEBM_ALL; 87 SupportedCodecs codecs = EME_CODEC_WEBM_ALL;
88 88
89 #if defined(OS_ANDROID)
90 // Temporarily disable VP9 support for Android.
91 // TODO(xhwang): Use mime_util.h to query VP9 support on Android.
92 codecs &= ~EME_CODEC_WEBM_VP9;
93
94 // Opus is not supported on Android yet. http://crbug.com/318436.
95 // TODO(sandersd): Check for platform support to set this bit.
96 codecs &= ~EME_CODEC_WEBM_OPUS;
97 #endif // defined(OS_ANDROID)
98
99 #if defined(USE_PROPRIETARY_CODECS) 89 #if defined(USE_PROPRIETARY_CODECS)
100 codecs |= EME_CODEC_MP4_ALL; 90 codecs |= EME_CODEC_MP4_ALL;
101 #endif // defined(USE_PROPRIETARY_CODECS) 91 #endif // defined(USE_PROPRIETARY_CODECS)
102 92
103 return codecs; 93 return codecs;
104 } 94 }
105 95
106 EmeConfigRule GetRobustnessConfigRule( 96 EmeConfigRule GetRobustnessConfigRule(
107 EmeMediaType media_type, 97 EmeMediaType media_type,
108 const std::string& requested_robustness) const override { 98 const std::string& requested_robustness) const override {
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 uint32_t mask) { 722 uint32_t mask) {
733 KeySystemsImpl::GetInstance()->AddCodecMask(media_type, codec, mask); 723 KeySystemsImpl::GetInstance()->AddCodecMask(media_type, codec, mask);
734 } 724 }
735 725
736 MEDIA_EXPORT void AddMimeTypeCodecMask(const std::string& mime_type, 726 MEDIA_EXPORT void AddMimeTypeCodecMask(const std::string& mime_type,
737 uint32_t mask) { 727 uint32_t mask) {
738 KeySystemsImpl::GetInstance()->AddMimeTypeCodecMask(mime_type, mask); 728 KeySystemsImpl::GetInstance()->AddMimeTypeCodecMask(mime_type, mask);
739 } 729 }
740 730
741 } // namespace media 731 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698