h264.h 974 B

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * 叶海辉
  3. * QQ群121376426
  4. * http://blog.yundiantech.com/
  5. */
  6. #ifndef H264_H
  7. #define H264_H
  8. #include <stdlib.h>
  9. typedef struct
  10. {
  11. int startcodeprefix_len; //! 4 for parameter sets and first slice in picture, 3 for everything else (suggested)
  12. unsigned len; //! Length of the NAL unit (Excluding the start code, which does not belong to the NALU)
  13. unsigned max_size; //! Nal Unit Buffer size
  14. int forbidden_bit; //! should be always FALSE
  15. int nal_reference_idc; //! NALU_PRIORITY_xxxx
  16. int nal_unit_type; //! NALU_TYPE_xxxx
  17. unsigned char *buf; //! contains the first byte followed by the EBSP
  18. unsigned short lost_packets; //! true, if packet loss is detected
  19. } T_H264_NALU;
  20. #pragma pack (1)
  21. typedef struct {
  22. //byte 0
  23. unsigned char TYPE:5;
  24. unsigned char NRI:2;
  25. unsigned char F:1;
  26. } T_H264_NALU_HEADER; /**//* 1 BYTES */
  27. #pragma pack ()
  28. #endif // H264_H