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

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: rename createSession to createSessionFromNative to avoid bug in FindBugs 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
« no previous file with comments | « media/base/android/media_drm_bridge.cc ('k') | media/base/android/media_drm_bridge_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..7a18dace989cd72430ce483986da82996c76f722
--- /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/android/media_client_android.h"
+#include "media/base/eme_constants.h"
+#include "media/base/media_export.h"
+
+namespace media {
+
+// Allows embedders to modify the Android MediaDrm flow. Delegates are
+// registered 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 UUID GetUUID() const = 0;
+
+ // Invoked from CreateSession.
+ // If |init_data_out| is filled, it replaces |init_data| to send to the
+ // MediaDrm instance.
+ // If |optional_parameters_out| is filled, it is expected to be an
+ // even-length list of (key, value) pairs to send to the MediaDrm instance.
+ // Returns false if the request should be rejected.
+ virtual bool OnCreateSession(
+ const EmeInitDataType init_data_type,
+ const std::vector<uint8_t>& init_data,
+ std::vector<uint8_t>* init_data_out,
+ std::vector<std::string>* optional_parameters_out);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MediaDrmBridgeDelegate);
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_DELEGATE_H_
« no previous file with comments | « media/base/android/media_drm_bridge.cc ('k') | media/base/android/media_drm_bridge_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698