在编码过程中,从编码器获取码流的时候,1、2、3、4、5是在一帧数据当中。相当于H264的I帧。
int type = (code & 0x7E)>>1;
//NAL unit type codes and NAL unit type classes
enum NalUnitType
{
NAL_UNIT_CODED_SLICE_TRAIL_N = 0, // 0
NAL_UNIT_CODED_SLICE_TRAIL_R, // 1
NAL_UNIT_CODED_SLICE_TSA_N, // 2
NAL_UNIT_CODED_SLICE_TSA_R, // 3
NAL_UNIT_CODED_SLICE_STSA_N, // 4
NAL_UNIT_CODED_SLICE_STSA_R, // 5
NAL_UNIT_CODED_SLICE_RADL_N, // 6
NAL_UNIT_CODED_SLICE_RADL_R, // 7
NAL_UNIT_CODED_SLICE_RASL_N, // 8
NAL_UNIT_CODED_SLICE_RASL_R, // 9
NAL_UNIT_RESERVED_VCL_N10,
NAL_UNIT_RESERVED_VCL_R11,
NAL_UNIT_RESERVED_VCL_N12,
NAL_UNIT_RESERVED_VCL_R13,
NAL_UNIT_RESERVED_VCL_N14,
NAL_UNIT_RESERVED_VCL_R15,
NAL_UNIT_CODED_SLICE_BLA_W_LP, // 16
NAL_UNIT_CODED_SLICE_BLA_W_RADL, // 17
NAL_UNIT_CODED_SLICE_BLA_N_LP, // 18
NAL_UNIT_CODED_SLICE_IDR_W_RADL, // 19
NAL_UNIT_CODED_SLICE_IDR_N_LP, // 20
NAL_UNIT_CODED_SLICE_CRA, // 21
NAL_UNIT_RESERVED_IRAP_VCL22,
NAL_UNIT_RESERVED_IRAP_VCL23,
NAL_UNIT_RESERVED_VCL24,
NAL_UNIT_RESERVED_VCL25,
NAL_UNIT_RESERVED_VCL26,
NAL_UNIT_RESERVED_VCL27,
NAL_UNIT_RESERVED_VCL28,
NAL_UNIT_RESERVED_VCL29,
NAL_UNIT_RESERVED_VCL30,
NAL_UNIT_RESERVED_VCL31,
// non-VCL
NAL_UNIT_VPS, // 32
NAL_UNIT_SPS, // 33
NAL_UNIT_PPS, // 34
NAL_UNIT_AUD, // 35
NAL_UNIT_EOS, // 36
NAL_UNIT_EOB, // 37
NAL_UNIT_FILLER_DATA, // 38
NAL_UNIT_PREFIX_SEI, // 39
NAL_UNIT_SUFFIX_SEI, // 40
NAL_UNIT_RESERVED_NVCL41,
NAL_UNIT_RESERVED_NVCL42,
NAL_UNIT_RESERVED_NVCL43,
NAL_UNIT_RESERVED_NVCL44,
NAL_UNIT_RESERVED_NVCL45,
NAL_UNIT_RESERVED_NVCL46,
NAL_UNIT_RESERVED_NVCL47,
NAL_UNIT_UNSPECIFIED_48,
NAL_UNIT_UNSPECIFIED_49,
NAL_UNIT_UNSPECIFIED_50,
NAL_UNIT_UNSPECIFIED_51,
NAL_UNIT_UNSPECIFIED_52,
NAL_UNIT_UNSPECIFIED_53,
NAL_UNIT_UNSPECIFIED_54,
NAL_UNIT_UNSPECIFIED_55,
NAL_UNIT_UNSPECIFIED_56,
NAL_UNIT_UNSPECIFIED_57,
NAL_UNIT_UNSPECIFIED_58,
NAL_UNIT_UNSPECIFIED_59,
NAL_UNIT_UNSPECIFIED_60,
NAL_UNIT_UNSPECIFIED_61,
NAL_UNIT_UNSPECIFIED_62,
NAL_UNIT_UNSPECIFIED_63,
NAL_UNIT_INVALID,
};