MOVStreamContext 结构体

来源:互联网 发布:数组指定位置添加元素 编辑:程序博客网 时间:2024/06/14 08:15

typedef struct MOVStreamContext {

    //流的索引,0或者1

int ffindex;    

//临时变量,保存下一个chunk块的编号      

int next_chunk;

//chunk的个数(mp4的文件格式中,stco中取值肯定为chunk的总数)

unsigned int chunk_count;    

//chunk在文件中的偏移量数组(每个chunk中的sample在文件中的物理存储 //是连续),用于保存scto

int64_t *chunk_offsets;

//stts的元素的个数

unsigned int stts_count;   

//stts时间数据表

MOVStts *stts_data;

//ctts(用于在有B帧混合时进行纠正时间戳)的元素的个数

unsigned int ctts_count;

   //ctts数据表

MOVStts *ctts_data;

//stsc(空间分布表)的元素的个数

unsigned int stsc_count;

//stsc数据表

MOVStsc *stsc_data;

    

    //临时变量,记录当前使用的ctts表的索引

int ctts_index;

//记录当前的ctts元素作用的sample的索引

    int ctts_sample;

    

    //stsz表中可能smaplesize相同,如果相同使用该值

unsigned int sample_size;

//stsz中元素的个数

unsigned int sample_count;//sample的个数

//stsz数据表,记录每个samplesize,如果sample_size=0,该表才不会 //

int *sample_sizes;

//stss(关键帧索引表)中元素的个数

unsigned int keyframe_count;

//关键帧数据表

int *keyframes;

    

//dref的元素的个数,一般为1

unsigned drefs_count;

//dref数据表

MOVDref *drefs;

    //tkhd宽度

int width;      

           

//tkhd高度

int height;           

} MOVStreamContext;

说明:

MOVStreamContext结构用于保存从movmp4中进行拆包解复用从头部得到的信息。

0 0
原创粉丝点击