Path: blob/master/dep/ffmpeg/include/libavcodec/jni.h
4216 views
/*1* JNI public API functions2*3* Copyright (c) 2015-2016 Matthieu Bouron <matthieu.bouron stupeflix.com>4*5* This file is part of FFmpeg.6*7* FFmpeg is free software; you can redistribute it and/or8* modify it under the terms of the GNU Lesser General Public9* License as published by the Free Software Foundation; either10* version 2.1 of the License, or (at your option) any later version.11*12* FFmpeg is distributed in the hope that it will be useful,13* but WITHOUT ANY WARRANTY; without even the implied warranty of14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU15* Lesser General Public License for more details.16*17* You should have received a copy of the GNU Lesser General Public18* License along with FFmpeg; if not, write to the Free Software19* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA20*/2122#ifndef AVCODEC_JNI_H23#define AVCODEC_JNI_H2425/*26* Manually set a Java virtual machine which will be used to retrieve the JNI27* environment. Once a Java VM is set it cannot be changed afterwards, meaning28* you can call multiple times av_jni_set_java_vm with the same Java VM pointer29* however it will error out if you try to set a different Java VM.30*31* @param vm Java virtual machine32* @param log_ctx context used for logging, can be NULL33* @return 0 on success, < 0 otherwise34*/35int av_jni_set_java_vm(void *vm, void *log_ctx);3637/*38* Get the Java virtual machine which has been set with av_jni_set_java_vm.39*40* @param vm Java virtual machine41* @return a pointer to the Java virtual machine42*/43void *av_jni_get_java_vm(void *log_ctx);4445/*46* Set the Android application context which will be used to retrieve the Android47* content resolver to handle content uris.48*49* This function is only available on Android.50*51* @param app_ctx global JNI reference to the Android application context52* @return 0 on success, < 0 otherwise53*/54int av_jni_set_android_app_ctx(void *app_ctx, void *log_ctx);5556/*57* Get the Android application context that has been set with58* av_jni_set_android_app_ctx.59*60* This function is only available on Android.61*62* @return a pointer the the Android application context63*/64void *av_jni_get_android_app_ctx(void);6566#endif /* AVCODEC_JNI_H */676869