00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef _NALUCOMMON_H_
00016 #define _NALUCOMMON_H_
00017
00018 #define MAXRBSPSIZE 64000
00019
00020
00021 typedef enum {
00022 NALU_TYPE_SLICE = 1,
00023 NALU_TYPE_DPA = 2,
00024 NALU_TYPE_DPB = 3,
00025 NALU_TYPE_DPC = 4,
00026 NALU_TYPE_IDR = 5,
00027 NALU_TYPE_SEI = 6,
00028 NALU_TYPE_SPS = 7,
00029 NALU_TYPE_PPS = 8,
00030 NALU_TYPE_AUD = 9,
00031 NALU_TYPE_EOSEQ = 10,
00032 NALU_TYPE_EOSTREAM = 11,
00033 NALU_TYPE_FILL = 12
00034 } NaluType;
00035
00036
00037 typedef enum {
00038 NALU_PRIORITY_HIGHEST = 3,
00039 NALU_PRIORITY_HIGH = 2,
00040 NALU_PRIORITY_LOW = 1,
00041 NALU_PRIORITY_DISPOSABLE = 0
00042 } NalRefIdc;
00043
00044
00045 typedef struct
00046 {
00047 int startcodeprefix_len;
00048 unsigned len;
00049 unsigned max_size;
00050 NaluType nal_unit_type;
00051 NalRefIdc nal_reference_idc;
00052 int forbidden_bit;
00053 byte *buf;
00054 } NALU_t;
00055
00056
00057 NALU_t *AllocNALU(int);
00058
00059
00060 void FreeNALU(NALU_t *n);
00061
00062 #endif