diff options
Diffstat (limited to 'media/jni')
-rw-r--r-- | media/jni/android_media_MediaDrm.cpp | 6 | ||||
-rw-r--r-- | media/jni/android_media_MediaMuxer.cpp | 30 |
2 files changed, 18 insertions, 18 deletions
diff --git a/media/jni/android_media_MediaDrm.cpp b/media/jni/android_media_MediaDrm.cpp index bbb74d2..6d90ccb 100644 --- a/media/jni/android_media_MediaDrm.cpp +++ b/media/jni/android_media_MediaDrm.cpp @@ -267,7 +267,7 @@ static bool throwExceptionAsNecessary( } static sp<IDrm> GetDrm(JNIEnv *env, jobject thiz) { - JDrm *jdrm = (JDrm *)env->GetIntField(thiz, gFields.context); + JDrm *jdrm = (JDrm *)env->GetLongField(thiz, gFields.context); return jdrm ? jdrm->getDrm() : NULL; } @@ -484,7 +484,7 @@ using namespace android; static sp<JDrm> setDrm( JNIEnv *env, jobject thiz, const sp<JDrm> &drm) { - sp<JDrm> old = (JDrm *)env->GetIntField(thiz, gFields.context); + sp<JDrm> old = (JDrm *)env->GetLongField(thiz, gFields.context); if (drm != NULL) { drm->incStrong(thiz); } @@ -520,7 +520,7 @@ static void android_media_MediaDrm_release(JNIEnv *env, jobject thiz) { static void android_media_MediaDrm_native_init(JNIEnv *env) { jclass clazz; FIND_CLASS(clazz, "android/media/MediaDrm"); - GET_FIELD_ID(gFields.context, clazz, "mNativeContext", "I"); + GET_FIELD_ID(gFields.context, clazz, "mNativeContext", "J"); GET_STATIC_METHOD_ID(gFields.post_event, clazz, "postEventFromNative", "(Ljava/lang/Object;IILjava/lang/Object;)V"); diff --git a/media/jni/android_media_MediaMuxer.cpp b/media/jni/android_media_MediaMuxer.cpp index 457b956..c58503b 100644 --- a/media/jni/android_media_MediaMuxer.cpp +++ b/media/jni/android_media_MediaMuxer.cpp @@ -42,7 +42,7 @@ static fields_t gFields; using namespace android; static jint android_media_MediaMuxer_addTrack( - JNIEnv *env, jclass clazz, jint nativeObject, jobjectArray keys, + JNIEnv *env, jclass clazz, jlong nativeObject, jobjectArray keys, jobjectArray values) { sp<MediaMuxer> muxer(reinterpret_cast<MediaMuxer *>(nativeObject)); if (muxer == NULL) { @@ -72,7 +72,7 @@ static jint android_media_MediaMuxer_addTrack( } static void android_media_MediaMuxer_writeSampleData( - JNIEnv *env, jclass clazz, jint nativeObject, jint trackIndex, + JNIEnv *env, jclass clazz, jlong nativeObject, jint trackIndex, jobject byteBuf, jint offset, jint size, jlong timeUs, jint flags) { sp<MediaMuxer> muxer(reinterpret_cast<MediaMuxer *>(nativeObject)); if (muxer == NULL) { @@ -147,7 +147,7 @@ static jint android_media_MediaMuxer_native_setup( } static void android_media_MediaMuxer_setOrientationHint( - JNIEnv *env, jclass clazz, jint nativeObject, jint degrees) { + JNIEnv *env, jclass clazz, jlong nativeObject, jint degrees) { sp<MediaMuxer> muxer(reinterpret_cast<MediaMuxer *>(nativeObject)); if (muxer == NULL) { jniThrowException(env, "java/lang/IllegalStateException", @@ -177,7 +177,7 @@ static void android_media_MediaMuxer_setLocation( } static void android_media_MediaMuxer_start(JNIEnv *env, jclass clazz, - jint nativeObject) { + jlong nativeObject) { sp<MediaMuxer> muxer(reinterpret_cast<MediaMuxer *>(nativeObject)); if (muxer == NULL) { jniThrowException(env, "java/lang/IllegalStateException", @@ -195,7 +195,7 @@ static void android_media_MediaMuxer_start(JNIEnv *env, jclass clazz, } static void android_media_MediaMuxer_stop(JNIEnv *env, jclass clazz, - jint nativeObject) { + jlong nativeObject) { sp<MediaMuxer> muxer(reinterpret_cast<MediaMuxer *>(nativeObject)); if (muxer == NULL) { jniThrowException(env, "java/lang/IllegalStateException", @@ -213,7 +213,7 @@ static void android_media_MediaMuxer_stop(JNIEnv *env, jclass clazz, } static void android_media_MediaMuxer_native_release( - JNIEnv *env, jclass clazz, jint nativeObject) { + JNIEnv *env, jclass clazz, jlong nativeObject) { sp<MediaMuxer> muxer(reinterpret_cast<MediaMuxer *>(nativeObject)); if (muxer != NULL) { muxer->decStrong(clazz); @@ -222,26 +222,26 @@ static void android_media_MediaMuxer_native_release( static JNINativeMethod gMethods[] = { - { "nativeAddTrack", "(I[Ljava/lang/String;[Ljava/lang/Object;)I", + { "nativeAddTrack", "(J[Ljava/lang/String;[Ljava/lang/Object;)I", (void *)android_media_MediaMuxer_addTrack }, - { "nativeSetOrientationHint", "(II)V", + { "nativeSetOrientationHint", "(JI)V", (void *)android_media_MediaMuxer_setOrientationHint}, - { "nativeSetLocation", "(III)V", + { "nativeSetLocation", "(JII)V", (void *)android_media_MediaMuxer_setLocation}, - { "nativeStart", "(I)V", (void *)android_media_MediaMuxer_start}, + { "nativeStart", "(J)V", (void *)android_media_MediaMuxer_start}, - { "nativeWriteSampleData", "(IILjava/nio/ByteBuffer;IIJI)V", + { "nativeWriteSampleData", "(JILjava/nio/ByteBuffer;IIJI)V", (void *)android_media_MediaMuxer_writeSampleData }, - { "nativeStop", "(I)V", (void *)android_media_MediaMuxer_stop}, + { "nativeStop", "(J)V", (void *)android_media_MediaMuxer_stop}, - { "nativeSetup", "(Ljava/io/FileDescriptor;I)I", + { "nativeSetup", "(Ljava/io/FileDescriptor;I)J", (void *)android_media_MediaMuxer_native_setup }, - { "nativeRelease", "(I)V", + { "nativeRelease", "(J)V", (void *)android_media_MediaMuxer_native_release }, }; @@ -255,7 +255,7 @@ int register_android_media_MediaMuxer(JNIEnv *env) { jclass clazz = env->FindClass("android/media/MediaMuxer"); CHECK(clazz != NULL); - gFields.context = env->GetFieldID(clazz, "mNativeContext", "I"); + gFields.context = env->GetFieldID(clazz, "mNativeContext", "J"); CHECK(gFields.context != NULL); jclass byteBufClass = env->FindClass("java/nio/ByteBuffer"); |