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 "content/renderer/media/crypto/key_systems.h" | 5 #include "content/renderer/media/crypto/key_systems.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 18 matching lines...) Expand all Loading... | |
29 | 29 |
30 const char kAudioWebM[] = "audio/webm"; | 30 const char kAudioWebM[] = "audio/webm"; |
31 const char kVideoWebM[] = "video/webm"; | 31 const char kVideoWebM[] = "video/webm"; |
32 const char kVorbis[] = "vorbis"; | 32 const char kVorbis[] = "vorbis"; |
33 const char kVorbisVP8[] = "vorbis,vp8,vp8.0"; | 33 const char kVorbisVP8[] = "vorbis,vp8,vp8.0"; |
34 | 34 |
35 #if defined(USE_PROPRIETARY_CODECS) | 35 #if defined(USE_PROPRIETARY_CODECS) |
36 const char kAudioMp4[] = "audio/mp4"; | 36 const char kAudioMp4[] = "audio/mp4"; |
37 const char kVideoMp4[] = "video/mp4"; | 37 const char kVideoMp4[] = "video/mp4"; |
38 const char kMp4a[] = "mp4a"; | 38 const char kMp4a[] = "mp4a"; |
39 const char kMp4aAvc1[] = "mp4a,avc1"; | 39 const char kMp4aAvc1Avc3[] = "mp4a,avc1,avc3"; |
40 #endif // defined(USE_PROPRIETARY_CODECS) | 40 #endif // defined(USE_PROPRIETARY_CODECS) |
41 | 41 |
42 static void AddClearKey(std::vector<KeySystemInfo>* concrete_key_systems) { | 42 static void AddClearKey(std::vector<KeySystemInfo>* concrete_key_systems) { |
43 KeySystemInfo info(kClearKeyKeySystem); | 43 KeySystemInfo info(kClearKeyKeySystem); |
44 | 44 |
45 info.supported_types.push_back(std::make_pair(kAudioWebM, kVorbis)); | 45 info.supported_types.push_back(std::make_pair(kAudioWebM, kVorbis)); |
46 info.supported_types.push_back(std::make_pair(kVideoWebM, kVorbisVP8)); | 46 info.supported_types.push_back(std::make_pair(kVideoWebM, kVorbisVP8)); |
47 #if defined(USE_PROPRIETARY_CODECS) | 47 #if defined(USE_PROPRIETARY_CODECS) |
48 info.supported_types.push_back(std::make_pair(kAudioMp4, kMp4a)); | 48 info.supported_types.push_back(std::make_pair(kAudioMp4, kMp4a)); |
49 info.supported_types.push_back(std::make_pair(kVideoMp4, kMp4aAvc1)); | 49 info.supported_types.push_back(std::make_pair(kVideoMp4, kMp4aAvc1Avc3)); |
ddorwin
2013/10/15 23:41:27
We should also update chrome_key_systems.cc. Exter
| |
50 #endif // defined(USE_PROPRIETARY_CODECS) | 50 #endif // defined(USE_PROPRIETARY_CODECS) |
51 | 51 |
52 info.use_aes_decryptor = true; | 52 info.use_aes_decryptor = true; |
53 | 53 |
54 concrete_key_systems->push_back(info); | 54 concrete_key_systems->push_back(info); |
55 } | 55 } |
56 | 56 |
57 class KeySystems { | 57 class KeySystems { |
58 public: | 58 public: |
59 static KeySystems& GetInstance(); | 59 static KeySystems& GetInstance(); |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
347 std::string GetPepperType(const std::string& concrete_key_system) { | 347 std::string GetPepperType(const std::string& concrete_key_system) { |
348 return KeySystems::GetInstance().GetPepperType(concrete_key_system); | 348 return KeySystems::GetInstance().GetPepperType(concrete_key_system); |
349 } | 349 } |
350 #elif defined(OS_ANDROID) | 350 #elif defined(OS_ANDROID) |
351 std::vector<uint8> GetUUID(const std::string& concrete_key_system) { | 351 std::vector<uint8> GetUUID(const std::string& concrete_key_system) { |
352 return KeySystems::GetInstance().GetUUID(concrete_key_system); | 352 return KeySystems::GetInstance().GetUUID(concrete_key_system); |
353 } | 353 } |
354 #endif | 354 #endif |
355 | 355 |
356 } // namespace content | 356 } // namespace content |
OLD | NEW |