JNI C++头文件封装成java

extern "C" {
#endif

typedef void (*app_mrcp_callback)(enum MrcpMessageCallback_E type, void* message);

int mrcp_init(app_mrcp_callback cb);

struct MrcpJoinClassParam
{
char* siteID;
int siteIDLen;
int classID;
char* userName;
int userNameLen;
char* userID;
int userIDLen;
int nodeID;
int userType;
char* password;
int passwordLen;
char* portal;
int portalLen;
int max_channels;
char* customer;
};

int mrcp_join_class(struct MrcpJoinClassParam param);

int mrcp_leave_class();

int mrcp_stop_receive_video();

int mrcp_start_receive_video();

int mrcp_stop_receive_audio();

int mrcp_start_receive_audio();

int mrcp_send_chat_msg(int sendID, int receiveID, char * message, int messageLen);

int mrcp_send_gift_msg(int gift_index, int gift_num, int peer_id);

int mrcp_send_video_msg(int channel_id, int sequence_id , int slice_id , char * send_video_data);

int mrcp_send_audio_msg(int channel_id, char * audio_data_text);

void mrcp_send_doc_annotation_msg(int tab_id, char * message);

void mrcp_grab_channel();

void mrcp_open_video();

void mrcp_close_video();

void mrcp_open_audio();

void mrcp_close_audio();

void mrcp_close_video_audio();

void mrcp_send_remote_msg(char *message,int messageLen);

#ifdef __cplusplus
}
#endif
把以上代码如何转换成java可以调用的
类如:
JNIEXPORT jint JNICALL Java_com_threemang_xdysdk_jni_JniWraper_mrcp_1join_1class
(JNIEnv * env, jobject thiz){
return 0;
}

1个回答

JNI模式貌似已经过时,请学习下JNA的调用模式。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐