// // Created by Matthew on 2025/1/27. // #include #include #include #include extern "C" { #include "rtmp/rtmpsuck.h" } extern STREAMING_SERVER *rtmpServer; extern "C" JNIEXPORT jlong JNICALL Java_com_xypower_mpapp_RtmpService_startService(JNIEnv *env, jobject thiz) { // TODO: implement startService() RtmpSuckMain(0); return (jlong)rtmpServer; } extern "C" JNIEXPORT void JNICALL Java_com_xypower_mpapp_RtmpService_stopService(JNIEnv *env, jobject thiz, jlong native_handle) { stopStreaming(rtmpServer); // free(rtmpServer); }