36 #define WTV_BIGSECTOR_SIZE (1 << WTV_BIGSECTOR_BITS)
37 #define INDEX_BASE 0x2
38 #define MAX_NB_INDEX 10
51 {
'l'_'e'_'g'_'a'_'c'_'y'_'_'_'a'_'t'_'t'_'r'_'i'_'b', 0};
55 {0x8C,0xC3,0xD2,0xC2,0x7E,0x9A,0xDA,0x11,0x8B,0xF7,0x00,0x07,0xE9,0x5E,0xAD,0x8D};
114 int new_count = *count + 1;
131 #define write_pad(pb, size) ffio_fill(pb, 0, size)
175 avio_seek(pb, -(chunk_len - 16), SEEK_CUR);
177 avio_seek(pb, chunk_len - (16 + 4), SEEK_CUR);
193 for (i = 0; i < wctx->
nb_index; i++) {
219 unsigned int num, den;
220 av_reduce(&num, &den, dar.num, dar.den, 0xFFFFFFFF);
235 avio_wl64(pb, st->avg_frame_rate.num && st->avg_frame_rate.den ? INT64_C(10000000) /
av_q2d(st->avg_frame_rate) : 0);
247 int padding = (st->codec->extradata_size & 3) ? 4 - (st->codec->extradata_size & 3) : 0;
250 avio_wl32(pb, st->codec->extradata_size + padding);
254 avio_write(pb, st->codec->extradata, st->codec->extradata_size);
264 int64_t hdr_pos_start;
295 hdr_size =
avio_tell(pb) - hdr_pos_start;
298 avio_seek(pb, -(hdr_size + 4), SEEK_CUR);
569 avio_wl64(pb, len |(1ULL<<62) | (1ULL<<60));
588 for (i = 0; i < nb_sectors; i++) {
589 avio_wl32(pb, start_sector + (i << shift));
649 return 16 + 4 + 4 + strlen(key)*2 + 2;
666 return strlen(
"image/jpeg")*2 + 2 + 1 + (e ? strlen(e->
value)*2 : 0) + 2 + 4 + pkt->
size;
730 int sector_bits, nb_sectors, pad;
734 w->
length = (end_pos - start_pos);
758 nb_sectors = (int)(w->
length >> sector_bits);
761 pad = (1 << sector_bits) - (w->
length % (1 << sector_bits));
787 int64_t start_pos, file_end_pos;