Lines Matching refs:stsz

28 void quicktime_stsz_init(quicktime_stsz_t *stsz)  in quicktime_stsz_init()  argument
30 stsz->version = 0; in quicktime_stsz_init()
31 stsz->flags = 0; in quicktime_stsz_init()
32 stsz->sample_size = 0; in quicktime_stsz_init()
33 stsz->total_entries = 0; in quicktime_stsz_init()
34 stsz->entries_allocated = 0; in quicktime_stsz_init()
37 void quicktime_stsz_init_video(quicktime_t *file, quicktime_stsz_t *stsz) in quicktime_stsz_init_video() argument
39 stsz->sample_size = 0; in quicktime_stsz_init_video()
40 if(!stsz->entries_allocated) in quicktime_stsz_init_video()
42 stsz->entries_allocated = 2048; in quicktime_stsz_init_video()
43 stsz->total_entries = 0; in quicktime_stsz_init_video()
44stsz->table = (quicktime_stsz_table_t*)calloc(sizeof(quicktime_stsz_table_t), stsz->entries_alloca… in quicktime_stsz_init_video()
48 void quicktime_stsz_init_timecode(quicktime_stsz_t *stsz) in quicktime_stsz_init_timecode() argument
50 stsz->sample_size = 4; in quicktime_stsz_init_timecode()
53 if(!stsz->entries_allocated) in quicktime_stsz_init_timecode()
55 stsz->entries_allocated = 2048; in quicktime_stsz_init_timecode()
56 stsz->total_entries = 0; in quicktime_stsz_init_timecode()
57stsz->table = (quicktime_stsz_table_t*)calloc(sizeof(quicktime_stsz_table_t), stsz->entries_alloca… in quicktime_stsz_init_timecode()
64 quicktime_stsz_t *stsz, in quicktime_stsz_init_audio() argument
71 stsz->sample_size = 1; in quicktime_stsz_init_audio()
73 stsz->total_entries = 0; /* set this when closing */ in quicktime_stsz_init_audio()
74 stsz->entries_allocated = 0; in quicktime_stsz_init_audio()
77 void quicktime_stsz_delete(quicktime_stsz_t *stsz) in quicktime_stsz_delete() argument
79 if(stsz->table) free(stsz->table); in quicktime_stsz_delete()
82 void quicktime_stsz_dump(quicktime_stsz_t *stsz) in quicktime_stsz_dump() argument
86 lqt_dump(" version %d\n", stsz->version); in quicktime_stsz_dump()
87 lqt_dump(" flags %ld\n", stsz->flags); in quicktime_stsz_dump()
88 lqt_dump(" sample_size %lld\n", (long long)(stsz->sample_size)); in quicktime_stsz_dump()
89 lqt_dump(" total_entries %ld\n", stsz->total_entries); in quicktime_stsz_dump()
91 if(!stsz->sample_size) in quicktime_stsz_dump()
93 for(i = 0; i < stsz->total_entries; i++) in quicktime_stsz_dump()
96 (long long)(stsz->table[i].size), (long long)(stsz->table[i].size)); in quicktime_stsz_dump()
101 void quicktime_read_stsz(quicktime_t *file, quicktime_stsz_t *stsz) in quicktime_read_stsz() argument
104 stsz->version = quicktime_read_char(file); in quicktime_read_stsz()
105 stsz->flags = quicktime_read_int24(file); in quicktime_read_stsz()
106 stsz->sample_size = quicktime_read_int32(file); in quicktime_read_stsz()
107 stsz->total_entries = quicktime_read_int32(file); in quicktime_read_stsz()
108 stsz->entries_allocated = stsz->total_entries; in quicktime_read_stsz()
109 if(!stsz->sample_size) in quicktime_read_stsz()
113stsz->table = (quicktime_stsz_table_t*)calloc(sizeof(quicktime_stsz_table_t), stsz->entries_alloca… in quicktime_read_stsz()
114 for(i = 0; i < stsz->total_entries; i++) in quicktime_read_stsz()
116 stsz->table[i].size = quicktime_read_int32(file); in quicktime_read_stsz()
121 void quicktime_write_stsz(quicktime_t *file, quicktime_stsz_t *stsz) in quicktime_write_stsz() argument
144 quicktime_write_char(file, stsz->version); in quicktime_write_stsz()
145 quicktime_write_int24(file, stsz->flags); in quicktime_write_stsz()
151 quicktime_write_int32(file, stsz->sample_size); in quicktime_write_stsz()
152 quicktime_write_int32(file, stsz->total_entries); in quicktime_write_stsz()
154 if(!stsz->sample_size) in quicktime_write_stsz()
156 for(i = 0; i < stsz->total_entries; i++) in quicktime_write_stsz()
158 quicktime_write_int32(file, stsz->table[i].size); in quicktime_write_stsz()
165 void quicktime_update_stsz(quicktime_stsz_t *stsz, in quicktime_update_stsz() argument
169 if(!stsz->sample_size) in quicktime_update_stsz()
171 if(sample >= stsz->entries_allocated) in quicktime_update_stsz()
173 stsz->entries_allocated += 1024; in quicktime_update_stsz()
174 stsz->table = in quicktime_update_stsz()
175 (quicktime_stsz_table_t*)realloc(stsz->table, in quicktime_update_stsz()
177 stsz->entries_allocated); in quicktime_update_stsz()
179 stsz->table[sample].size = sample_size; in quicktime_update_stsz()
180 if(sample >= stsz->total_entries) in quicktime_update_stsz()
181 stsz->total_entries = sample + 1; in quicktime_update_stsz()