MobileFFmpeg Android API  4.4
mobileffmpeg.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 Taner Sener
3  *
4  * This file is part of MobileFFmpeg.
5  *
6  * MobileFFmpeg is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * MobileFFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with MobileFFmpeg. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef MOBILE_FFMPEG_H
21 #define MOBILE_FFMPEG_H
22 
23 #include <jni.h>
24 #include <android/log.h>
25 
26 #include "libavutil/log.h"
27 #include "libavutil/ffversion.h"
28 
30 #define MOBILE_FFMPEG_VERSION "4.4"
31 
33 #define LIB_NAME "mobile-ffmpeg"
34 
36 #define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LIB_NAME, __VA_ARGS__)
37 
39 #define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LIB_NAME, __VA_ARGS__)
40 
42 #define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LIB_NAME, __VA_ARGS__)
43 
45 #define LOGW(...) __android_log_print(ANDROID_LOG_WARN, LIB_NAME, __VA_ARGS__)
46 
48 #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LIB_NAME, __VA_ARGS__)
49 
50 /*
51  * Class: com_arthenica_mobileffmpeg_Config
52  * Method: enableNativeRedirection
53  * Signature: ()V
54  */
55 JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_enableNativeRedirection(JNIEnv *, jclass);
56 
57 /*
58  * Class: com_arthenica_mobileffmpeg_Config
59  * Method: disableNativeRedirection
60  * Signature: ()V
61  */
62 JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_disableNativeRedirection(JNIEnv *, jclass);
63 
64 /*
65  * Class: com_arthenica_mobileffmpeg_Config
66  * Method: setNativeLogLevel
67  * Signature: (I)V
68  */
69 JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_setNativeLogLevel(JNIEnv *, jclass, jint);
70 
71 /*
72  * Class: com_arthenica_mobileffmpeg_Config
73  * Method: getNativeLogLevel
74  * Signature: ()I
75  */
76 JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeLogLevel(JNIEnv *, jclass);
77 
78 /*
79  * Class: com_arthenica_mobileffmpeg_Config
80  * Method: getNativeFFmpegVersion
81  * Signature: ()Ljava/lang/String;
82  */
83 JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeFFmpegVersion(JNIEnv *, jclass);
84 
85 /*
86  * Class: com_arthenica_mobileffmpeg_Config
87  * Method: getNativeVersion
88  * Signature: ()Ljava/lang/String;
89  */
90 JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeVersion(JNIEnv *, jclass);
91 
92 /*
93  * Class: com_arthenica_mobileffmpeg_Config
94  * Method: nativeFFmpegExecute
95  * Signature: (J[Ljava/lang/String;)I
96  */
97 JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Config_nativeFFmpegExecute(JNIEnv *, jclass, jlong id, jobjectArray);
98 
99 /*
100  * Class: com_arthenica_mobileffmpeg_Config
101  * Method: nativeFFmpegCancel
102  * Signature: (J)V
103  */
104 JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_nativeFFmpegCancel(JNIEnv *, jclass, jlong);
105 
106 /*
107  * Class: com_arthenica_mobileffmpeg_Config
108  * Method: registerNewNativeFFmpegPipe
109  * Signature: (Ljava/lang/String;)I
110  */
111 JNIEXPORT int JNICALL Java_com_arthenica_mobileffmpeg_Config_registerNewNativeFFmpegPipe(JNIEnv *env, jclass object, jstring ffmpegPipePath);
112 
113 /*
114  * Class: com_arthenica_mobileffmpeg_Config
115  * Method: getNativeBuildDate
116  * Signature: ()Ljava/lang/String;
117  */
118 JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeBuildDate(JNIEnv *env, jclass object);
119 
125 JNIEXPORT int JNICALL Java_com_arthenica_mobileffmpeg_Config_setNativeEnvironmentVariable(JNIEnv *env, jclass object, jstring variableName, jstring variableValue);
126 
127 /*
128  * Class: com_arthenica_mobileffmpeg_Config
129  * Method: getNativeLastCommandOutput
130  * Signature: ()Ljava/lang/String;
131  */
132 JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeLastCommandOutput(JNIEnv *env, jclass object);
133 
134 /*
135  * Class: com_arthenica_mobileffmpeg_Config
136  * Method: ignoreNativeSignal
137  * Signature: (I)V
138  */
139 JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_ignoreNativeSignal(JNIEnv *env, jclass object, jint signum);
140 
141 #endif /* MOBILE_FFMPEG_H */
Java_com_arthenica_mobileffmpeg_Config_getNativeLastCommandOutput
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeLastCommandOutput(JNIEnv *env, jclass object)
Definition: mobileffmpeg.c:906
Java_com_arthenica_mobileffmpeg_Config_setNativeEnvironmentVariable
JNIEXPORT int JNICALL Java_com_arthenica_mobileffmpeg_Config_setNativeEnvironmentVariable(JNIEnv *env, jclass object, jstring variableName, jstring variableValue)
Definition: mobileffmpeg.c:888
Java_com_arthenica_mobileffmpeg_Config_getNativeVersion
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeVersion(JNIEnv *, jclass)
Definition: mobileffmpeg.c:771
Java_com_arthenica_mobileffmpeg_Config_ignoreNativeSignal
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_ignoreNativeSignal(JNIEnv *env, jclass object, jint signum)
Definition: mobileffmpeg.c:925
Java_com_arthenica_mobileffmpeg_Config_enableNativeRedirection
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_enableNativeRedirection(JNIEnv *, jclass)
Definition: mobileffmpeg.c:708
Java_com_arthenica_mobileffmpeg_Config_nativeFFmpegCancel
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_nativeFFmpegCancel(JNIEnv *, jclass, jlong)
Definition: mobileffmpeg.c:848
Java_com_arthenica_mobileffmpeg_Config_setNativeLogLevel
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_setNativeLogLevel(JNIEnv *, jclass, jint)
Definition: mobileffmpeg.c:688
Java_com_arthenica_mobileffmpeg_Config_disableNativeRedirection
JNIEXPORT void JNICALL Java_com_arthenica_mobileffmpeg_Config_disableNativeRedirection(JNIEnv *, jclass)
Definition: mobileffmpeg.c:735
Java_com_arthenica_mobileffmpeg_Config_getNativeLogLevel
JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeLogLevel(JNIEnv *, jclass)
Definition: mobileffmpeg.c:698
Java_com_arthenica_mobileffmpeg_Config_registerNewNativeFFmpegPipe
JNIEXPORT int JNICALL Java_com_arthenica_mobileffmpeg_Config_registerNewNativeFFmpegPipe(JNIEnv *env, jclass object, jstring ffmpegPipePath)
Definition: mobileffmpeg.c:860
Java_com_arthenica_mobileffmpeg_Config_getNativeBuildDate
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeBuildDate(JNIEnv *env, jclass object)
Definition: mobileffmpeg.c:873
Java_com_arthenica_mobileffmpeg_Config_getNativeFFmpegVersion
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_Config_getNativeFFmpegVersion(JNIEnv *, jclass)
Definition: mobileffmpeg.c:760
Java_com_arthenica_mobileffmpeg_Config_nativeFFmpegExecute
JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Config_nativeFFmpegExecute(JNIEnv *, jclass, jlong id, jobjectArray)
Definition: mobileffmpeg.c:784