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

Unified Diff: media/base/android/media_drm_bridge_delegate.h

Issue 962793005: Adds MediaClientAndroid to support embedder/MediaDrmBridge interaction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: overhaul: creates MediaClientAndroid (browser-side client), eliminates Java-based MediaDrmBridge ke… Created 5 years, 8 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_delegate.h
diff --git a/media/base/android/media_drm_bridge_delegate.h b/media/base/android/media_drm_bridge_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..949dd113dc60885dfed4c17e724347b33c99d881
--- /dev/null
+++ b/media/base/android/media_drm_bridge_delegate.h
@@ -0,0 +1,46 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_DELEGATE_H_
+#define MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_DELEGATE_H_
+
+#include <string>
+#include <vector>
+
+#include "base/macros.h"
+#include "media/base/eme_constants.h"
+#include "media/base/media_export.h"
+
+namespace media {
+
+// Allows embedders to modify the Android DRM flow. Delegates are registered
xhwang 2015/04/24 04:52:24 s/DRM/MediaDrm
gunsch 2015/04/27 23:44:13 Done.
+// to a specific key system.
+class MEDIA_EXPORT MediaDrmBridgeDelegate {
+ public:
+ MediaDrmBridgeDelegate();
+ virtual ~MediaDrmBridgeDelegate();
+
+ // Returns the UUID of the DRM scheme that this delegate applies to.
+ virtual const std::vector<uint8_t> GetUUID() const = 0;
+
+ // Invoked from CreateSession.
+ // If |init_data_out| is filled, it replaces |init_data| to send to the
+ // DRM plugin.
+ // If |optional_parameters_out| is filled, it is expected to be an
+ // even-length list of (key, value) pairs to send to the DRM plugin.
xhwang 2015/04/24 04:52:24 s/DRM plugin/MediaDrm. We only talk to Android API
gunsch 2015/04/27 23:44:13 Done.
+ // Returns false if the request should be rejected.
+ virtual bool OnCreateSession(
+ const EmeInitDataType init_data_type,
+ const uint8_t* init_data,
+ int init_data_length,
xhwang 2015/04/24 04:52:24 nit: use std::vector<uint8_t> now.
gunsch 2015/04/27 23:44:13 Done.
+ std::vector<uint8_t>& init_data_out,
+ std::vector<std::string>& optional_parameters_out);
xhwang 2015/04/24 04:52:24 output parameters should be pointers. We do not us
gunsch 2015/04/27 23:44:13 Done.
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MediaDrmBridgeDelegate);
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698