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 #define MAXNALUSIZE 64000
00020
00021
00022 typedef enum {
00023 NALU_TYPE_SLICE = 1,
00024 NALU_TYPE_DPA = 2,
00025 NALU_TYPE_DPB = 3,
00026 NALU_TYPE_DPC = 4,
00027 NALU_TYPE_IDR = 5,
00028 NALU_TYPE_SEI = 6,
00029 NALU_TYPE_SPS = 7,
00030 NALU_TYPE_PPS = 8,
00031 NALU_TYPE_AUD = 9,
00032 NALU_TYPE_EOSEQ = 10,
00033 NALU_TYPE_EOSTREAM = 11,
00034 NALU_TYPE_FILL = 12
00035 } NaluType;
00036
00037
00038 typedef enum {
00039 NALU_PRIORITY_HIGHEST = 3,
00040 NALU_PRIORITY_HIGH = 2,
00041 NALU_PRIORITY_LOW = 1,
00042 NALU_PRIORITY_DISPOSABLE = 0
00043 } NalRefIdc;
00044
00045
00046 typedef struct nalu_t
00047 {
00048 int startcodeprefix_len;
00049 unsigned len;
00050 unsigned max_size;
00051 int forbidden_bit;
00052 NaluType nal_unit_type;
00053 NalRefIdc nal_reference_idc;
00054 byte *buf;
00055 uint16 lost_packets;
00056 } NALU_t;
00057
00058
00059 extern NALU_t *AllocNALU(int);
00060
00061
00062 extern void FreeNALU(NALU_t *n);
00063
00064 #endif