MobileFFmpeg Android API  2.0
log.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 MOBILEFFMPEG_LOG_H
21 #define MOBILEFFMPEG_LOG_H
22 
23 #include <stdio.h>
24 #include <pthread.h>
25 #include <unistd.h>
26 #include <jni.h>
27 #include <android/log.h>
28 
30 #define LIB_NAME "mobile-ffmpeg"
31 
33 #define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LIB_NAME, __VA_ARGS__)
34 
36 #define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LIB_NAME, __VA_ARGS__)
37 
39 #define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LIB_NAME, __VA_ARGS__)
40 
42 #define LOGW(...) __android_log_print(ANDROID_LOG_WARN, LIB_NAME, __VA_ARGS__)
43 
45 #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LIB_NAME, __VA_ARGS__)
46 
47 /*
48  * Class: com_arthenica_mobileffmpeg_Log
49  * Method: startNativeCollector
50  * Signature: ()I
51  */
52 JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Log_startNativeCollector(JNIEnv *, jobject);
53 
54 /*
55  * Class: com_arthenica_mobileffmpeg_Log
56  * Method: stopNativeCollector
57  * Signature: ()I
58  */
59 JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Log_stopNativeCollector(JNIEnv *, jobject);
60 
61 #endif /* MOBILEFFMPEG_LOG_H */
JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Log_startNativeCollector(JNIEnv *, jobject)
Definition: log.c:140
JNIEXPORT jint JNICALL Java_com_arthenica_mobileffmpeg_Log_stopNativeCollector(JNIEnv *, jobject)
Definition: log.c:169