add log.h
[rtmpclient.git] / app / src / main / jni / ai_suanzi_rtmpclient_Ffmpeg.cpp
1 //
2 // Created by Peng Li on 30/4/2018.
3 //
4 #include "ai_suanzi_rtmpclient_Ffmpeg.h"
5 #include <android/native_window.h>
6 #include <android/native_window_jni.h>
7 #include "log.h"
8
9 extern "C" {
10     #include "libavformat/avformat.h"
11     #include "libavcodec/avcodec.h"
12     #include "libswscale/swscale.h"
13     #include "libavutil/imgutils.h"
14     #include "libavutil/time.h"
15 }
16
17
18 JNIEXPORT jstring JNICALL Java_ai_suanzi_rtmpclient_Ffmpeg_getVersion (JNIEnv *env, jobject obj) {
19     jint v = avformat_version();
20     LOGE("######### Ffmpeg JNI version i= %d", v);
21     return env->NewStringUTF("====== Ffmpeg call =======");
22 }
23
24 JNIEXPORT jint JNICALL Java_ai_suanzi_rtmpclient_Ffmpeg_init (JNIEnv *, jobject, jint, jint) {
25     return 0;
26 }
27
28 JNIEXPORT jint JNICALL Java_ai_suanzi_rtmpclient_Ffmpeg_flush (JNIEnv *, jobject){
29     return 0;
30 }
31
32 JNIEXPORT jint JNICALL Java_ai_suanzi_rtmpclient_Ffmpeg_close (JNIEnv *, jobject){
33     return 0;
34 }
35
36 JNIEXPORT jint JNICALL Java_ai_suanzi_rtmpclient_Ffmpeg_process (JNIEnv *, jobject, jbyteArray){
37     return 0;
38 }
39
40 JNIEXPORT jint JNICALL Java_ai_suanzi_rtmpclient_Ffmpeg_play (JNIEnv *, jobject, jobject, jstring){
41     return 0;
42 }