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

Unified Diff: media/base/android/media_drm_bridge.cc

Issue 17101027: Add a function to convert key system into UUID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: media/base/android/media_drm_bridge.cc
diff --git a/media/base/android/media_drm_bridge.cc b/media/base/android/media_drm_bridge.cc
index 8760900a8879af28953035571011e4d7ce01dec1..202ebec5b5c343d07fc94d7c15ed7261945be401 100644
--- a/media/base/android/media_drm_bridge.cc
+++ b/media/base/android/media_drm_bridge.cc
@@ -8,6 +8,27 @@
using base::android::ScopedJavaLocalRef;
+namespace {
+
+// TODO(qinmin): figure out what is the UUID for com.widevine.alpha, and also
ddorwin 2013/06/19 23:14:41 See below for com.widevine.alpha.
qinmin 2013/06/20 00:49:26 Done.
+// other key systems.
+const uint8 kWideVineUUID[] = {
+ 0xED, 0xEF, 0x8B, 0xA9, 0x79, 0xD6, 0x4A, 0xCE, // Widevine UUID
+ 0xA3, 0xC8, 0x27, 0xDC, 0xD5, 0x1D, 0x21, 0xED,
+};
+
+static std::vector<uint8> ConvertKeySystemToUUID(
+ const std::string& key_system) {
ddorwin 2013/06/19 23:14:41 There are constants for the key systems in key_sys
qinmin 2013/06/20 00:49:26 Done. Changing the MediaDrmBridge ctor back to acc
+ std::vector<uint8> uuid;
+ if (key_system == "com.widevine")
ddorwin 2013/06/19 23:14:41 com.widevine.alpha com.widevine is a parent key sy
qinmin 2013/06/20 00:49:26 Done.
+ uuid.assign(kWideVineUUID, kWideVineUUID + 16);
+ else
+ NOTIMPLEMENTED();
ddorwin 2013/06/19 23:14:41 not necessarily - it's just not recognized. You co
qinmin 2013/06/20 00:49:26 Done.
+ return uuid;
+}
+
+} // namespace
+
namespace media {
// static
@@ -16,8 +37,11 @@ bool MediaDrmBridge::IsAvailable() {
}
MediaDrmBridge::MediaDrmBridge(
- int media_keys_id, const std::vector<uint8>& uuid)
- : media_keys_id_(media_keys_id) {}
+ int media_keys_id, const std::string& key_system)
+ : media_keys_id_(media_keys_id),
+ uuid_(ConvertKeySystemToUUID(key_system)) {
ddorwin 2013/06/19 23:14:41 With a Create() method, you can do the conversion
qinmin 2013/06/20 00:49:26 Done.
+ // TODO(qinmin): pass the uuid to DRM engine.
+}
MediaDrmBridge::~MediaDrmBridge() {}
« content/browser/android/media_player_manager_impl.cc ('K') | « media/base/android/media_drm_bridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698