codec.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package codec
  2. type CodecID int
  3. const (
  4. CODECID_VIDEO_H264 CodecID = iota
  5. CODECID_VIDEO_H265
  6. CODECID_VIDEO_VP8
  7. CODECID_AUDIO_AAC CodecID = iota + 98
  8. CODECID_AUDIO_G711A
  9. CODECID_AUDIO_G711U
  10. CODECID_AUDIO_OPUS
  11. CODECID_UNRECOGNIZED = 999
  12. )
  13. type H264_NAL_TYPE int
  14. const (
  15. H264_NAL_RESERVED H264_NAL_TYPE = iota
  16. H264_NAL_P_SLICE
  17. H264_NAL_SLICE_A
  18. H264_NAL_SLICE_B
  19. H264_NAL_SLICE_C
  20. H264_NAL_I_SLICE
  21. H264_NAL_SEI
  22. H264_NAL_SPS
  23. H264_NAL_PPS
  24. H264_NAL_AUD
  25. )
  26. type H265_NAL_TYPE int
  27. const (
  28. H265_NAL_Slice_TRAIL_N H265_NAL_TYPE = iota
  29. H265_NAL_LICE_TRAIL_R
  30. H265_NAL_SLICE_TSA_N
  31. H265_NAL_SLICE_TSA_R
  32. H265_NAL_SLICE_STSA_N
  33. H265_NAL_SLICE_STSA_R
  34. H265_NAL_SLICE_RADL_N
  35. H265_NAL_SLICE_RADL_R
  36. H265_NAL_SLICE_RASL_N
  37. H265_NAL_SLICE_RASL_R
  38. //IDR
  39. H265_NAL_SLICE_BLA_W_LP H265_NAL_TYPE = iota + 6
  40. H265_NAL_SLICE_BLA_W_RADL
  41. H265_NAL_SLICE_BLA_N_LP
  42. H265_NAL_SLICE_IDR_W_RADL
  43. H265_NAL_SLICE_IDR_N_LP
  44. H265_NAL_SLICE_CRA
  45. //vps pps sps
  46. H265_NAL_VPS H265_NAL_TYPE = iota + 16
  47. H265_NAL_SPS
  48. H265_NAL_PPS
  49. H265_NAL_AUD
  50. //SEI
  51. H265_NAL_SEI H265_NAL_TYPE = iota + 19
  52. H265_NAL_SEI_SUFFIX
  53. )