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

Unified · Split

7 files
  1. doc/APIchanges +5 −0
  2. libavcodec/avcodec.h +5 −20
  3. libavcodec/version.h +1 −1
  4. libavformat/avformat.h +26 −24
  5. libavformat/version.h +1 −1
  6. libavutil/frame.h +3 −29
  7. libavutil/version.h +1 −1
doc/APIchanges+5−0
@@ -15,6 +15,11 @@ libavutil: 2015-08-28 · 14 unmodified lines
15 15
16API changes, most recent first:16API changes, most recent first:
17 17
182017-03-02 - xxxxxxx - lavu 55.47.101, lavc 57.81.102, lavf 57.66.103
19 Remove requirement to use AVOption or accessors to access certain fields
20 in AVFrame, AVCodecContext, and AVFormatContext that were previously
21 documented as "no direct access" allowed.
22
182017-02-13 - xxxxxxx - lavc 57.80.100 - avcodec.h232017-02-13 - xxxxxxx - lavc 57.80.100 - avcodec.h
19 Add AVCodecContext.hw_device_ctx.24 Add AVCodecContext.hw_device_ctx.
20 25
libavcodec/avcodec.h+5−20
@@ -1680,7 +1680,7 @@ enum AVFieldOrder { · 1679 unmodified lines
1680 * New fields can be added to the end with minor version bumps.1680 * New fields can be added to the end with minor version bumps.
1681 * Removal, reordering and changes to existing fields require a major1681 * Removal, reordering and changes to existing fields require a major
1682 * version bump.1682 * version bump.
1683 * Please use AVOptions (av_opt* / av_set/get*()) to access these fields from user1683 * You can use AVOptions (av_opt* / av_set/get*()) to access these fields from user
1684 * applications.1684 * applications.
1685 * The name string for AVOptions options matches the associated command line1685 * The name string for AVOptions options matches the associated command line
1686 * parameter name and can be found in libavcodec/options_table.h1686 * parameter name and can be found in libavcodec/options_table.h
@@ -2951,8 +2951,8 @@ typedef struct AVCodecContext { · 1264 unmodified lines
2951#define FF_DEBUG_MMCO 0x000008002951#define FF_DEBUG_MMCO 0x00000800
2952#define FF_DEBUG_BUGS 0x000010002952#define FF_DEBUG_BUGS 0x00001000
2953#if FF_API_DEBUG_MV2953#if FF_API_DEBUG_MV
2954#define FF_DEBUG_VIS_QP 0x00002000 ///< only access through AVOptions from outside libavcodec2954#define FF_DEBUG_VIS_QP 0x00002000
2955#define FF_DEBUG_VIS_MB_TYPE 0x00004000 ///< only access through AVOptions from outside libavcodec2955#define FF_DEBUG_VIS_MB_TYPE 0x00004000
2956#endif2956#endif
2957#define FF_DEBUG_BUFFERS 0x000080002957#define FF_DEBUG_BUFFERS 0x00008000
2958#define FF_DEBUG_THREADS 0x000100002958#define FF_DEBUG_THREADS 0x00010000
@@ -2962,7 +2962,6 @@ typedef struct AVCodecContext { · 3 unmodified lines
2962#if FF_API_DEBUG_MV2962#if FF_API_DEBUG_MV
2963 /**2963 /**
2964 * debug2964 * debug
2965 * Code outside libavcodec should access this field using AVOptions
2966 * - encoding: Set by user.2965 * - encoding: Set by user.
2967 * - decoding: Set by user.2966 * - decoding: Set by user.
2968 */2967 */
@@ -3097,8 +3096,6 @@ typedef struct AVCodecContext { · 128 unmodified lines
3097 * low resolution decoding, 1-> 1/2 size, 2->1/4 size3096 * low resolution decoding, 1-> 1/2 size, 2->1/4 size
3098 * - encoding: unused3097 * - encoding: unused
3099 * - decoding: Set by user.3098 * - decoding: Set by user.
3100 * Code outside libavcodec should access this field using:
3101 * av_codec_{get,set}_lowres(avctx)
3102 */3099 */
3103 int lowres;3100 int lowres;
3104#endif3101#endif
@@ -3399,8 +3396,6 @@ typedef struct AVCodecContext { · 294 unmodified lines
3399 3396
3400 /**3397 /**
3401 * Timebase in which pkt_dts/pts and AVPacket.dts/pts are.3398 * Timebase in which pkt_dts/pts and AVPacket.dts/pts are.
3402 * Code outside libavcodec should access this field using:
3403 * av_codec_{get,set}_pkt_timebase(avctx)
3404 * - encoding unused.3399 * - encoding unused.
3405 * - decoding set by user.3400 * - decoding set by user.
3406 */3401 */
@@ -3408,8 +3403,6 @@ typedef struct AVCodecContext { · 1 unmodified line
3408 3403
3409 /**3404 /**
3410 * AVCodecDescriptor3405 * AVCodecDescriptor
3411 * Code outside libavcodec should access this field using:
3412 * av_codec_{get,set}_codec_descriptor(avctx)
3413 * - encoding: unused.3406 * - encoding: unused.
3414 * - decoding: set by libavcodec.3407 * - decoding: set by libavcodec.
3415 */3408 */
@@ -3420,8 +3413,6 @@ typedef struct AVCodecContext { · 4 unmodified lines
3420 * low resolution decoding, 1-> 1/2 size, 2->1/4 size3413 * low resolution decoding, 1-> 1/2 size, 2->1/4 size
3421 * - encoding: unused3414 * - encoding: unused
3422 * - decoding: Set by user.3415 * - decoding: Set by user.
3423 * Code outside libavcodec should access this field using:
3424 * av_codec_{get,set}_lowres(avctx)
3425 */3416 */
3426 int lowres;3417 int lowres;
3427#endif3418#endif
@@ -3462,7 +3453,6 @@ typedef struct AVCodecContext { · 34 unmodified lines
3462 * However for formats that do not use pre-multiplied alpha3453 * However for formats that do not use pre-multiplied alpha
3463 * there might be serious artefacts (though e.g. libswscale currently3454 * there might be serious artefacts (though e.g. libswscale currently
3464 * assumes pre-multiplied alpha anyway).3455 * assumes pre-multiplied alpha anyway).
3465 * Code outside libavcodec should access this field using AVOptions
3466 *3456 *
3467 * - decoding: set by user3457 * - decoding: set by user
3468 * - encoding: unused3458 * - encoding: unused
@@ -3479,7 +3469,6 @@ typedef struct AVCodecContext { · 10 unmodified lines
3479#if !FF_API_DEBUG_MV3469#if !FF_API_DEBUG_MV
3480 /**3470 /**
3481 * debug motion vectors3471 * debug motion vectors
3482 * Code outside libavcodec should access this field using AVOptions
3483 * - encoding: Set by user.3472 * - encoding: Set by user.
3484 * - decoding: Set by user.3473 * - decoding: Set by user.
3485 */3474 */
@@ -3491,7 +3480,6 @@ typedef struct AVCodecContext { · 5 unmodified lines
3491 3480
3492 /**3481 /**
3493 * custom intra quantization matrix3482 * custom intra quantization matrix
3494 * Code outside libavcodec should access this field using av_codec_g/set_chroma_intra_matrix()
3495 * - encoding: Set by user, can be NULL.3483 * - encoding: Set by user, can be NULL.
3496 * - decoding: unused.3484 * - decoding: unused.
3497 */3485 */
@@ -3500,8 +3488,6 @@ typedef struct AVCodecContext { · 2 unmodified lines
3500 /**3488 /**
3501 * dump format separator.3489 * dump format separator.
3502 * can be ", " or "\n " or anything else3490 * can be ", " or "\n " or anything else
3503 * Code outside libavcodec should access this field using AVOptions
3504 * (NO direct access).
3505 * - encoding: Set by user.3491 * - encoding: Set by user.
3506 * - decoding: Set by user.3492 * - decoding: Set by user.
3507 */3493 */
@@ -3511,13 +3497,12 @@ typedef struct AVCodecContext { · 3 unmodified lines
3511 * ',' separated list of allowed decoders.3497 * ',' separated list of allowed decoders.
3512 * If NULL then all are allowed3498 * If NULL then all are allowed
3513 * - encoding: unused3499 * - encoding: unused
3514 * - decoding: set by user through AVOPtions (NO direct access)3500 * - decoding: set by user
3515 */3501 */
3516 char *codec_whitelist;3502 char *codec_whitelist;
3517 3503
3518 /*3504 /*
3519 * Properties of the stream that gets decoded3505 * Properties of the stream that gets decoded
3520 * To be accessed through av_codec_get_properties() (NO direct access)
3521 * - encoding: unused3506 * - encoding: unused
3522 * - decoding: set by libavcodec3507 * - decoding: set by libavcodec
3523 */3508 */
@@ -3668,7 +3653,7 @@ typedef struct AVCodec { · 144 unmodified lines
3668 const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 03653 const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
3669 const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -13654 const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
3670 const uint64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 03655 const uint64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
3671 uint8_t max_lowres; ///< maximum value for lowres supported by the decoder, no direct access, use av_codec_get_max_lowres()3656 uint8_t max_lowres; ///< maximum value for lowres supported by the decoder
3672 const AVClass *priv_class; ///< AVClass for the private context3657 const AVClass *priv_class; ///< AVClass for the private context
3673 const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}3658 const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
3674 3659
libavcodec/version.h+1−1
@@ -29,7 +29,7 @@ · 28 unmodified lines
29 29
30#define LIBAVCODEC_VERSION_MAJOR 5730#define LIBAVCODEC_VERSION_MAJOR 57
31#define LIBAVCODEC_VERSION_MINOR 8131#define LIBAVCODEC_VERSION_MINOR 81
32#define LIBAVCODEC_VERSION_MICRO 10132#define LIBAVCODEC_VERSION_MICRO 102
33 33
34#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \34#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
35 LIBAVCODEC_VERSION_MINOR, \35 LIBAVCODEC_VERSION_MINOR, \
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, \
libavutil/frame.h+3−29
@@ -179,9 +179,6 @@ typedef struct AVFrameSideData { · 178 unmodified lines
179 *179 *
180 * sizeof(AVFrame) is not a part of the public ABI, so new fields may be added180 * sizeof(AVFrame) is not a part of the public ABI, so new fields may be added
181 * to the end with a minor bump.181 * to the end with a minor bump.
182 * Similarly fields that are marked as to be only accessed by
183 * av_opt_ptr() can be reordered. This allows 2 forks to add fields
184 * without breaking compatibility with each other.
185 *182 *
186 * Fields can be accessed through AVOptions, the name string used, matches the183 * Fields can be accessed through AVOptions, the name string used, matches the
187 * C structure field name for fields accessible through AVOptions. The AVClass184 * C structure field name for fields accessible through AVOptions. The AVClass
@@ -420,8 +417,6 @@ typedef struct AVFrame { · 232 unmodified lines
420 417
421 /**418 /**
422 * MPEG vs JPEG YUV range.419 * MPEG vs JPEG YUV range.
423 * It must be accessed using av_frame_get_color_range() and
424 * av_frame_set_color_range().
425 * - encoding: Set by user420 * - encoding: Set by user
426 * - decoding: Set by libavcodec421 * - decoding: Set by libavcodec
427 */422 */
@@ -433,8 +428,6 @@ typedef struct AVFrame { · 5 unmodified lines
433 428
434 /**429 /**
435 * YUV colorspace type.430 * YUV colorspace type.
436 * It must be accessed using av_frame_get_colorspace() and
437 * av_frame_set_colorspace().
438 * - encoding: Set by user431 * - encoding: Set by user
439 * - decoding: Set by libavcodec432 * - decoding: Set by libavcodec
440 */433 */
@@ -444,8 +437,6 @@ typedef struct AVFrame { · 3 unmodified lines
444 437
445 /**438 /**
446 * frame timestamp estimated using various heuristics, in stream time base439 * frame timestamp estimated using various heuristics, in stream time base
447 * Code outside libavutil should access this field using:
448 * av_frame_get_best_effort_timestamp(frame)
449 * - encoding: unused440 * - encoding: unused
450 * - decoding: set by libavcodec, read by user.441 * - decoding: set by libavcodec, read by user.
451 */442 */
@@ -453,8 +444,6 @@ typedef struct AVFrame { · 1 unmodified line
453 444
454 /**445 /**
455 * reordered pos from the last AVPacket that has been input into the decoder446 * reordered pos from the last AVPacket that has been input into the decoder
456 * Code outside libavutil should access this field using:
457 * av_frame_get_pkt_pos(frame)
458 * - encoding: unused447 * - encoding: unused
459 * - decoding: Read by user.448 * - decoding: Read by user.
460 */449 */
@@ -463,8 +452,6 @@ typedef struct AVFrame { · 2 unmodified lines
463 /**452 /**
464 * duration of the corresponding packet, expressed in453 * duration of the corresponding packet, expressed in
465 * AVStream->time_base units, 0 if unknown.454 * AVStream->time_base units, 0 if unknown.
466 * Code outside libavutil should access this field using:
467 * av_frame_get_pkt_duration(frame)
468 * - encoding: unused455 * - encoding: unused
469 * - decoding: Read by user.456 * - decoding: Read by user.
470 */457 */
@@ -472,8 +459,6 @@ typedef struct AVFrame { · 1 unmodified line
472 459
473 /**460 /**
474 * metadata.461 * metadata.
475 * Code outside libavutil should access this field using:
476 * av_frame_get_metadata(frame)
477 * - encoding: Set by user.462 * - encoding: Set by user.
478 * - decoding: Set by libavcodec.463 * - decoding: Set by libavcodec.
479 */464 */
@@ -483,8 +468,6 @@ typedef struct AVFrame { · 3 unmodified lines
483 * decode error flags of the frame, set to a combination of468 * decode error flags of the frame, set to a combination of
484 * FF_DECODE_ERROR_xxx flags if the decoder produced a frame, but there469 * FF_DECODE_ERROR_xxx flags if the decoder produced a frame, but there
485 * were errors during the decoding.470 * were errors during the decoding.
486 * Code outside libavutil should access this field using:
487 * av_frame_get_decode_error_flags(frame)
488 * - encoding: unused471 * - encoding: unused
489 * - decoding: set by libavcodec, read by user.472 * - decoding: set by libavcodec, read by user.
490 */473 */
@@ -494,8 +477,6 @@ typedef struct AVFrame { · 3 unmodified lines
494 477
495 /**478 /**
496 * number of audio channels, only used for audio.479 * number of audio channels, only used for audio.
497 * Code outside libavutil should access this field using:
498 * av_frame_get_channels(frame)
499 * - encoding: unused480 * - encoding: unused
500 * - decoding: Read by user.481 * - decoding: Read by user.
501 */482 */
@@ -503,8 +484,7 @@ typedef struct AVFrame { · 1 unmodified line
503 484
504 /**485 /**
505 * size of the corresponding packet containing the compressed486 * size of the corresponding packet containing the compressed
506 * frame. It must be accessed using av_frame_get_pkt_size() and487 * frame.
507 * av_frame_set_pkt_size().
508 * It is set to a negative value if unknown.488 * It is set to a negative value if unknown.
509 * - encoding: unused489 * - encoding: unused
510 * - decoding: set by libavcodec, read by user.490 * - decoding: set by libavcodec, read by user.
@@ -514,13 +494,11 @@ typedef struct AVFrame { · 3 unmodified lines
514#if FF_API_FRAME_QP494#if FF_API_FRAME_QP
515 /**495 /**
516 * QP table496 * QP table
517 * Not to be accessed directly from outside libavutil
518 */497 */
519 attribute_deprecated498 attribute_deprecated
520 int8_t *qscale_table;499 int8_t *qscale_table;
521 /**500 /**
522 * QP store stride501 * QP store stride
523 * Not to be accessed directly from outside libavutil
524 */502 */
525 attribute_deprecated503 attribute_deprecated
526 int qstride;504 int qstride;
@@ -528,9 +506,6 @@ typedef struct AVFrame { · 1 unmodified line
528 attribute_deprecated506 attribute_deprecated
529 int qscale_type;507 int qscale_type;
530 508
531 /**
532 * Not to be accessed directly from outside libavutil
533 */
534 AVBufferRef *qp_table_buf;509 AVBufferRef *qp_table_buf;
535#endif510#endif
536 /**511 /**
@@ -552,9 +527,8 @@ typedef struct AVFrame { · 15 unmodified lines
552} AVFrame;527} AVFrame;
553 528
554/**529/**
555 * Accessors for some AVFrame fields.530 * Accessors for some AVFrame fields. These used to be provided for ABI
556 * The position of these field in the structure is not part of the ABI,531 * compatibility, and do not need to be used anymore.
557 * they should not be accessed directly outside libavutil.
558 */532 */
559int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame);533int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame);
560void av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val);534void av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val);
libavutil/version.h+1−1
@@ -80,7 +80,7 @@ · 79 unmodified lines
80 80
81#define LIBAVUTIL_VERSION_MAJOR 5581#define LIBAVUTIL_VERSION_MAJOR 55
82#define LIBAVUTIL_VERSION_MINOR 4782#define LIBAVUTIL_VERSION_MINOR 47
83#define LIBAVUTIL_VERSION_MICRO 10083#define LIBAVUTIL_VERSION_MICRO 101
84 84
85#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \85#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
86 LIBAVUTIL_VERSION_MINOR, \86 LIBAVUTIL_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