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 "chrome/renderer/media/chrome_key_systems.h" | 5 #include "chrome/renderer/media/chrome_key_systems.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
11 #include "content/public/renderer/render_thread.h" | 11 #include "content/public/renderer/render_thread.h" |
12 | 12 |
13 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. | 13 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
14 | 14 |
15 // The following must be after widevine_cdm_version.h. | 15 // The following must be after widevine_cdm_version.h. |
16 | 16 |
17 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_MIN_GLIBC_VERSION) | 17 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_MIN_GLIBC_VERSION) |
18 #include <gnu/libc-version.h> | 18 #include <gnu/libc-version.h> |
19 #include "base/version.h" | 19 #include "base/version.h" |
20 #endif | 20 #endif |
21 | 21 |
22 #if defined(OS_ANDROID) | 22 #if defined(OS_ANDROID) |
23 #include "chrome/common/encrypted_media_messages_android.h" | 23 #include "chrome/common/encrypted_media_messages_android.h" |
24 #endif | 24 #endif |
25 | 25 |
26 using content::KeySystemInfo; | 26 using content::KeySystemInfo; |
27 | 27 |
28 static const char kAudioWebM[] = "audio/webm"; | 28 const char kAudioWebM[] = "audio/webm"; |
29 static const char kVideoWebM[] = "video/webm"; | 29 const char kVideoWebM[] = "video/webm"; |
30 static const char kVorbis[] = "vorbis"; | 30 const char kVorbis[] = "vorbis"; |
31 static const char kVorbisVP8[] = "vorbis,vp8,vp8.0"; | 31 const char kVorbisVP8[] = "vorbis,vp8,vp8.0"; |
32 | 32 |
33 static const char kAudioMp4[] = "audio/mp4"; | 33 #if defined(USE_PROPRIETARY_CODECS) |
34 static const char kVideoMp4[] = "video/mp4"; | 34 const char kAudioMp4[] = "audio/mp4"; |
35 static const char kMp4a[] = "mp4a"; | 35 const char kVideoMp4[] = "video/mp4"; |
36 static const char kAvc1[] = "avc1"; | 36 const char kMp4a[] = "mp4a"; |
37 static const char kMp4aAvc1[] = "mp4a,avc1"; | 37 const char kAvc1[] = "avc1"; |
38 const char kMp4aAvc1[] = "mp4a,avc1"; | |
39 #endif // defined(USE_PROPRIETARY_CODECS) | |
xhwang
2013/09/25 21:16:52
Are dropping "static" because it's static by defau
Nico
2013/09/25 21:19:41
Yes.
xhwang
2013/09/25 21:21:33
sgtm if the chromium codebase is already doing thi
| |
38 | 40 |
39 #if defined(ENABLE_PEPPER_CDMS) | 41 #if defined(ENABLE_PEPPER_CDMS) |
40 static bool IsPepperCdmRegistered(const std::string& pepper_type) { | 42 static bool IsPepperCdmRegistered(const std::string& pepper_type) { |
41 bool is_registered = false; | 43 bool is_registered = false; |
42 content::RenderThread::Get()->Send( | 44 content::RenderThread::Get()->Send( |
43 new ChromeViewHostMsg_IsInternalPluginRegisteredForMimeType( | 45 new ChromeViewHostMsg_IsInternalPluginRegisteredForMimeType( |
44 pepper_type, &is_registered)); | 46 pepper_type, &is_registered)); |
45 | 47 |
46 return is_registered; | 48 return is_registered; |
47 } | 49 } |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
239 #endif | 241 #endif |
240 | 242 |
241 #if defined(WIDEVINE_CDM_AVAILABLE) | 243 #if defined(WIDEVINE_CDM_AVAILABLE) |
242 #if defined(ENABLE_PEPPER_CDMS) | 244 #if defined(ENABLE_PEPPER_CDMS) |
243 AddPepperBasedWidevine(key_systems_info); | 245 AddPepperBasedWidevine(key_systems_info); |
244 #elif defined(OS_ANDROID) | 246 #elif defined(OS_ANDROID) |
245 AddAndroidWidevine(key_systems_info); | 247 AddAndroidWidevine(key_systems_info); |
246 #endif | 248 #endif |
247 #endif | 249 #endif |
248 } | 250 } |
OLD | NEW |