Add NetworkMonitor
[rtmpclient.git] / app / src / main / jni / ai_suanzi_rtmpclient_FfmpegHelper.cpp
1 //
2 // Created by Peng Li on 18/5/2018.
3 //
4 #include "ai_suanzi_rtmpclient_FfmpegHelper.h"
5 #include "FfmpegHelper.h"
6
7
8 JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void* reserved)
9 {
10     return FfmpegHelper::nativeOnLoad(vm, reserved);
11 }
12
13
14 /*
15  * Class:     ai_suanzi_rtmpclient_FfmpegHelper
16  * Method:    initialDecoder
17  * Signature: ()I
18  */
19 JNIEXPORT jint JNICALL Java_ai_suanzi_rtmpclient_FfmpegHelper_initEncoder (JNIEnv *env, jclass cls, jint width, jint height, jstring url)
20 {
21     return FfmpegHelper::nativeInitEncoder(env, cls, width, height, url);
22 }
23
24 /*
25  * Class:     ai_suanzi_rtmpclient_FfmpegHelper
26  * Method:    processFrame
27  * Signature: ()I
28  */
29 JNIEXPORT jint JNICALL Java_ai_suanzi_rtmpclient_FfmpegHelper_processFrame(JNIEnv *env, jclass cls, jbyteArray data)
30 {
31     return FfmpegHelper::nativeProcessFrame(env, cls, data);
32 }
33
34 /*
35  * Class:     ai_suanzi_rtmpclient_FfmpegHelper
36  * Method:    close
37  * Signature: ()I
38  */
39 JNIEXPORT jint JNICALL Java_ai_suanzi_rtmpclient_FfmpegHelper_close (JNIEnv *env, jclass cls)
40 {
41     return FfmpegHelper::nativeClose();
42 }