Mercurial > libavformat.hg
comparison movenc.c @ 3458:1ccb0b1813c9 libavformat
write usual brand for ipod format
author | bcoudurier |
---|---|
date | Wed, 11 Jun 2008 09:33:35 +0000 |
parents | 0bbc97acefde |
children | a79f6237c3d2 |
comparison
equal
deleted
inserted
replaced
3457:0bbc97acefde | 3458:1ccb0b1813c9 |
---|---|
1349 | 1349 |
1350 /* TODO: This needs to be more general */ | 1350 /* TODO: This needs to be more general */ |
1351 static void mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s) | 1351 static void mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s) |
1352 { | 1352 { |
1353 MOVContext *mov = s->priv_data; | 1353 MOVContext *mov = s->priv_data; |
1354 int i; | |
1354 | 1355 |
1355 put_be32(pb, 0x14); /* size */ | 1356 put_be32(pb, 0x14); /* size */ |
1356 put_tag(pb, "ftyp"); | 1357 put_tag(pb, "ftyp"); |
1357 | 1358 |
1358 if (mov->mode == MODE_3GP) | 1359 if (mov->mode == MODE_3GP) |
1359 put_tag(pb, "3gp4"); | 1360 put_tag(pb, "3gp4"); |
1360 else if (mov->mode == MODE_3G2) | 1361 else if (mov->mode == MODE_3G2) |
1361 put_tag(pb, "3g2a"); | 1362 put_tag(pb, "3g2a"); |
1362 else if (mov->mode == MODE_PSP) | 1363 else if (mov->mode == MODE_PSP) |
1363 put_tag(pb, "MSNV"); | 1364 put_tag(pb, "MSNV"); |
1364 else if (mov->mode == MODE_MP4 || mov->mode == MODE_IPOD) | 1365 else if (mov->mode == MODE_MP4) |
1365 put_tag(pb, "isom"); | 1366 put_tag(pb, "isom"); |
1366 else | 1367 else if (mov->mode == MODE_IPOD) { |
1368 for (i = 0; i < s->nb_streams; i++) | |
1369 if (s->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO) { | |
1370 put_tag(pb, "M4V "); | |
1371 break; | |
1372 } | |
1373 if (i == s->nb_streams) | |
1374 put_tag(pb, "M4A "); | |
1375 } else | |
1367 put_tag(pb, "qt "); | 1376 put_tag(pb, "qt "); |
1368 | 1377 |
1369 put_be32(pb, 0x200); | 1378 put_be32(pb, 0x200); |
1370 | 1379 |
1371 if (mov->mode == MODE_3GP) | 1380 if (mov->mode == MODE_3GP) |
1372 put_tag(pb, "3gp4"); | 1381 put_tag(pb, "3gp4"); |
1373 else if (mov->mode == MODE_3G2) | 1382 else if (mov->mode == MODE_3G2) |
1374 put_tag(pb, "3g2a"); | 1383 put_tag(pb, "3g2a"); |
1375 else if (mov->mode == MODE_PSP) | 1384 else if (mov->mode == MODE_PSP) |
1376 put_tag(pb, "MSNV"); | 1385 put_tag(pb, "MSNV"); |
1377 else if (mov->mode == MODE_MP4 || mov->mode == MODE_IPOD) | 1386 else if (mov->mode == MODE_MP4) |
1378 put_tag(pb, "mp41"); | 1387 put_tag(pb, "mp41"); |
1388 else if (mov->mode == MODE_IPOD) | |
1389 put_tag(pb, "isom"); | |
1379 else | 1390 else |
1380 put_tag(pb, "qt "); | 1391 put_tag(pb, "qt "); |
1381 } | 1392 } |
1382 | 1393 |
1383 static void mov_write_uuidprof_tag(ByteIOContext *pb, AVFormatContext *s) | 1394 static void mov_write_uuidprof_tag(ByteIOContext *pb, AVFormatContext *s) |