Chromium Code Reviews| Index: webkit/renderer/media/crypto/key_systems.cc |
| diff --git a/webkit/renderer/media/crypto/key_systems.cc b/webkit/renderer/media/crypto/key_systems.cc |
| index 161ec88e7e26aed6fa4236e10ac934e136573082..c67a3cdce5247d473cb03137c4b82dcaeebb0288 100644 |
| --- a/webkit/renderer/media/crypto/key_systems.cc |
| +++ b/webkit/renderer/media/crypto/key_systems.cc |
| @@ -14,6 +14,16 @@ |
| #include "third_party/WebKit/public/platform/WebString.h" |
| #include "webkit/renderer/media/crypto/key_systems_info.h" |
|
ddorwin
2013/06/20 03:07:27
All the system specifics go in key_systems_info.h/
qinmin
2013/06/20 17:41:53
Done.
|
| +namespace { |
| + |
| +// TODO(qinmin): add UUIDs for other key systems. |
|
ddorwin
2013/06/20 03:07:27
#ifdef all the new code to Android
qinmin
2013/06/20 17:41:53
Done.
|
| +const uint8 kWideVineUUID[] = { |
|
ddorwin
2013/06/20 03:07:27
nit: media code uses static instead of unnamed nam
qinmin
2013/06/20 17:41:53
Done.
|
| + 0xED, 0xEF, 0x8B, 0xA9, 0x79, 0xD6, 0x4A, 0xCE, |
| + 0xA3, 0xC8, 0x27, 0xDC, 0xD5, 0x1D, 0x21, 0xED, |
|
xhwang
2013/06/20 04:02:08
nit: drop the last comma.
qinmin
2013/06/20 17:41:53
Done.
|
| +}; |
| + |
| +} // namespace |
| + |
| namespace webkit_media { |
| // Convert a WebString to ASCII, falling back on an empty string in the case |
| @@ -160,4 +170,14 @@ std::string GetPepperType(const std::string& key_system) { |
| } |
| #endif // defined(ENABLE_PEPPER_CDMS) |
| +std::vector<uint8> ConvertKeySystemToAndroidUUID( |
|
ddorwin
2013/06/20 03:07:27
nit: Updating my previous suggesetion, GetAndroidU
xhwang
2013/06/20 04:02:08
I wonder whats' the extent of this UUID? Is this o
ddorwin
2013/06/20 04:12:44
Good point about GetPepperType(). I'm fine with Ge
qinmin
2013/06/20 17:41:53
Done.
|
| + const std::string& key_system) { |
| + std::vector<uint8> uuid; |
| + if (key_system == "com.widevine.alpha") |
|
ddorwin
2013/06/20 03:07:27
There is a constant for this in the _info file.
qinmin
2013/06/20 17:41:53
Seems that I need defined(WIDEVINE_CDM_AVAILABLE)
ddorwin
2013/06/20 22:20:15
Yes. That currently does two things for non-Pepper
|
| + uuid.assign(kWideVineUUID, kWideVineUUID + 16); |
| + else |
| + LOG(ERROR) << "Unrecognized key system: " << key_system; |
| + return uuid; |
| +} |
| + |
| } // namespace webkit_media |