- Timestamp:
- Sep 23, 2014 4:13:40 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-audiodev/android_jni_dev.c
r4896 r4927 142 142 }; 143 143 144 JavaVM *android_jvm; 145 146 JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *reserved) 147 { 148 android_jvm = vm; 149 150 return JNI_VERSION_1_4; 151 } 144 extern JavaVM *pj_jni_jvm; 152 145 153 146 static pj_bool_t attach_jvm(JNIEnv **jni_env) 154 147 { 155 if ((* android_jvm)->GetEnv(android_jvm, (void **)jni_env,148 if ((*pj_jni_jvm)->GetEnv(pj_jni_jvm, (void **)jni_env, 156 149 JNI_VERSION_1_4) < 0) 157 150 { 158 if ((* android_jvm)->AttachCurrentThread(android_jvm, jni_env, NULL) < 0)151 if ((*pj_jni_jvm)->AttachCurrentThread(pj_jni_jvm, jni_env, NULL) < 0) 159 152 { 160 153 jni_env = NULL; … … 169 162 #define detach_jvm(attached) \ 170 163 if (attached) \ 171 (* android_jvm)->DetachCurrentThread(android_jvm);164 (*pj_jni_jvm)->DetachCurrentThread(pj_jni_jvm); 172 165 173 166 /* Thread priority utils */
Note: See TracChangeset
for help on using the changeset viewer.