00001 00016 #ifndef _NALUCOMMON_H_ 00017 #define _NALUCOMMON_H_ 00018 00019 #define MAXRBSPSIZE 64000 00020 00021 #define NALU_TYPE_SLICE 1 00022 #define NALU_TYPE_DPA 2 00023 #define NALU_TYPE_DPB 3 00024 #define NALU_TYPE_DPC 4 00025 #define NALU_TYPE_IDR 5 00026 #define NALU_TYPE_SEI 6 00027 #define NALU_TYPE_SPS 7 00028 #define NALU_TYPE_PPS 8 00029 #define NALU_TYPE_AUD 9 00030 #define NALU_TYPE_EOSEQ 10 00031 #define NALU_TYPE_EOSTREAM 11 00032 #define NALU_TYPE_FILL 12 00033 00034 #define NALU_PRIORITY_HIGHEST 3 00035 #define NALU_PRIORITY_HIGH 2 00036 #define NALU_PRIORITY_LOW 1 00037 #define NALU_PRIORITY_DISPOSABLE 0 00038 00039 00040 typedef struct 00041 { 00042 int startcodeprefix_len; 00043 unsigned len; 00044 unsigned max_size; 00045 int forbidden_bit; 00046 int nal_reference_idc; 00047 int nal_unit_type; 00048 byte *buf; 00049 unsigned short lost_packets; 00050 } NALU_t; 00051 00052 00053 NALU_t *AllocNALU(int buffersize); 00054 void FreeNALU(NALU_t *n); 00055 00056 #endif