| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |