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 <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 JNIEnv* env, | 207 JNIEnv* env, |
208 const base::android::JavaParamRef<jobject>& j_media_drm, | 208 const base::android::JavaParamRef<jobject>& j_media_drm, |
209 const base::android::JavaParamRef<jbyteArray>& j_session_id, | 209 const base::android::JavaParamRef<jbyteArray>& j_session_id, |
210 jint j_message_type, | 210 jint j_message_type, |
211 const base::android::JavaParamRef<jbyteArray>& j_message); | 211 const base::android::JavaParamRef<jbyteArray>& j_message); |
212 void OnSessionClosed( | 212 void OnSessionClosed( |
213 JNIEnv* env, | 213 JNIEnv* env, |
214 const base::android::JavaParamRef<jobject>& j_media_drm, | 214 const base::android::JavaParamRef<jobject>& j_media_drm, |
215 const base::android::JavaParamRef<jbyteArray>& j_session_id); | 215 const base::android::JavaParamRef<jbyteArray>& j_session_id); |
216 | 216 |
| 217 // Called when key statuses of session are changed. |is_key_release| is set to |
| 218 // true when releasing keys. Some of the MediaDrm key status codes should be |
| 219 // mapped to CDM key status differently (e.g. EXPIRE -> RELEASED). |
217 void OnSessionKeysChange( | 220 void OnSessionKeysChange( |
218 JNIEnv* env, | 221 JNIEnv* env, |
219 const base::android::JavaParamRef<jobject>& j_media_drm, | 222 const base::android::JavaParamRef<jobject>& j_media_drm, |
220 const base::android::JavaParamRef<jbyteArray>& j_session_id, | 223 const base::android::JavaParamRef<jbyteArray>& j_session_id, |
| 224 // List<KeyStatus> |
221 const base::android::JavaParamRef<jobjectArray>& j_keys_info, | 225 const base::android::JavaParamRef<jobjectArray>& j_keys_info, |
222 bool has_additional_usable_key); | 226 bool has_additional_usable_key, |
| 227 bool is_key_release); |
223 | 228 |
224 // |expiry_time_ms| is the new expiration time for the keys in the session. | 229 // |expiry_time_ms| is the new expiration time for the keys in the session. |
225 // The time is in milliseconds, relative to the Unix epoch. A time of 0 | 230 // The time is in milliseconds, relative to the Unix epoch. A time of 0 |
226 // indicates that the keys never expire. | 231 // indicates that the keys never expire. |
227 void OnSessionExpirationUpdate( | 232 void OnSessionExpirationUpdate( |
228 JNIEnv* env, | 233 JNIEnv* env, |
229 const base::android::JavaParamRef<jobject>& j_media_drm, | 234 const base::android::JavaParamRef<jobject>& j_media_drm, |
230 const base::android::JavaParamRef<jbyteArray>& j_session_id, | 235 const base::android::JavaParamRef<jbyteArray>& j_session_id, |
231 jlong expiry_time_ms); | 236 jlong expiry_time_ms); |
232 | 237 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 | 339 |
335 // NOTE: Weak pointers must be invalidated before all other member variables. | 340 // NOTE: Weak pointers must be invalidated before all other member variables. |
336 base::WeakPtrFactory<MediaDrmBridge> weak_factory_; | 341 base::WeakPtrFactory<MediaDrmBridge> weak_factory_; |
337 | 342 |
338 DISALLOW_COPY_AND_ASSIGN(MediaDrmBridge); | 343 DISALLOW_COPY_AND_ASSIGN(MediaDrmBridge); |
339 }; | 344 }; |
340 | 345 |
341 } // namespace media | 346 } // namespace media |
342 | 347 |
343 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_ | 348 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_ |
OLD | NEW |