48 {
"movflags",
"MOV muxer flags", offsetof(
MOVMuxContext,
flags),
AV_OPT_TYPE_FLAGS, {.i64 = 0}, INT_MIN, INT_MAX,
AV_OPT_FLAG_ENCODING_PARAM,
"movflags" },
61 {
"delay_moov",
"Delay writing the initial moov until the first fragment is cut, or until the first fragment flush", 0,
AV_OPT_TYPE_CONST, {.i64 =
FF_MOV_FLAG_DELAY_MOOV}, INT_MIN, INT_MAX,
AV_OPT_FLAG_ENCODING_PARAM,
"movflags" },
69 {
"min_frag_duration",
"Minimum fragment duration", offsetof(
MOVMuxContext, min_fragment_duration),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
70 {
"frag_size",
"Maximum fragment size", offsetof(
MOVMuxContext, max_fragment_size),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
71 {
"ism_lookahead",
"Number of lookahead entries for ISM files", offsetof(
MOVMuxContext, ism_lookahead),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
73 {
"use_editlist",
"use edit list", offsetof(
MOVMuxContext, use_editlist),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, 1, AV_OPT_FLAG_ENCODING_PARAM},
74 {
"fragment_index",
"Fragment number of the next fragment", offsetof(
MOVMuxContext, fragments),
AV_OPT_TYPE_INT, {.i64 = 1}, 1, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
75 {
"frag_interleave",
"Interleave samples within fragments (max number of consecutive samples, lower is tighter interleaving, but with more overhead)", offsetof(
MOVMuxContext, frag_interleave),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
79 #define MOV_CLASS(flavor)\ 80 static const AVClass flavor ## _muxer_class = {\ 81 .class_name = #flavor " muxer",\ 82 .item_name = av_default_item_name,\ 84 .version = LIBAVUTIL_VERSION_INT,\ 129 for (i = 0; i < track->
entry; i++) {
142 int i, j, entries = 0, tst = -1, oldtst = -1;
149 for (i = 0; i < track->
entry; i++) {
151 if (oldtst != -1 && tst != oldtst)
156 if (equalChunks && track->
entry) {
158 sSize =
FFMAX(1, sSize);
164 for (i = 0; i < track->
entry; i++) {
177 int index = 0, oldval = -1, i;
178 int64_t entryPos, curpos;
186 for (i = 0; i < track->
entry; i++) {
206 int64_t curpos, entryPos;
214 for (i = 0; i < track->
entry; i++) {
246 int fscod, bsid, bsmod, acmod, lfeon, frmsizecod;
263 if ((acmod & 1) && acmod != 1)
300 avio_w8(pb, (size >> (7 * i)) | 0x80);
308 int decoder_specific_info_len = track->
vos_len ? 5 + track->
vos_len : 0;
315 put_descr(pb, 0x03, 3 + 5+13 + decoder_specific_info_len + 5+1);
320 put_descr(pb, 0x04, 13 + decoder_specific_info_len);
383 uint32_t layout_tag, bitmap;
391 "lack of channel information\n");
444 int unescaped_size, seq_found = 0;
445 int level = 0, interlace = 0;
454 packet_seq = packet_entry = 1;
456 "moov atom written before any packets, unable to write correct " 457 "dvc1 atom. Set the delay_moov flag to fix this.\n");
464 for (next = start; next < end; start = next) {
468 size = next - start - 4;
580 if (cluster_idx >= track->
entry)
583 if (cluster_idx + 1 == track->
entry)
586 next_dts = track->
cluster[cluster_idx + 1].
dts;
588 return next_dts - track->
cluster[cluster_idx].
dts;
593 int i, first_duration;
603 for (i = 1; i < track->
entry; i++) {
607 return first_duration;
614 uint32_t
tag = track->
tag;
667 else if (track->
tag ==
MKTAG(
'm',
'p',
'4',
'a'))
771 for (i = 0; i < 10; i++)
816 (tag ==
MKTAG(
't',
'x',
'3',
'g') ||
817 tag ==
MKTAG(
't',
'e',
'x',
't'))))
822 "Quicktime/Ipod might not play the file\n");
834 else tag =
MKTAG(
'd',
'v',
'c',
' ');
837 else tag =
MKTAG(
'd',
'v',
'p',
'p');
840 else tag =
MKTAG(
'd',
'v',
'h',
'p');
843 else tag =
MKTAG(
'd',
'v',
'h',
'6');
852 static const struct {
908 "the file may be unplayable!\n");
915 tag =
MKTAG(
'm',
's', ((ms_tag >> 8) & 0xff), (ms_tag & 0xff));
917 "the file may be unplayable!\n");
956 tag =
MKTAG(
'w',
'm',
'a',
' ');
986 0x0000, 0x0100, 0x0201, 0x0206, 0x0209, 0x020e
991 unsigned mov_field_order = 0;
1036 char compressor_name[32] = { 0 };
1071 avio_w8(pb, strlen(compressor_name));
1079 if (track->
tag ==
MKTAG(
'm',
'p',
'4',
'v'))
1101 }
else if (track->
vos_len > 0)
1168 uint32_t entries = 0;
1172 ctts_entries =
av_malloc((track->
entry + 1) *
sizeof(*ctts_entries));
1175 ctts_entries[0].
count = 1;
1177 for (i = 1; i < track->
entry; i++) {
1179 ctts_entries[entries].
count++;
1183 ctts_entries[entries].
count = 1;
1187 atom_size = 16 + (entries * 8);
1192 for (i = 0; i < entries; i++) {
1204 uint32_t entries = -1;
1209 stts_entries =
av_malloc(
sizeof(*stts_entries));
1221 for (i = 0; i < track->
entry; i++) {
1223 if (i && duration == stts_entries[entries].duration) {
1224 stts_entries[entries].
count++;
1228 stts_entries[entries].
count = 1;
1233 atom_size = 16 + (entries * 8);
1238 for (i = 0; i < entries; i++) {
1336 return track->
tag ==
MKTAG(
'c',
'7',
'0',
'8') ||
1337 track->
tag ==
MKTAG(
'c',
'6',
'0',
'8');
1342 const char *hdlr, *descr =
NULL, *hdlr_type =
NULL;
1347 descr =
"DataHandler";
1350 hdlr = (track->
mode ==
MODE_MOV) ?
"mhlr" :
"\0\0\0\0";
1353 descr =
"VideoHandler";
1356 descr =
"SoundHandler";
1358 if (track->
tag ==
MKTAG(
't',
'x',
'3',
'g')) {
1360 }
else if (track->
tag ==
MKTAG(
'm',
'p',
'4',
's')) {
1367 descr =
"SubtitleHandler";
1370 descr =
"HintHandler";
1373 descr =
"TimeCodeHandler";
1380 "Unknown hldr_type for %s / 0x%04X, writing dummy values\n",
1440 }
else if (track->
tag ==
MKTAG(
'r',
't',
'p',
' ')) {
1442 }
else if (track->
tag ==
MKTAG(
't',
'm',
'c',
'd')) {
1473 (version == 1) ?
avio_wb64(pb, UINT64_C(0xffffffffffffffff)) :
avio_wb32(pb, 0xffffffff);
1474 else if (!track->
entry)
1483 "FATAL error, file duration too long for timebase, this file will not be\n" 1484 "playable with quicktime. Choose a different timebase or a different\n" 1485 "container format\n");
1508 int version = duration < INT32_MAX ? 0 : 1;
1512 uint32_t *display_matrix =
NULL;
1513 int display_matrix_size, i;
1522 &display_matrix_size);
1523 if (display_matrix && display_matrix_size < 9 *
sizeof(*display_matrix))
1524 display_matrix =
NULL;
1547 (version == 1) ?
avio_wb64(pb, UINT64_C(0xffffffffffffffff)) :
avio_wb32(pb, 0xffffffff);
1548 else if (!track->
entry)
1565 if (display_matrix) {
1566 for (i = 0; i < 9; i++)
1589 sample_aspect_ratio = 1;
1637 int version = duration < INT32_MAX ? 0 : 1;
1638 int entry_size, entry_count,
size;
1639 int64_t delay, start_ct = track->
start_cts;
1642 version |= delay < INT32_MAX ? 0 : 1;
1644 entry_size = (version == 1) ? 20 : 12;
1645 entry_count = 1 + (delay > 0);
1646 size = 24 + entry_count * entry_size;
1734 char buf[1000] =
"";
1753 const char *
tag,
const char *str)
1797 int entry_backup = track->
entry;
1813 "Not writing any edit list even though one would have been required\n");
1820 if (track->
tag ==
MKTAG(
'r',
't',
'p',
' '))
1825 if ((0.0 != sample_aspect_ratio && 1.0 != sample_aspect_ratio)) {
1834 track->
entry = entry_backup;
1840 int i, has_audio = 0, has_video = 0;
1850 if (audio_profile < 0)
1851 audio_profile = 0xFF - has_audio;
1852 if (video_profile < 0)
1853 video_profile = 0xFF - has_video;
1893 int max_track_id = 1, i;
1894 int64_t max_track_len_temp, max_track_len = 0;
1903 if (max_track_len < max_track_len_temp)
1904 max_track_len = max_track_len_temp;
1905 if (max_track_id < mov->tracks[i].track_id)
1916 version = max_track_len < UINT32_MAX ? 0 : 1;
1977 int size = 16 + strlen(data);
1990 return strlen(data) + 4;
1995 const char *value,
int lang,
int long_style)
1998 if (value && value[0]) {
2009 const char *
tag,
int *lang)
2020 len = strlen(t->
key);
2021 snprintf(tag2,
sizeof(tag2),
"%s-", tag);
2023 len2 = strlen(t2->
key);
2024 if (len2 == len + 4 && !strcmp(t->
value, t2->
value)
2034 const char *
name,
const char *
tag,
2049 double latitude, longitude, altitude;
2050 int32_t latitude_fix, longitude_fix, altitude_fix;
2052 const char *ptr, *place =
"";
2054 const char *astronomical_body =
"earth";
2059 longitude =
strtod(ptr, &end);
2065 latitude =
strtod(ptr, &end);
2071 altitude =
strtod(ptr, &end);
2076 latitude_fix = (
int32_t) ((1 << 16) * latitude);
2077 longitude_fix = (
int32_t) ((1 << 16) * longitude);
2078 altitude_fix = (
int32_t) ((1 << 16) * altitude);
2089 avio_write(pb, astronomical_body, strlen(astronomical_body) + 1);
2100 int size = 0, track = t ? atoi(t->
value) : 0;
2176 return (((str[0] - 0x60) & 0x1F) << 10) +
2177 (((str[1] - 0x60) & 0x1F) << 5) +
2178 (( str[2] - 0x60) & 0x1F);
2182 const char *
tag,
const char *str)
2191 if (!strcmp(tag,
"yrrc"))
2196 if (!strcmp(tag,
"albm") &&
2214 for (i = 0; i < nb_chapters; i++) {
2284 const char *str,
const char *lang,
int type)
2356 if (track->
tag ==
MKTAG(
'r',
't',
'p',
' ')) {
2360 int * fallback,
size;
2364 if (fallback !=
NULL && size ==
sizeof(
int)) {
2365 if (*fallback >= 0 && *fallback < mov->nb_streams) {
2394 avio_printf(pb,
"<param name=\"%s\" value=\"%d\" valuetype=\"data\"/>\n", name, value);
2399 avio_printf(pb,
"<param name=\"%s\" value=\"%s\" valuetype=\"data\"/>\n", name, value);
2405 len =
FFMIN(
sizeof(buf) / 2 - 1, len);
2407 buf[2 *
len] =
'\0';
2408 avio_printf(pb,
"<param name=\"%s\" value=\"%s\" valuetype=\"data\"/>\n", name, buf);
2415 static const uint8_t uuid[] = {
2416 0xa5, 0xd4, 0x0b, 0x30, 0xe8, 0x14, 0x11, 0xdd,
2417 0xba, 0x2f, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66
2425 avio_printf(pb,
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
2426 avio_printf(pb,
"<smil xmlns=\"http://www.w3.org/2001/SMIL20/Language\">\n");
2428 avio_printf(pb,
"<meta name=\"creator\" content=\"%s\" />\n",
2438 int track_id = i + 1;
2447 avio_printf(pb,
"<%s systemBitrate=\"%d\">\n", type,
2513 MOVTrack *track, int64_t moof_offset)
2518 if (!track->
entry) {
2559 if (track->
entry > 1)
2580 for (i = first; i < end; i++) {
2610 for (i = first; i < end; i++) {
2615 if (flags & MOV_TRUN_SAMPLE_FLAGS)
2628 static const uint8_t uuid[] = {
2629 0x6d, 0x1d, 0x9b, 0x05, 0x42, 0xd5, 0x44, 0xe6,
2630 0x80, 0xe2, 0x14, 0x1d, 0xaf, 0xf7, 0x57, 0xb2
2650 int size = 8 + 16 + 4 + 1 + 16*n;
2651 static const uint8_t uuid[] = {
2652 0xd4, 0x80, 0x7e, 0xf2, 0xca, 0x39, 0x46, 0x95,
2653 0x8e, 0x54, 0x26, 0xcb, 0x9e, 0x46, 0xa7, 0x9f
2666 for (i = 0; i < n; i++) {
2667 int index = entry + 1 + i;
2671 if (n < mov->ism_lookahead) {
2675 for (i = 0; i < free_size - 8; i++)
2703 if ((tracks >= 0 && i != tracks) || !track->
entry)
2726 if (info->
time < 0) {
2741 if ((tracks >= 0 && i != tracks) || !track->
entry)
2763 MOVTrack *track, int64_t moof_offset,
2774 for (i = 1; i < track->
entry; i++) {
2794 for (i = 0; i <
size; i++)
2803 int tracks,
int moof_size)
2815 if (tracks >= 0 && i != tracks)
2826 MOVTrack *track,
int ref_size,
int total_sidx_size)
2828 int64_t pos =
avio_tell(pb), offset_pos, end_pos;
2829 int64_t presentation_time,
duration, offset;
2830 int starts_with_SAP, i, entries;
2841 if (presentation_time < 0) {
2842 duration += presentation_time;
2843 presentation_time = 0;
2864 for (i = 0; i < entries; i++) {
2865 if (!track->
entry) {
2871 starts_with_SAP = 1;
2873 avio_wb32(pb, (0 << 31) | (ref_size & 0x7fffffff));
2875 avio_wb32(pb, (starts_with_SAP << 31) | (0 << 28) | 0);
2879 offset = pos + total_sidx_size - end_pos;
2887 int tracks,
int ref_size)
2892 for (round = 0; round < 2; round++) {
2905 if (tracks >= 0 && i != tracks)
2910 if (!track->
entry && ref_size > 0)
3015 int has_h264 = 0, has_video = 0;
3034 minor = has_h264 ? 0x100 : 0x200;
3037 minor = has_h264 ? 0x20000 : 0x10000;
3094 int audio_kbitrate = audio_par->
bit_rate / 1000;
3095 int video_kbitrate =
FFMIN(video_par->
bit_rate / 1000, 800 - audio_kbitrate);
3166 int i, closed_gop = 0;
3168 for (i = 0; i < pkt->
size - 4; i++) {
3169 c = (c << 8) + pkt->
data[i];
3171 closed_gop = pkt->
data[i + 4] >> 6 & 0x01;
3172 }
else if (c == 0x100) {
3173 int temp_ref = (pkt->
data[i + 1] << 2) | (pkt->
data[i + 2] >> 6);
3174 if (!temp_ref || closed_gop)
3187 int seq = 0, entry = 0;
3190 for (next = start; next < end; start = next) {
3214 for (i = 0; i < trk->
entry; i++)
3273 int i, first_track = -1;
3274 int64_t mdat_size = 0;
3275 int has_video = 0, starts_with_key = 0, first_video_track = 1;
3301 if (track->
entry <= 1)
3319 "Estimating the duration of the last packet in a " 3320 "fragment, consider setting the duration field in " 3321 "AVPacket instead.\n");
3337 if (i < mov->nb_streams && !force)
3405 if (first_video_track) {
3408 first_video_track = 0;
3415 if (first_track < 0)
3428 int buf_size, write_moof = 1, moof_tracks = -1;
3441 write_moof = i == first_track;
3501 unsigned int samples_in_chunk = 0;
3531 static uint16_t packed_size[16] =
3532 {13, 14, 16, 18, 20, 21, 27, 32, 6, 0, 0, 0, 0, 0, 0, 1};
3535 while (len < size && samples_in_chunk < 100) {
3536 len += packed_size[(pkt->
data[
len] >> 3) & 0x0F];
3539 if (samples_in_chunk > 1) {
3540 av_log(s,
AV_LOG_ERROR,
"fatal error, input is not a single packet, implement a AVParser for it\n");
3546 samples_in_chunk = 1;
3660 "Track %d starts with a nonzero dts %"PRId64
", while the moov " 3661 "already has been written. Set the delay_moov flag to handle " 3671 if (pkt->
dts != pkt->
pts)
3705 reformatted_data, size);
3721 int64_t frag_duration = 0;
3781 uint8_t chapter_properties[43] = { 0, 0, 0, 0, 0, 0, 0, 1, };
3784 track->
tag =
MKTAG(
't',
'e',
'x',
't');
3794 memcpy(track->
par->
extradata, chapter_properties,
sizeof(chapter_properties));
3805 static const char encd[12] = {
3806 0x00, 0x00, 0x00, 0x0C,
3808 0x00, 0x00, 0x01, 0x00 };
3809 len = strlen(t->
value);
3810 pkt.
size = len + 2 + 12;
3816 memcpy(pkt.
data + len + 2, encd,
sizeof(encd));
3870 if (!enabled[i] && first[i] >= 0)
3903 r = (rgb >> 16) & 0xFF;
3904 g = (rgb >> 8) & 0xFF;
3907 y = av_clip_uint8( 16. + 0.257 * r + 0.504 * g + 0.098 * b);
3908 cb = av_clip_uint8(128. - 0.148 * r - 0.291 * g + 0.439 * b);
3909 cr = av_clip_uint8(128. + 0.439 * r - 0.368 * g - 0.071 * b);
3911 return (y << 16) | (cr << 8) | cb;
3918 int have_palette = 0, have_size = 0;
3919 uint32_t palette[16];
3922 while (cur && *cur) {
3923 if (strncmp(
"palette:", cur, 8) == 0) {
3925 count = sscanf(cur + 8,
3926 "%06"PRIx32
", %06"PRIx32
", %06"PRIx32
", %06"PRIx32
", " 3927 "%06"PRIx32
", %06"PRIx32
", %06"PRIx32
", %06"PRIx32
", " 3928 "%06"PRIx32
", %06"PRIx32
", %06"PRIx32
", %06"PRIx32
", " 3929 "%06"PRIx32
", %06"PRIx32
", %06"PRIx32
", %06"PRIx32
"",
3930 &palette[ 0], &palette[ 1], &palette[ 2], &palette[ 3],
3931 &palette[ 4], &palette[ 5], &palette[ 6], &palette[ 7],
3932 &palette[ 8], &palette[ 9], &palette[10], &palette[11],
3933 &palette[12], &palette[13], &palette[14], &palette[15]);
3935 for (i = 0; i < count; i++) {
3939 }
else if (!strncmp(
"size:", cur, 5)) {
3940 sscanf(cur + 5,
"%dx%d", &width, &
height);
3943 if (have_palette && have_size)
3945 cur += strcspn(cur,
"\n\r");
3946 cur += strspn(cur,
"\n\r");
3952 for (i = 0; i < 16; i++) {
3968 int i, ret, hint_track = 0;
4018 av_log(s,
AV_LOG_WARNING,
"No meaningful edit list will be written when using empty_moov without delay_moov\n");
4033 "Sample interleaving in fragments is mutually exclusive with " 4034 "omit_tfhd_offset and separate_moof\n");
4088 "codec not currently supported in container\n", i);
4098 if (track->
tag ==
MKTAG(
'm',
'x',
'3',
'p') || track->
tag ==
MKTAG(
'm',
'x',
'3',
'n') ||
4099 track->
tag ==
MKTAG(
'm',
'x',
'4',
'p') || track->
tag ==
MKTAG(
'm',
'x',
'4',
'n') ||
4100 track->
tag ==
MKTAG(
'm',
'x',
'5',
'p') || track->
tag ==
MKTAG(
'm',
'x',
'5',
'n')) {
4105 track->
height = track->
tag >> 24 ==
'n' ? 486 : 576;
4110 "WARNING codec timebase is very high. If duration is too long,\n" 4111 "file may not be playable by quicktime. Specify a shorter timebase\n" 4112 "or choose different container.\n");
4179 mov->
time += 0x7C25B080;
4249 int i, moov_size, moov_size2;
4265 if (moov_size2 != moov_size)
4289 int ret = 0, moov_size;
4293 int read_buf_id = 0;
4308 read_buf[1] = buf + moov_size;
4317 "the second pass (faststart)\n", s->
filename);
4330 #define READ_BLOCK do { \ 4331 read_size[read_buf_id] = avio_read(read_pb, read_buf[read_buf_id], moov_size); \ 4340 n = read_size[read_buf_id];
4345 }
while (pos < pos_end);
4391 av_log(s,
AV_LOG_INFO,
"Starting second pass: moving the moov atom to the beginning of the file\n");
4427 #if CONFIG_MOV_MUXER 4432 .extensions =
"mov",
4444 .priv_class = &mov_muxer_class,
4447 #if CONFIG_TGP_MUXER 4452 .extensions =
"3gp",
4461 .priv_class = &tgp_muxer_class,
4464 #if CONFIG_MP4_MUXER 4469 .mime_type =
"application/mp4",
4470 .extensions =
"mp4",
4480 .priv_class = &mp4_muxer_class,
4483 #if CONFIG_PSP_MUXER 4488 .extensions =
"mp4,psp",
4498 .priv_class = &psp_muxer_class,
4501 #if CONFIG_TG2_MUXER 4506 .extensions =
"3g2",
4515 .priv_class = &tg2_muxer_class,
4518 #if CONFIG_IPOD_MUXER 4523 .mime_type =
"application/mp4",
4524 .extensions =
"m4v,m4a",
4533 .priv_class = &ipod_muxer_class,
4536 #if CONFIG_ISMV_MUXER 4541 .mime_type =
"application/mp4",
4542 .extensions =
"ismv,isma",
4551 .priv_class = &ismv_muxer_class,
4554 #if CONFIG_F4V_MUXER 4559 .mime_type =
"application/f4v",
4560 .extensions =
"f4v",
4569 .priv_class = &f4v_muxer_class,
unsigned int nb_chapters
Number of chapters in AVChapter array.
static int utf8len(const uint8_t *b)
static int mov_write_extradata_tag(AVIOContext *pb, MOVTrack *track)
This function writes extradata "as is".
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
int ff_mov_iso639_to_lang(const char lang[4], int mp4)
#define FF_MOV_FLAG_DELAY_MOOV
int(* io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options)
A callback for opening new IO streams.
void avio_wb64(AVIOContext *s, uint64_t val)
static const struct @142 mov_pix_fmt_tags[]
static void av_unused put_bits32(PutBitContext *s, uint32_t value)
Write exactly 32 bits into a bitstream.
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
enum AVFieldOrder field_order
Video only.
static int mov_write_moof_tag_internal(AVIOContext *pb, MOVMuxContext *mov, int tracks, int moof_size)
static int ascii_to_wc(AVIOContext *pb, const uint8_t *b)
#define FF_MOV_FLAG_FASTSTART
static int get_cluster_duration(MOVTrack *track, int cluster_idx)
static int mov_write_dinf_tag(AVIOContext *pb)
#define GET_UTF8(val, GET_BYTE, ERROR)
Convert a UTF-8 character (up to 4 bytes) to its 32-bit UCS-4 encoded form.
static int mov_flush_fragment(AVFormatContext *s, int force)
int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
Return the written size and a pointer to the buffer.
static int mov_write_tfdt_tag(AVIOContext *pb, MOVTrack *track)
int ffio_close_null_buf(AVIOContext *s)
Close a null buffer.
static int mov_write_ac3_tag(AVIOContext *pb, MOVTrack *track)
static void mov_write_psp_udta_tag(AVIOContext *pb, const char *str, const char *lang, int type)
#define MOV_TFHD_DEFAULT_DURATION
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd)
Rescale a 64-bit integer with specified rounding.
static int mov_write_tmcd_tag(AVIOContext *pb, MOVTrack *track)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static void param_write_int(AVIOContext *pb, const char *name, int value)
#define AV_LOG_WARNING
Something somehow does not look correct.
#define FF_MOV_FLAG_FRAGMENT
packed RGB 8:8:8, 24bpp, RGBRGB...
static void skip_bits_long(GetBitContext *s, int n)
static int mov_write_dref_tag(AVIOContext *pb)
int max_bitrate
Maximum bitrate of the stream, in bits per second.
static int mov_write_string_metadata(AVFormatContext *s, AVIOContext *pb, const char *name, const char *tag, int long_style)
static const AVCodecTag codec_f4v_tags[]
AVRational sample_aspect_ratio
Video only.
int ff_mov_add_hinted_packet(AVFormatContext *s, AVPacket *pkt, int track_index, int sample, uint8_t *sample_data, int sample_size)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
static int mov_get_rawvideo_codec_tag(AVFormatContext *s, MOVTrack *track)
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), little-endian, most significant bit to 0 ...
int index
stream index in AVFormatContext
av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (%s)\, len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic ? ac->func_descr_generic :ac->func_descr)
#define MOV_TRUN_SAMPLE_CTS
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
#define AVIO_FLAG_READ
read-only
This side data contains an integer value representing the stream index of a "fallback" track...
uint8_t * av_stream_get_side_data(AVStream *stream, enum AVPacketSideDataType type, int *size)
Get side information from stream.
static av_always_inline uint64_t av_double2int(double f)
Reinterpret a double as a 64-bit integer.
int ff_put_wav_header(AVFormatContext *s, AVIOContext *pb, AVCodecParameters *par)
static int mov_write_pasp_tag(AVIOContext *pb, MOVTrack *track)
size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag)
Put a string representing the codec tag codec_tag in buf.
#define FF_ARRAY_ELEMS(a)
static int mov_write_track_metadata(AVIOContext *pb, AVStream *st, const char *tag, const char *str)
#define MOV_TFHD_DURATION_IS_EMPTY
static uint16_t language_code(const char *str)
int avio_open_dyn_buf(AVIOContext **s)
Open a write only memory stream.
int strict_std_compliance
Allow non-standard and experimental extension.
This struct describes the properties of an encoded stream.
int min_bitrate
Minimum bitrate of the stream, in bits per second.
static int mov_write_tfrf_tag(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track, int entry)
#define MOV_TFHD_DEFAULT_BASE_IS_MOOF
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
static int mov_write_glbl_tag(AVIOContext *pb, MOVTrack *track)
#define MOV_TKHD_FLAG_ENABLED
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
static int shift_data(AVFormatContext *s)
Trailer data, which doesn't contain actual content, but only for finalizing the output file...
static int mov_write_stsc_tag(AVIOContext *pb, MOVTrack *track)
static int mov_write_packet(AVFormatContext *s, AVPacket *pkt)
static int mov_write_fiel_tag(AVIOContext *pb, MOVTrack *track)
static int mov_add_tfra_entries(AVIOContext *pb, MOVMuxContext *mov, int tracks, int size)
static int mov_write_uuidusmt_tag(AVIOContext *pb, AVFormatContext *s)
#define FF_MOV_FLAG_EMPTY_MOOV
void avio_wl32(AVIOContext *s, unsigned int val)
static int mov_write_uuid_tag_psp(AVIOContext *pb, MOVTrack *mov)
unsigned frag_info_capacity
Opaque data information usually continuous.
int missing_duration_warned
unsigned int samples_in_chunk
#define MOV_CLASS(flavor)
AVCodecParameters * avcodec_parameters_alloc(void)
Allocate a new AVCodecParameters and set its fields to default values (unknown/invalid/0).
static int get_samples_per_packet(MOVTrack *track)
const AVCodecTag ff_codec_movvideo_tags[]
static int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track)
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
This side data contains a 3x3 transformation matrix describing an affine transformation that needs to...
static void mov_write_uuidprof_tag(AVIOContext *pb, AVFormatContext *s)
static const AVOption options[]
static int mov_write_ms_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *track)
void avio_write_marker(AVIOContext *s, int64_t time, enum AVIODataMarkerType type)
Mark the written bytestream as a specific type.
static int mov_write_tapt_tag(AVIOContext *pb, MOVTrack *track)
static int mov_create_chapter_track(AVFormatContext *s, int tracknum)
AVStream ** streams
A list of all streams in the file.
static int mov_write_vmhd_tag(AVIOContext *pb)
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
static int mov_write_amr_tag(AVIOContext *pb, MOVTrack *track)
A point in the output bytestream where a demuxer can start parsing (for non self synchronizing bytest...
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
static int mov_write_sidx_tags(AVIOContext *pb, MOVMuxContext *mov, int tracks, int ref_size)
static int mov_write_moov_tag(AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s)
double strtod(const char *, char **)
static double av_q2d(AVRational a)
Convert rational to double.
int ff_avc_write_annexb_extradata(const uint8_t *in, uint8_t **buf, int *size)
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
int chapter_track
qt chapter track number
int flags
Flags modifying the (de)muxer behaviour.
#define FF_MOV_FLAG_OMIT_TFHD_OFFSET
static void mov_free(AVFormatContext *s)
#define MOV_TRUN_SAMPLE_SIZE
static int mov_write_itunes_hdlr_tag(AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s)
static int mov_write_subtitle_tag(AVIOContext *pb, MOVTrack *track)
bitstream reader API header.
int max_fragment_duration
int av_match_ext(const char *filename, const char *extensions)
Return a positive value if the given filename has one of the given extensions, 0 otherwise.
static int mov_write_moof_tag(AVIOContext *pb, MOVMuxContext *mov, int tracks, int64_t mdat_size)
int buffer_size
The size of the buffer to which the ratecontrol is applied, in bits.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
void ff_mov_close_hinting(MOVTrack *track)
static int mov_write_uuid_tag_ipod(AVIOContext *pb)
Write uuid atom.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s)
static const uint16_t fiel_data[]
uint64_t channel_layout
Audio only.
#define MOV_TFHD_DEFAULT_SIZE
static int mov_write_nmhd_tag(AVIOContext *pb)
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
struct AVOutputFormat * oformat
The output container format.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
static int mov_find_codec_tag(AVFormatContext *s, MOVTrack *track)
static int compute_sidx_size(AVFormatContext *s)
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
static void mov_parse_vc1_frame(AVPacket *pkt, MOVTrack *trk)
static int mov_write_udta_sdp(AVIOContext *pb, MOVTrack *track)
int av_reallocp_array(void *ptr, size_t nmemb, size_t size)
AVCodecID
Identify the syntax and semantics of the bitstream.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
AVDictionary * metadata
Metadata that applies to the whole file.
int av_get_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
static int mov_write_meta_tag(AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s)
#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO
static int mov_write_mdat_tag(AVIOContext *pb, MOVMuxContext *mov)
static int mov_write_stsz_tag(AVIOContext *pb, MOVTrack *track)
static void put_descr(AVIOContext *pb, int tag, unsigned int size)
static int mov_write_ilst_tag(AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s)
static int mov_write_avid_tag(AVIOContext *pb, MOVTrack *track)
static int mov_write_dvc1_structs(MOVTrack *track, uint8_t *buf)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
preferred ID for decoding MPEG audio layer 1, 2 or 3
enum AVMediaType codec_type
General type of the encoded data.
static AVDictionaryEntry * get_metadata_lang(AVFormatContext *s, const char *tag, int *lang)
static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track, int moof_size, int first, int end)
static int mov_create_dvd_sub_decoder_specific_info(MOVTrack *track, AVStream *st)
static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov)
static av_always_inline av_const double round(double x)
int height
active picture (w/o VBI) height for D-10/IMX
static void put_bits(PutBitContext *s, int n, unsigned int value)
Write up to 31 bits into a bitstream.
static int mov_write_track_udta_tag(AVIOContext *pb, MOVMuxContext *mov, AVStream *st)
#define FF_MOV_FLAG_SEPARATE_MOOF
AVRational avg_frame_rate
Average framerate.
const AVCodecTag ff_codec_wav_tags[]
int ff_avc_parse_nal_units_buf(const uint8_t *buf_in, uint8_t **buf, int *size)
void avcodec_parameters_free(AVCodecParameters **par)
Free an AVCodecParameters instance and everything associated with it and write NULL to the supplied p...
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES
size_t av_strlcpy(char *dst, const char *src, size_t size)
Copy the string src to dst, but no more than size - 1 bytes, and null-terminate dst.
const AVCodecTag ff_mp4_obj_type[]
const AVCodecTag ff_codec_movsubtitle_tags[]
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
int flags
A combination of AV_PKT_FLAG values.
int extradata_size
Size of the extradata content in bytes.
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
int bit_rate
The average bitrate of the encoded data (in bits per second).
static int mov_flush_fragment_interleaving(AVFormatContext *s, MOVTrack *track)
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
int ff_avc_parse_nal_units(AVIOContext *pb, const uint8_t *buf_in, int size)
static int mov_write_identification(AVIOContext *pb, AVFormatContext *s)
int block_align
Audio only.
#define FF_MOV_FLAG_FRAG_DISCONT
static int mov_write_mdia_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track)
#define MOV_FRAG_INFO_ALLOC_INCREMENT
#define MOV_TRACK_ENABLED
static int mov_write_stts_tag(AVIOContext *pb, MOVTrack *track)
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
static int mov_write_trkn_tag(AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s)
int void avio_flush(AVIOContext *s)
char filename[1024]
input or output filename
static int mov_write_tfhd_tag(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track, int64_t moof_offset)
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
#define AV_TIME_BASE
Internal time base represented as integer.
const AVCodecTag ff_codec_bmp_tags[]
static int mov_write_mvex_tag(AVIOContext *pb, MOVMuxContext *mov)
static int mov_write_chpl_tag(AVIOContext *pb, AVFormatContext *s)
#define MOV_TKHD_FLAG_IN_MOVIE
#define MOV_PARTIAL_SYNC_SAMPLE
int ff_mov_init_hinting(AVFormatContext *s, int index, int src_index)
static int mov_write_avcc_tag(AVIOContext *pb, MOVTrack *track)
static int is_clcp_track(MOVTrack *track)
static int mov_write_trak_tag(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track, AVStream *st)
void avio_wb24(AVIOContext *s, unsigned int val)
internal header for RIFF based (de)muxers do NOT include this in end user applications ...
static int mov_get_dv_codec_tag(AVFormatContext *s, MOVTrack *track)
static int mov_write_string_tag(AVIOContext *pb, const char *name, const char *value, int lang, int long_style)
static int mov_write_smhd_tag(AVIOContext *pb)
static int mov_auto_flush_fragment(AVFormatContext *s, int force)
int avoid_negative_ts
Avoid negative timestamps during muxing.
static int mov_write_stco_tag(AVIOContext *pb, MOVTrack *track)
static void param_write_string(AVIOContext *pb, const char *name, const char *value)
#define MOV_TRUN_SAMPLE_DURATION
packed RGB 8:8:8, 24bpp, BGRBGR...
static int mov_write_minf_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *track)
static int mov_write_hvcc_tag(AVIOContext *pb, MOVTrack *track)
Usually treated as AVMEDIA_TYPE_DATA.
static int mov_write_edts_tag(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track)
enum AVPixelFormat pix_fmt
static int mov_write_trex_tag(AVIOContext *pb, MOVTrack *track)
preferred ID for MPEG-1/2 video decoding
static int mov_write_mfhd_tag(AVIOContext *pb, MOVMuxContext *mov)
if(ac->has_optimized_func)
static int get_sidx_size(AVFormatContext *s)
int64_t end
chapter start/end time in time_base units
This structure describes the bitrate properties of an encoded bitstream.
#define AV_LOG_INFO
Standard information.
static int mov_write_esds_tag(AVIOContext *pb, MOVTrack *track)
#define MOV_INDEX_CLUSTER_SIZE
static int mov_write_d263_tag(AVIOContext *pb)
static av_always_inline int vc1_unescape_buffer(const uint8_t *src, int size, uint8_t *dst)
const AVCodecTag ff_codec_movaudio_tags[]
static int mov_write_ctts_tag(AVIOContext *pb, MOVTrack *track)
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
AVIOContext * pb
I/O context.
static void mov_prune_frag_info(MOVMuxContext *mov, int tracks, int max)
#define FF_RTP_FLAG_OPTS(ctx, fieldname)
void avio_w8(AVIOContext *s, int b)
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost)
static uint32_t rgb_to_yuv(uint32_t rgb)
#define MOV_TRUN_FIRST_SAMPLE_FLAGS
#define FF_MOV_FLAG_FRAG_CUSTOM
int hint_track
the track that hints this track, -1 if no hint track is set
static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track)
static int mov_write_hmhd_tag(AVIOContext *pb)
static int mov_parse_mpeg2_frame(AVPacket *pkt, uint32_t *flags)
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
#define FF_MOV_FLAG_GLOBAL_SIDX
static int mov_write_dvc1_tag(AVIOContext *pb, MOVTrack *track)
static unsigned int get_bits1(GetBitContext *s)
#define FF_MOV_FLAG_RTP_HINT
static void skip_bits(GetBitContext *s, int n)
#define FF_COMPLIANCE_NORMAL
static int mov_write_wfex_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *track)
static int co64_required(const MOVTrack *track)
rational number numerator/denominator
#define FF_MOV_FLAG_SKIP_TRAILER
static void param_write_hex(AVIOContext *pb, const char *name, const uint8_t *value, int len)
static int mov_write_stsd_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *track)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
int ffio_open_null_buf(AVIOContext **s)
Open a write-only fake memory stream.
static int mov_write_chan_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *track)
static int mov_write_loci_tag(AVFormatContext *s, AVIOContext *pb)
size_t av_strlcatf(char *dst, size_t size, const char *fmt,...)
#define MOV_TFHD_DEFAULT_FLAGS
MOVFragmentInfo * frag_info
#define MOV_TRUN_SAMPLE_FLAGS
static const AVCodecTag codec_3gp_tags[]
static int mov_write_stbl_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *track)
static int mov_write_tkhd_tag(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track, AVStream *st)
static int mov_write_hdlr_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *track)
void avio_wb16(AVIOContext *s, unsigned int val)
static int mp4_get_codec_tag(AVFormatContext *s, MOVTrack *track)
packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), big-endian, most significant bit to 0 ...
AVFormatContext * rtp_ctx
the format context for the hinting rtp muxer
static int mov_write_udta_tag(AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s)
static int mov_write_trailer(AVFormatContext *s)
int sample_rate
Audio only.
#define FF_MOV_FLAG_FRAG_KEYFRAME
static int mov_write_3gp_udta_tag(AVIOContext *pb, AVFormatContext *s, const char *tag, const char *str)
static int mov_write_mvhd_tag(AVIOContext *pb, MOVMuxContext *mov)
static int mov_write_tfrf_tags(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track)
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
static int mov_write_tfra_tag(AVIOContext *pb, MOVTrack *track)
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
#define MOV_TFHD_BASE_DATA_OFFSET
static uint32_t get_sample_flags(MOVTrack *track, MOVIentry *entry)
struct MOVTrack::@143 vc1_info
static int mov_write_tfxd_tag(AVIOContext *pb, MOVTrack *track)
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big...
int disposition
AV_DISPOSITION_* bit field.
static int mov_write_sidx_tag(AVIOContext *pb, MOVTrack *track, int ref_size, int total_sidx_size)
static int mov_write_gmhd_tag(AVIOContext *pb)
int src_track
the track that this hint track describes
AVRational time_base
time base in which the start/end timestamps are specified
static int mov_write_wave_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *track)
static int mov_write_traf_tag(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track, int64_t moof_offset, int moof_size)
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
#define FF_MOV_FLAG_DISABLE_CHPL
static int mov_write_iods_tag(AVIOContext *pb, MOVMuxContext *mov)
A point in the output bytestream where a decoder can start decoding (i.e.
static int mov_write_stss_tag(AVIOContext *pb, MOVTrack *track, uint32_t flag)
uint32_t default_sample_flags
#define FF_MOV_FLAG_DEFAULT_BASE_MOOF
static int mov_write_mfra_tag(AVIOContext *pb, MOVMuxContext *mov)
int avg_bitrate
Average bitrate of the stream, in bits per second.
static int mov_write_string_data_tag(AVIOContext *pb, const char *data, int lang, int long_style)
void * priv_data
Format private data.
static int mov_write_header(AVFormatContext *s)
This side data corresponds to the AVCPBProperties struct.
static void write_header(FFV1Context *f)
int64_t reserved_header_pos
static int64_t update_size(AVIOContext *pb, int64_t pos)
int bits_per_coded_sample
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
#define MOV_TRUN_DATA_OFFSET
static int mov_write_mdhd_tag(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track)
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
int tref_id
trackID of the referenced track
static int mov_write_ftyp_tag(AVIOContext *pb, AVFormatContext *s)
void avio_wb32(AVIOContext *s, unsigned int val)
static const AVCodecTag codec_ipod_tags[]
#define AV_DICT_IGNORE_SUFFIX
static int mov_write_rtp_tag(AVIOContext *pb, MOVTrack *track)
static int mov_write_tref_tag(AVIOContext *pb, MOVTrack *track)
AVCodecParameters * codecpar
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
unsigned cluster_capacity
int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
static int mov_get_lpcm_flags(enum AVCodecID codec_id)
Compute flags for 'lpcm' tag.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
uint32_t ff_mov_get_channel_layout_tag(enum AVCodecID codec_id, uint64_t channel_layout, uint32_t *bitmap)
Get the channel layout tag for the specified codec id and channel layout.
static int ipod_get_codec_tag(AVFormatContext *s, MOVTrack *track)
static int mov_write_svq3_tag(AVIOContext *pb)
#define CONFIG_LIBX264_ENCODER
#define MKTAG(a, b, c, d)
static void enable_tracks(AVFormatContext *s)
AVPixelFormat
Pixel format.
This structure stores compressed data.
int min_fragment_duration
static int mov_write_audio_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *track)
static av_always_inline const uint8_t * find_next_marker(const uint8_t *src, const uint8_t *end)
Find VC-1 marker in buffer.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
int ff_isom_write_avcc(AVIOContext *pb, const uint8_t *data, int len)
Header data; this needs to be present for the stream to be decodeable.
#define AV_NOPTS_VALUE
Undefined timestamp value.
int avio_printf(AVIOContext *s, const char *fmt,...) av_printf_format(2
#define MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC
static int compute_moov_size(AVFormatContext *s)
static int get_moov_size(AVFormatContext *s)