Move related fields closer together.
Unified · Split
| @@ -1324,6 +1324,39 @@ typedef struct AVFormatContext { · 1323 unmodified lines | ||
| 1324 | 1324 | */ |
| 1325 | 1325 | AVStream **streams; |
| 1326 | 1326 | |
| 1327 | + /** | |
| 1328 | + * Number of elements in AVFormatContext.stream_groups. | |
| 1329 | + * | |
| 1330 | + * Set by avformat_stream_group_create(), must not be modified by any other code. | |
| 1331 | + */ | |
| 1332 | + unsigned int nb_stream_groups; | |
| 1333 | + /** | |
| 1334 | + * A list of all stream groups in the file. New groups are created with | |
| 1335 | + * avformat_stream_group_create(), and filled with avformat_stream_group_add_stream(). | |
| 1336 | + * | |
| 1337 | + * - demuxing: groups may be created by libavformat in avformat_open_input(). | |
| 1338 | + * If AVFMTCTX_NOHEADER is set in ctx_flags, then new groups may also | |
| 1339 | + * appear in av_read_frame(). | |
| 1340 | + * - muxing: groups may be created by the user before avformat_write_header(). | |
| 1341 | + * | |
| 1342 | + * Freed by libavformat in avformat_free_context(). | |
| 1343 | + */ | |
| 1344 | + AVStreamGroup **stream_groups; | |
| 1345 | + | |
| 1346 | + /** | |
| 1347 | + * Number of chapters in AVChapter array. | |
| 1348 | + * When muxing, chapters are normally written in the file header, | |
| 1349 | + * so nb_chapters should normally be initialized before write_header | |
| 1350 | + * is called. Some muxers (e.g. mov and mkv) can also write chapters | |
| 1351 | + * in the trailer. To write chapters in the trailer, nb_chapters | |
| 1352 | + * must be zero when write_header is called and non-zero when | |
| 1353 | + * write_trailer is called. | |
| 1354 | + * - muxing: set by user | |
| 1355 | + * - demuxing: set by libavformat | |
| 1356 | + */ | |
| 1357 | + unsigned int nb_chapters; | |
| 1358 | + AVChapter **chapters; | |
| 1359 | + | |
| 1327 | 1360 | /** |
| 1328 | 1361 | * input or output URL. Unlike the old filename field, this field has no |
| 1329 | 1362 | * length restriction. |
| @@ -1443,36 +1476,10 @@ typedef struct AVFormatContext { · 113 unmodified lines | ||
| 1443 | 1476 | enum AVCodecID subtitle_codec_id; |
| 1444 | 1477 | |
| 1445 | 1478 | /** |
| 1446 | − * Maximum amount of memory in bytes to use for the index of each stream. | |
| 1447 | − * If the index exceeds this size, entries will be discarded as | |
| 1448 | − * needed to maintain a smaller size. This can lead to slower or less | |
| 1449 | − * accurate seeking (depends on demuxer). | |
| 1450 | − * Demuxers for which a full in-memory index is mandatory will ignore | |
| 1451 | − * this. | |
| 1452 | − * - muxing: unused | |
| 1453 | − * - demuxing: set by user | |
| 1454 | − */ | |
| 1455 | − unsigned int max_index_size; | |
| 1456 | − | |
| 1457 | − /** | |
| 1458 | − * Maximum amount of memory in bytes to use for buffering frames | |
| 1459 | − * obtained from realtime capture devices. | |
| 1460 | − */ | |
| 1461 | − unsigned int max_picture_buffer; | |
| 1462 | − | |
| 1463 | − /** | |
| 1464 | − * Number of chapters in AVChapter array. | |
| 1465 | − * When muxing, chapters are normally written in the file header, | |
| 1466 | − * so nb_chapters should normally be initialized before write_header | |
| 1467 | − * is called. Some muxers (e.g. mov and mkv) can also write chapters | |
| 1468 | − * in the trailer. To write chapters in the trailer, nb_chapters | |
| 1469 | − * must be zero when write_header is called and non-zero when | |
| 1470 | − * write_trailer is called. | |
| 1471 | − * - muxing: set by user | |
| 1472 | − * - demuxing: set by libavformat | |
| 1479 | + * Forced Data codec_id. | |
| 1480 | + * Demuxing: Set by user. | |
| 1473 | 1481 | */ |
| 1474 | − unsigned int nb_chapters; | |
| 1475 | − AVChapter **chapters; | |
| 1482 | + enum AVCodecID data_codec_id; | |
| 1476 | 1483 | |
| 1477 | 1484 | /** |
| 1478 | 1485 | * Metadata that applies to the whole file. |
| @@ -1528,6 +1535,31 @@ typedef struct AVFormatContext { · 49 unmodified lines | ||
| 1528 | 1535 | int debug; |
| 1529 | 1536 | #define FF_FDEBUG_TS 0x0001 |
| 1530 | 1537 | |
| 1538 | + /** | |
| 1539 | + * The maximum number of streams. | |
| 1540 | + * - encoding: unused | |
| 1541 | + * - decoding: set by user | |
| 1542 | + */ | |
| 1543 | + int max_streams; | |
| 1544 | + | |
| 1545 | + /** | |
| 1546 | + * Maximum amount of memory in bytes to use for the index of each stream. | |
| 1547 | + * If the index exceeds this size, entries will be discarded as | |
| 1548 | + * needed to maintain a smaller size. This can lead to slower or less | |
| 1549 | + * accurate seeking (depends on demuxer). | |
| 1550 | + * Demuxers for which a full in-memory index is mandatory will ignore | |
| 1551 | + * this. | |
| 1552 | + * - muxing: unused | |
| 1553 | + * - demuxing: set by user | |
| 1554 | + */ | |
| 1555 | + unsigned int max_index_size; | |
| 1556 | + | |
| 1557 | + /** | |
| 1558 | + * Maximum amount of memory in bytes to use for buffering frames | |
| 1559 | + * obtained from realtime capture devices. | |
| 1560 | + */ | |
| 1561 | + unsigned int max_picture_buffer; | |
| 1562 | + | |
| 1531 | 1563 | /** |
| 1532 | 1564 | * Maximum buffering duration for interleaving. |
| 1533 | 1565 | * |
| @@ -1546,6 +1578,35 @@ typedef struct AVFormatContext { · 12 unmodified lines | ||
| 1546 | 1578 | */ |
| 1547 | 1579 | int64_t max_interleave_delta; |
| 1548 | 1580 | |
| 1581 | + /** | |
| 1582 | + * Maximum number of packets to read while waiting for the first timestamp. | |
| 1583 | + * Decoding only. | |
| 1584 | + */ | |
| 1585 | + int max_ts_probe; | |
| 1586 | + | |
| 1587 | + /** | |
| 1588 | + * Max chunk time in microseconds. | |
| 1589 | + * Note, not all formats support this and unpredictable things may happen if it is used when not supported. | |
| 1590 | + * - encoding: Set by user | |
| 1591 | + * - decoding: unused | |
| 1592 | + */ | |
| 1593 | + int max_chunk_duration; | |
| 1594 | + | |
| 1595 | + /** | |
| 1596 | + * Max chunk size in bytes | |
| 1597 | + * Note, not all formats support this and unpredictable things may happen if it is used when not supported. | |
| 1598 | + * - encoding: Set by user | |
| 1599 | + * - decoding: unused | |
| 1600 | + */ | |
| 1601 | + int max_chunk_size; | |
| 1602 | + | |
| 1603 | + /** | |
| 1604 | + * Maximum number of packets that can be probed | |
| 1605 | + * - encoding: unused | |
| 1606 | + * - decoding: set by user | |
| 1607 | + */ | |
| 1608 | + int max_probe_packets; | |
| 1609 | + | |
| 1549 | 1610 | /** |
| 1550 | 1611 | * Allow non-standard and experimental extension |
| 1551 | 1612 | * @see AVCodecContext.strict_std_compliance |
| @@ -1572,11 +1633,6 @@ typedef struct AVFormatContext { · 20 unmodified lines | ||
| 1572 | 1633 | */ |
| 1573 | 1634 | #define AVFMT_EVENT_FLAG_METADATA_UPDATED 0x0001 |
| 1574 | 1635 | |
| 1575 | − /** | |
| 1576 | − * Maximum number of packets to read while waiting for the first timestamp. | |
| 1577 | − * Decoding only. | |
| 1578 | − */ | |
| 1579 | − int max_ts_probe; | |
| 1580 | 1636 | |
| 1581 | 1637 | /** |
| 1582 | 1638 | * Avoid negative timestamps during muxing. |
| @@ -1599,22 +1655,6 @@ typedef struct AVFormatContext { · 16 unmodified lines | ||
| 1599 | 1655 | */ |
| 1600 | 1656 | int audio_preload; |
| 1601 | 1657 | |
| 1602 | − /** | |
| 1603 | − * Max chunk time in microseconds. | |
| 1604 | − * Note, not all formats support this and unpredictable things may happen if it is used when not supported. | |
| 1605 | − * - encoding: Set by user | |
| 1606 | − * - decoding: unused | |
| 1607 | − */ | |
| 1608 | − int max_chunk_duration; | |
| 1609 | − | |
| 1610 | − /** | |
| 1611 | − * Max chunk size in bytes | |
| 1612 | − * Note, not all formats support this and unpredictable things may happen if it is used when not supported. | |
| 1613 | − * - encoding: Set by user | |
| 1614 | − * - decoding: unused | |
| 1615 | − */ | |
| 1616 | − int max_chunk_size; | |
| 1617 | − | |
| 1618 | 1658 | /** |
| 1619 | 1659 | * forces the use of wallclock timestamps as pts/dts of packets |
| 1620 | 1660 | * This has undefined results in the presence of B frames. |
| @@ -1623,6 +1663,13 @@ typedef struct AVFormatContext { · 2 unmodified lines | ||
| 1623 | 1663 | */ |
| 1624 | 1664 | int use_wallclock_as_timestamps; |
| 1625 | 1665 | |
| 1666 | + /** | |
| 1667 | + * Skip duration calcuation in estimate_timings_from_pts. | |
| 1668 | + * - encoding: unused | |
| 1669 | + * - decoding: set by user | |
| 1670 | + */ | |
| 1671 | + int skip_estimate_duration_from_pts; | |
| 1672 | + | |
| 1626 | 1673 | /** |
| 1627 | 1674 | * avio flags, used to force AVIO_FLAG_DIRECT. |
| 1628 | 1675 | * - encoding: unused |
| @@ -1702,6 +1749,20 @@ typedef struct AVFormatContext { · 73 unmodified lines | ||
| 1702 | 1749 | */ |
| 1703 | 1750 | char *format_whitelist; |
| 1704 | 1751 | |
| 1752 | + /** | |
| 1753 | + * ',' separated list of allowed protocols. | |
| 1754 | + * - encoding: unused | |
| 1755 | + * - decoding: set by user | |
| 1756 | + */ | |
| 1757 | + char *protocol_whitelist; | |
| 1758 | + | |
| 1759 | + /** | |
| 1760 | + * ',' separated list of disallowed protocols. | |
| 1761 | + * - encoding: unused | |
| 1762 | + * - decoding: set by user | |
| 1763 | + */ | |
| 1764 | + char *protocol_blacklist; | |
| 1765 | + | |
| 1705 | 1766 | /** |
| 1706 | 1767 | * IO repositioned flag. |
| 1707 | 1768 | * This is set by avformat when the underlaying IO context read pointer |
| @@ -1774,19 +1835,6 @@ typedef struct AVFormatContext { · 66 unmodified lines | ||
| 1774 | 1835 | */ |
| 1775 | 1836 | uint8_t *dump_separator; |
| 1776 | 1837 | |
| 1777 | − /** | |
| 1778 | − * Forced Data codec_id. | |
| 1779 | − * Demuxing: Set by user. | |
| 1780 | − */ | |
| 1781 | − enum AVCodecID data_codec_id; | |
| 1782 | − | |
| 1783 | − /** | |
| 1784 | − * ',' separated list of allowed protocols. | |
| 1785 | − * - encoding: unused | |
| 1786 | − * - decoding: set by user | |
| 1787 | − */ | |
| 1788 | − char *protocol_whitelist; | |
| 1789 | − | |
| 1790 | 1838 | /** |
| 1791 | 1839 | * A callback for opening new IO streams. |
| 1792 | 1840 | * |
| @@ -1810,34 +1858,6 @@ typedef struct AVFormatContext { · 17 unmodified lines | ||
| 1810 | 1858 | int (*io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, |
| 1811 | 1859 | int flags, AVDictionary **options); |
| 1812 | 1860 | |
| 1813 | − /** | |
| 1814 | − * ',' separated list of disallowed protocols. | |
| 1815 | − * - encoding: unused | |
| 1816 | − * - decoding: set by user | |
| 1817 | − */ | |
| 1818 | − char *protocol_blacklist; | |
| 1819 | − | |
| 1820 | − /** | |
| 1821 | − * The maximum number of streams. | |
| 1822 | − * - encoding: unused | |
| 1823 | − * - decoding: set by user | |
| 1824 | − */ | |
| 1825 | − int max_streams; | |
| 1826 | − | |
| 1827 | − /** | |
| 1828 | − * Skip duration calcuation in estimate_timings_from_pts. | |
| 1829 | − * - encoding: unused | |
| 1830 | − * - decoding: set by user | |
| 1831 | − */ | |
| 1832 | − int skip_estimate_duration_from_pts; | |
| 1833 | − | |
| 1834 | − /** | |
| 1835 | − * Maximum number of packets that can be probed | |
| 1836 | − * - encoding: unused | |
| 1837 | − * - decoding: set by user | |
| 1838 | − */ | |
| 1839 | − int max_probe_packets; | |
| 1840 | − | |
| 1841 | 1861 | /** |
| 1842 | 1862 | * A callback for closing the streams opened with AVFormatContext.io_open(). |
| 1843 | 1863 | * |
| @@ -1850,26 +1870,6 @@ typedef struct AVFormatContext { · 6 unmodified lines | ||
| 1850 | 1870 | * @return 0 on success, a negative AVERROR code on failure |
| 1851 | 1871 | */ |
| 1852 | 1872 | int (*io_close2)(struct AVFormatContext *s, AVIOContext *pb); |
| 1853 | − | |
| 1854 | − /** | |
| 1855 | − * Number of elements in AVFormatContext.stream_groups. | |
| 1856 | − * | |
| 1857 | − * Set by avformat_stream_group_create(), must not be modified by any other code. | |
| 1858 | − */ | |
| 1859 | − unsigned int nb_stream_groups; | |
| 1860 | − | |
| 1861 | − /** | |
| 1862 | − * A list of all stream groups in the file. New groups are created with | |
| 1863 | − * avformat_stream_group_create(), and filled with avformat_stream_group_add_stream(). | |
| 1864 | − * | |
| 1865 | − * - demuxing: groups may be created by libavformat in avformat_open_input(). | |
| 1866 | − * If AVFMTCTX_NOHEADER is set in ctx_flags, then new groups may also | |
| 1867 | − * appear in av_read_frame(). | |
| 1868 | − * - muxing: groups may be created by the user before avformat_write_header(). | |
| 1869 | − * | |
| 1870 | − * Freed by libavformat in avformat_free_context(). | |
| 1871 | − */ | |
| 1872 | − AVStreamGroup **stream_groups; | |
| 1873 | 1873 | } AVFormatContext; |
| 1874 | 1874 | |
| 1875 | 1875 | /** |