1
0
Fork 0
Commit Graph

3 Commits

Author SHA1 Message Date
Matthieu Bouron 70ba15d2cf avcodec/jni: use size_t to store structure offsets 2024-03-23 11:37:44 +01:00
Matthieu Bouron 376d8fb2c5 lavc/ffjni: replace ff_jni_{attach,detach} with ff_jni_get_env
If a JNI environment is not already attached to the thread where the
MediaCodec calls are made the current implementation will attach /
detach an environment for each MediaCodec call wasting some CPU time.

ff_jni_get_env replaces ff_jni_{attach,detach} by permanently attaching
an environment (if it is not already the case) to the current thread.
The environment will be automatically detached at the thread destruction
using a pthread_key callback.

Saves around 5% of CPU time (out of 20%) while decoding a stream with
MediaCodec.
2016-07-27 15:43:39 +02:00
Matthieu Bouron 3ab178516e lavc: add JNI support 2016-03-07 11:17:31 +01:00