callcomm.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * callcomm.h
  3. *
  4. * Created on: 2021年12月8日
  5. * Author: Admin
  6. */
  7. #ifndef JNI_CALL_CALLCOMM_H_
  8. #define JNI_CALL_CALLCOMM_H_
  9. #include "zkcalldefine.h"
  10. #include "netspeed.h"
  11. #include <stdint.h>
  12. #define TCP_PORT 0x4321
  13. #define UDP_PORT 0x6877
  14. const int MEDIA_UDP_PORT = 0x6877;
  15. #define MSG_INTERCOM_NORMAL 0x1000
  16. #define MSG_INTERCOM_CALL 0x1001
  17. #define MSG_INTERCOM_RINGING 0x1002
  18. #define MSG_INTERCOM_ACCEPT 0x1003
  19. #define MSG_INTERCOM_HANGUP 0x1004
  20. #define MSG_INTERCOM_BUSY 0x1005
  21. #define MSG_INTERCOM_TIMEOUT 0x1006
  22. #define MSG_INTERCOM_UNLOCK 0x1007
  23. #define MSG_INTERCOM_CALLELEVATOR 0x1009
  24. #define MSG_INTERCOM_MESSAGE 0x10000008
  25. typedef struct {
  26. int uCmd;
  27. char chip[24];
  28. char chParam[64];
  29. } INTERCOM_MSG, *LPINTERCOM_MSG;
  30. #define AUDIO_PACKAGE 0//音频
  31. #define VIDEO_PACKAGE 1//视频
  32. #define CHECK_PACKAGE 2//暂时不用,检测包
  33. #define MAX_PACKAGE_LEN (64*1024)//音视频数据最大长度
  34. typedef struct {
  35. int vtype; //0:audio 1 video
  36. int packageid;
  37. int losttype;
  38. int len;
  39. unsigned char data[MAX_PACKAGE_LEN];
  40. } TRANS_PACKAGE, *LPTRANS_PACKAGE;
  41. typedef void (*callStatuscallback)(E_CALL_STATUS status, const void* arg);
  42. typedef struct {
  43. char devtype[32];
  44. uint32_t msgtype;
  45. uint32_t msglen;
  46. } PCMSG_Head;
  47. typedef struct {
  48. PCMSG_Head Head;
  49. char msgbuf[250];
  50. } PCMSG;
  51. #endif /* JNI_CALL_CALLCOMM_H_ */