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

Side by Side Diff: media/base/android/media_drm_bridge.h

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/android/scoped_java_ref.h" 12 #include "base/android/scoped_java_ref.h"
13 #include "media/base/media_export.h" 13 #include "media/base/media_export.h"
14 #include "media/base/media_keys.h" 14 #include "media/base/media_keys.h"
15 15
16 namespace media { 16 namespace media {
17 17
18 // This class provides DRM services for android EME implementation. 18 // This class provides DRM services for android EME implementation.
19 // TODO(qinmin): implement all the functions in this class. 19 // TODO(qinmin): implement all the functions in this class.
20 class MEDIA_EXPORT MediaDrmBridge : public MediaKeys { 20 class MEDIA_EXPORT MediaDrmBridge : public MediaKeys {
21 public: 21 public:
22 // TODO(xhwang): Pass in |key_system|. 22 // TODO(xhwang): Pass in |key_system|.
23 MediaDrmBridge(int media_keys_id, const std::vector<uint8>& uuid); 23 MediaDrmBridge(int media_keys_id, const std::string& key_system);
24 virtual ~MediaDrmBridge(); 24 virtual ~MediaDrmBridge();
25 25
26 // Checks whether DRM is available. 26 // Checks whether DRM is available.
27 static bool IsAvailable(); 27 static bool IsAvailable();
28 28
29 // MediaKeys implementations. 29 // MediaKeys implementations.
30 virtual bool GenerateKeyRequest(const std::string& type, 30 virtual bool GenerateKeyRequest(const std::string& type,
31 const uint8* init_data, 31 const uint8* init_data,
32 int init_data_length) OVERRIDE; 32 int init_data_length) OVERRIDE;
33 virtual void AddKey(const uint8* key, int key_length, 33 virtual void AddKey(const uint8* key, int key_length,
(...skipping 13 matching lines...) Expand all
47 base::android::ScopedJavaLocalRef<jobject> CreateMediaCrypto( 47 base::android::ScopedJavaLocalRef<jobject> CreateMediaCrypto(
48 const std::string& session_id); 48 const std::string& session_id);
49 void ReleaseMediaCrypto(const std::string& session_id); 49 void ReleaseMediaCrypto(const std::string& session_id);
50 50
51 int media_keys_id() const { return media_keys_id_; } 51 int media_keys_id() const { return media_keys_id_; }
52 52
53 private: 53 private:
54 // Id of the MediaKeys object. 54 // Id of the MediaKeys object.
55 int media_keys_id_; 55 int media_keys_id_;
56 56
57 // UUID of the key system.
58 std::vector<uint8> uuid_;
59
57 DISALLOW_COPY_AND_ASSIGN(MediaDrmBridge); 60 DISALLOW_COPY_AND_ASSIGN(MediaDrmBridge);
58 }; 61 };
59 62
60 } // namespace media 63 } // namespace media
61 64
62 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_ 65 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698