History

avcodec, avutil, avformat: remove AVOption requirement for some fields

Allow all struct fields to be accessed directly, as long as they're public. Before this change, many fields were "public", but could be accessed via AVOption only. This meant they were effectively not public, but were present for documentation purposes, which was incredibly confusing at best.

wm4 committed 9 years ago

Commit 554bc4e1 parent 37330397 files · +42 −76Browse files

Showing the changes to libavformat (2 of 7 files). Show all

Unified · Split

2 files
  1. libavformat/avformat.h +26 −24
  2. libavformat/version.h +1 −1
libavformat/avformat.h+26−24
@@ -1649,7 +1649,7 @@ typedef struct AVFormatContext { · 1648 unmodified lines
1649 /**1649 /**
1650 * Audio preload in microseconds.1650 * Audio preload in microseconds.
1651 * Note, not all formats support this and unpredictable things may happen if it is used when not supported.1651 * Note, not all formats support this and unpredictable things may happen if it is used when not supported.
1652 * - encoding: Set by user via AVOptions (NO direct access)1652 * - encoding: Set by user
1653 * - decoding: unused1653 * - decoding: unused
1654 */1654 */
1655 int audio_preload;1655 int audio_preload;
@@ -1657,7 +1657,7 @@ typedef struct AVFormatContext { · 1 unmodified line
1657 /**1657 /**
1658 * Max chunk time in microseconds.1658 * Max chunk time in microseconds.
1659 * Note, not all formats support this and unpredictable things may happen if it is used when not supported.1659 * Note, not all formats support this and unpredictable things may happen if it is used when not supported.
1660 * - encoding: Set by user via AVOptions (NO direct access)1660 * - encoding: Set by user
1661 * - decoding: unused1661 * - decoding: unused
1662 */1662 */
1663 int max_chunk_duration;1663 int max_chunk_duration;
@@ -1665,7 +1665,7 @@ typedef struct AVFormatContext { · 1 unmodified line
1665 /**1665 /**
1666 * Max chunk size in bytes1666 * Max chunk size in bytes
1667 * Note, not all formats support this and unpredictable things may happen if it is used when not supported.1667 * Note, not all formats support this and unpredictable things may happen if it is used when not supported.
1668 * - encoding: Set by user via AVOptions (NO direct access)1668 * - encoding: Set by user
1669 * - decoding: unused1669 * - decoding: unused
1670 */1670 */
1671 int max_chunk_size;1671 int max_chunk_size;
@@ -1674,14 +1674,14 @@ typedef struct AVFormatContext { · 2 unmodified lines
1674 * forces the use of wallclock timestamps as pts/dts of packets1674 * forces the use of wallclock timestamps as pts/dts of packets
1675 * This has undefined results in the presence of B frames.1675 * This has undefined results in the presence of B frames.
1676 * - encoding: unused1676 * - encoding: unused
1677 * - decoding: Set by user via AVOptions (NO direct access)1677 * - decoding: Set by user
1678 */1678 */
1679 int use_wallclock_as_timestamps;1679 int use_wallclock_as_timestamps;
1680 1680
1681 /**1681 /**
1682 * avio flags, used to force AVIO_FLAG_DIRECT.1682 * avio flags, used to force AVIO_FLAG_DIRECT.
1683 * - encoding: unused1683 * - encoding: unused
1684 * - decoding: Set by user via AVOptions (NO direct access)1684 * - decoding: Set by user
1685 */1685 */
1686 int avio_flags;1686 int avio_flags;
1687 1687
@@ -1689,34 +1689,34 @@ typedef struct AVFormatContext { · 1 unmodified line
1689 * The duration field can be estimated through various ways, and this field can be used1689 * The duration field can be estimated through various ways, and this field can be used
1690 * to know how the duration was estimated.1690 * to know how the duration was estimated.
1691 * - encoding: unused1691 * - encoding: unused
1692 * - decoding: Read by user via AVOptions (NO direct access)1692 * - decoding: Read by user
1693 */1693 */
1694 enum AVDurationEstimationMethod duration_estimation_method;1694 enum AVDurationEstimationMethod duration_estimation_method;
1695 1695
1696 /**1696 /**
1697 * Skip initial bytes when opening stream1697 * Skip initial bytes when opening stream
1698 * - encoding: unused1698 * - encoding: unused
1699 * - decoding: Set by user via AVOptions (NO direct access)1699 * - decoding: Set by user
1700 */1700 */
1701 int64_t skip_initial_bytes;1701 int64_t skip_initial_bytes;
1702 1702
1703 /**1703 /**
1704 * Correct single timestamp overflows1704 * Correct single timestamp overflows
1705 * - encoding: unused1705 * - encoding: unused
1706 * - decoding: Set by user via AVOptions (NO direct access)1706 * - decoding: Set by user
1707 */1707 */
1708 unsigned int correct_ts_overflow;1708 unsigned int correct_ts_overflow;
1709 1709
1710 /**1710 /**
1711 * Force seeking to any (also non key) frames.1711 * Force seeking to any (also non key) frames.
1712 * - encoding: unused1712 * - encoding: unused
1713 * - decoding: Set by user via AVOptions (NO direct access)1713 * - decoding: Set by user
1714 */1714 */
1715 int seek2any;1715 int seek2any;
1716 1716
1717 /**1717 /**
1718 * Flush the I/O context after each packet.1718 * Flush the I/O context after each packet.
1719 * - encoding: Set by user via AVOptions (NO direct access)1719 * - encoding: Set by user
1720 * - decoding: unused1720 * - decoding: unused
1721 */1721 */
1722 int flush_packets;1722 int flush_packets;
@@ -1726,14 +1726,14 @@ typedef struct AVFormatContext { · 3 unmodified lines
1726 * The maximal score is AVPROBE_SCORE_MAX, its set when the demuxer probes1726 * The maximal score is AVPROBE_SCORE_MAX, its set when the demuxer probes
1727 * the format.1727 * the format.
1728 * - encoding: unused1728 * - encoding: unused
1729 * - decoding: set by avformat, read by user via av_format_get_probe_score() (NO direct access)1729 * - decoding: set by avformat, read by user
1730 */1730 */
1731 int probe_score;1731 int probe_score;
1732 1732
1733 /**1733 /**
1734 * number of bytes to read maximally to identify format.1734 * number of bytes to read maximally to identify format.
1735 * - encoding: unused1735 * - encoding: unused
1736 * - decoding: set by user through AVOPtions (NO direct access)1736 * - decoding: set by user
1737 */1737 */
1738 int format_probesize;1738 int format_probesize;
1739 1739
@@ -1741,7 +1741,7 @@ typedef struct AVFormatContext { · 1 unmodified line
1741 * ',' separated list of allowed decoders.1741 * ',' separated list of allowed decoders.
1742 * If NULL then all are allowed1742 * If NULL then all are allowed
1743 * - encoding: unused1743 * - encoding: unused
1744 * - decoding: set by user through AVOptions (NO direct access)1744 * - decoding: set by user
1745 */1745 */
1746 char *codec_whitelist;1746 char *codec_whitelist;
1747 1747
@@ -1749,7 +1749,7 @@ typedef struct AVFormatContext { · 1 unmodified line
1749 * ',' separated list of allowed demuxers.1749 * ',' separated list of allowed demuxers.
1750 * If NULL then all are allowed1750 * If NULL then all are allowed
1751 * - encoding: unused1751 * - encoding: unused
1752 * - decoding: set by user through AVOptions (NO direct access)1752 * - decoding: set by user
1753 */1753 */
1754 char *format_whitelist;1754 char *format_whitelist;
1755 1755
@@ -1771,7 +1771,7 @@ typedef struct AVFormatContext { · 15 unmodified lines
1771 * Forced video codec.1771 * Forced video codec.
1772 * This allows forcing a specific decoder, even when there are multiple with1772 * This allows forcing a specific decoder, even when there are multiple with
1773 * the same codec_id.1773 * the same codec_id.
1774 * Demuxing: Set by user via av_format_set_video_codec (NO direct access).1774 * Demuxing: Set by user
1775 */1775 */
1776 AVCodec *video_codec;1776 AVCodec *video_codec;
1777 1777
@@ -1779,7 +1779,7 @@ typedef struct AVFormatContext { · 1 unmodified line
1779 * Forced audio codec.1779 * Forced audio codec.
1780 * This allows forcing a specific decoder, even when there are multiple with1780 * This allows forcing a specific decoder, even when there are multiple with
1781 * the same codec_id.1781 * the same codec_id.
1782 * Demuxing: Set by user via av_format_set_audio_codec (NO direct access).1782 * Demuxing: Set by user
1783 */1783 */
1784 AVCodec *audio_codec;1784 AVCodec *audio_codec;
1785 1785
@@ -1787,7 +1787,7 @@ typedef struct AVFormatContext { · 1 unmodified line
1787 * Forced subtitle codec.1787 * Forced subtitle codec.
1788 * This allows forcing a specific decoder, even when there are multiple with1788 * This allows forcing a specific decoder, even when there are multiple with
1789 * the same codec_id.1789 * the same codec_id.
1790 * Demuxing: Set by user via av_format_set_subtitle_codec (NO direct access).1790 * Demuxing: Set by user
1791 */1791 */
1792 AVCodec *subtitle_codec;1792 AVCodec *subtitle_codec;
1793 1793
@@ -1795,7 +1795,7 @@ typedef struct AVFormatContext { · 1 unmodified line
1795 * Forced data codec.1795 * Forced data codec.
1796 * This allows forcing a specific decoder, even when there are multiple with1796 * This allows forcing a specific decoder, even when there are multiple with
1797 * the same codec_id.1797 * the same codec_id.
1798 * Demuxing: Set by user via av_format_set_data_codec (NO direct access).1798 * Demuxing: Set by user
1799 */1799 */
1800 AVCodec *data_codec;1800 AVCodec *data_codec;
1801 1801
@@ -1819,15 +1819,13 @@ typedef struct AVFormatContext { · 17 unmodified lines
1819 1819
1820 /**1820 /**
1821 * Output timestamp offset, in microseconds.1821 * Output timestamp offset, in microseconds.
1822 * Muxing: set by user via AVOptions (NO direct access)1822 * Muxing: set by user
1823 */1823 */
1824 int64_t output_ts_offset;1824 int64_t output_ts_offset;
1825 1825
1826 /**1826 /**
1827 * dump format separator.1827 * dump format separator.
1828 * can be ", " or "\n " or anything else1828 * can be ", " or "\n " or anything else
1829 * Code outside libavformat should access this field using AVOptions
1830 * (NO direct access).
1831 * - muxing: Set by user.1829 * - muxing: Set by user.
1832 * - demuxing: Set by user.1830 * - demuxing: Set by user.
1833 */1831 */
@@ -1864,7 +1862,7 @@ typedef struct AVFormatContext { · 30 unmodified lines
1864 /**1862 /**
1865 * ',' separated list of allowed protocols.1863 * ',' separated list of allowed protocols.
1866 * - encoding: unused1864 * - encoding: unused
1867 * - decoding: set by user through AVOptions (NO direct access)1865 * - decoding: set by user
1868 */1866 */
1869 char *protocol_whitelist;1867 char *protocol_whitelist;
1870 1868
@@ -1899,18 +1897,22 @@ typedef struct AVFormatContext { · 28 unmodified lines
1899 /**1897 /**
1900 * ',' separated list of disallowed protocols.1898 * ',' separated list of disallowed protocols.
1901 * - encoding: unused1899 * - encoding: unused
1902 * - decoding: set by user through AVOptions (NO direct access)1900 * - decoding: set by user
1903 */1901 */
1904 char *protocol_blacklist;1902 char *protocol_blacklist;
1905 1903
1906 /**1904 /**
1907 * The maximum number of streams.1905 * The maximum number of streams.
1908 * - encoding: unused1906 * - encoding: unused
1909 * - decoding: set by user through AVOptions (NO direct access)1907 * - decoding: set by user
1910 */1908 */
1911 int max_streams;1909 int max_streams;
1912} AVFormatContext;1910} AVFormatContext;
1913 1911
1912/**
1913 * Accessors for some AVFormatContext fields. These used to be provided for ABI
1914 * compatibility, and do not need to be used anymore.
1915 */
1914int av_format_get_probe_score(const AVFormatContext *s);1916int av_format_get_probe_score(const AVFormatContext *s);
1915AVCodec * av_format_get_video_codec(const AVFormatContext *s);1917AVCodec * av_format_get_video_codec(const AVFormatContext *s);
1916void av_format_set_video_codec(AVFormatContext *s, AVCodec *c);1918void av_format_set_video_codec(AVFormatContext *s, AVCodec *c);
libavformat/version.h+1−1
@@ -33,7 +33,7 @@ · 32 unmodified lines
33// Also please add any ticket numbers that you believe might be affected here33// Also please add any ticket numbers that you believe might be affected here
34#define LIBAVFORMAT_VERSION_MAJOR 5734#define LIBAVFORMAT_VERSION_MAJOR 57
35#define LIBAVFORMAT_VERSION_MINOR 6635#define LIBAVFORMAT_VERSION_MINOR 66
36#define LIBAVFORMAT_VERSION_MICRO 10236#define LIBAVFORMAT_VERSION_MICRO 103
37 37
38#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \38#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
39 LIBAVFORMAT_VERSION_MINOR, \39 LIBAVFORMAT_VERSION_MINOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t