| OLD | NEW |
| 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> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 const std::vector<uint8>& scheme_uuid, | 38 const std::vector<uint8>& scheme_uuid, |
| 39 const std::string& security_level, | 39 const std::string& security_level, |
| 40 MediaPlayerManager* manager); | 40 MediaPlayerManager* manager); |
| 41 | 41 |
| 42 // Checks whether MediaDRM is available. | 42 // Checks whether MediaDRM is available. |
| 43 static bool IsAvailable(); | 43 static bool IsAvailable(); |
| 44 | 44 |
| 45 static bool IsSecurityLevelSupported(const std::vector<uint8>& scheme_uuid, | 45 static bool IsSecurityLevelSupported(const std::vector<uint8>& scheme_uuid, |
| 46 const std::string& security_level); | 46 const std::string& security_level); |
| 47 | 47 |
| 48 static bool IsCryptoSchemeSupported(const std::vector<uint8>& scheme_uuid, | 48 static bool IsCryptoSchemeSupported(const std::vector<uint8>& scheme_uuid); |
| 49 const std::string& container_mime_type); | |
| 50 | 49 |
| 51 static bool IsSecureDecoderRequired(const std::string& security_level_str); | 50 static bool IsSecureDecoderRequired(const std::string& security_level_str); |
| 52 | 51 |
| 53 static bool RegisterMediaDrmBridge(JNIEnv* env); | 52 static bool RegisterMediaDrmBridge(JNIEnv* env); |
| 54 | 53 |
| 55 // MediaKeys implementations. | 54 // MediaKeys implementations. |
| 56 virtual bool GenerateKeyRequest(const std::string& type, | 55 virtual bool GenerateKeyRequest(const std::string& type, |
| 57 const uint8* init_data, | 56 const uint8* init_data, |
| 58 int init_data_length) OVERRIDE; | 57 int init_data_length) OVERRIDE; |
| 59 virtual void AddKey(const uint8* key, int key_length, | 58 virtual void AddKey(const uint8* key, int key_length, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 MediaPlayerManager* manager_; | 111 MediaPlayerManager* manager_; |
| 113 | 112 |
| 114 base::Closure media_crypto_ready_cb_; | 113 base::Closure media_crypto_ready_cb_; |
| 115 | 114 |
| 116 DISALLOW_COPY_AND_ASSIGN(MediaDrmBridge); | 115 DISALLOW_COPY_AND_ASSIGN(MediaDrmBridge); |
| 117 }; | 116 }; |
| 118 | 117 |
| 119 } // namespace media | 118 } // namespace media |
| 120 | 119 |
| 121 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_ | 120 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_ |
| OLD | NEW |