poc_code.h 692 B

1234567891011121314151617181920212223242526
  1. #ifndef __POC_CODE_H_
  2. #define __POC_CODE_H_
  3. #define PROTOCOL_ERROR 0xFFFFFFFF
  4. #include "datatype.h"
  5. T_UINT32 packet_encode(
  6. T_UINT8* buf,T_UINT32 buf_size,
  7. T_UINT8 name_cmd,
  8. const T_UINT8* protobuf,T_UINT32 protosize);
  9. T_UINT32 packet_decode(
  10. T_UINT8* buf,T_UINT32 buf_size,
  11. struct Protocol_Descriptor* descriptor);
  12. T_UINT32 pa_rtp_heartbeat(T_BYTE* buffer,int len,int uid) ;
  13. T_UINT32 hdr_rtp_encode(
  14. T_UINT8* buf,T_UINT32 buf_size,
  15. rtp_hdr_t* rtp_hdr);
  16. T_UINT32 hdr_rtp_decode(const T_UINT8* buf,T_UINT32 buf_size,rtp_hdr_t* rtp_hdr);
  17. T_UINT32 packet_rtp_encode(
  18. T_UINT8 * buf, T_UINT32 buf_size,
  19. rtp_hdr_t* rtp_hdr,
  20. const T_UINT8 * data, T_UINT32 size);
  21. #endif