[Android] libvlcjni: simplify/improve the attachment of a thread to the Java VM

Thomas Guillem git at videolan.org
Fri Apr 3 12:49:17 CEST 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Apr  2 10:46:02 2015 +0200| [e50fad5fe37a85920d76969851bc7cb1874d10b6] | committer: Thomas Guillem

libvlcjni: simplify/improve the attachment of a thread to the Java VM

There is now only one way to get a JNIEnv: jni_get_env. This function use the
thread-specific data (TSD) areas to save a JNIEnv into a TSD key. The thread
will be automatically detached to the Java VM when it's canceled or exited.

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=e50fad5fe37a85920d76969851bc7cb1874d10b6
---

 libvlc/jni/java_event_thread.c    |    9 +---
 libvlc/jni/libvlcjni-util.c       |    5 --
 libvlc/jni/libvlcjni.c            |  104 ++++++++++++++++++++++---------------
 libvlc/jni/native_crash_handler.c |   15 ++----
 libvlc/jni/vout.c                 |   54 +++++--------------
 5 files changed, 80 insertions(+), 107 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commitdiff;h=e50fad5fe37a85920d76969851bc7cb1874d10b6


More information about the Android mailing list