Commit 554bc4ee authored by wm4's avatar wm4

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.
parent 37330396
...@@ -15,6 +15,11 @@ libavutil: 2015-08-28 ...@@ -15,6 +15,11 @@ libavutil: 2015-08-28
API changes, most recent first: API changes, most recent first:
2017-03-02 - xxxxxxx - lavu 55.47.101, lavc 57.81.102, lavf 57.66.103
Remove requirement to use AVOption or accessors to access certain fields
in AVFrame, AVCodecContext, and AVFormatContext that were previously
documented as "no direct access" allowed.
2017-02-13 - xxxxxxx - lavc 57.80.100 - avcodec.h 2017-02-13 - xxxxxxx - lavc 57.80.100 - avcodec.h
Add AVCodecContext.hw_device_ctx. Add AVCodecContext.hw_device_ctx.
......
...@@ -1680,7 +1680,7 @@ enum AVFieldOrder { ...@@ -1680,7 +1680,7 @@ enum AVFieldOrder {
* New fields can be added to the end with minor version bumps. * New fields can be added to the end with minor version bumps.
* Removal, reordering and changes to existing fields require a major * Removal, reordering and changes to existing fields require a major
* version bump. * version bump.
* Please use AVOptions (av_opt* / av_set/get*()) to access these fields from user * You can use AVOptions (av_opt* / av_set/get*()) to access these fields from user
* applications. * applications.
* The name string for AVOptions options matches the associated command line * The name string for AVOptions options matches the associated command line
* parameter name and can be found in libavcodec/options_table.h * parameter name and can be found in libavcodec/options_table.h
...@@ -2951,8 +2951,8 @@ typedef struct AVCodecContext { ...@@ -2951,8 +2951,8 @@ typedef struct AVCodecContext {
#define FF_DEBUG_MMCO 0x00000800 #define FF_DEBUG_MMCO 0x00000800
#define FF_DEBUG_BUGS 0x00001000 #define FF_DEBUG_BUGS 0x00001000
#if FF_API_DEBUG_MV #if FF_API_DEBUG_MV
#define FF_DEBUG_VIS_QP 0x00002000 ///< only access through AVOptions from outside libavcodec #define FF_DEBUG_VIS_QP 0x00002000
#define FF_DEBUG_VIS_MB_TYPE 0x00004000 ///< only access through AVOptions from outside libavcodec #define FF_DEBUG_VIS_MB_TYPE 0x00004000
#endif #endif
#define FF_DEBUG_BUFFERS 0x00008000 #define FF_DEBUG_BUFFERS 0x00008000
#define FF_DEBUG_THREADS 0x00010000 #define FF_DEBUG_THREADS 0x00010000
...@@ -2962,7 +2962,6 @@ typedef struct AVCodecContext { ...@@ -2962,7 +2962,6 @@ typedef struct AVCodecContext {
#if FF_API_DEBUG_MV #if FF_API_DEBUG_MV
/** /**
* debug * debug
* Code outside libavcodec should access this field using AVOptions
* - encoding: Set by user. * - encoding: Set by user.
* - decoding: Set by user. * - decoding: Set by user.
*/ */
...@@ -3097,8 +3096,6 @@ typedef struct AVCodecContext { ...@@ -3097,8 +3096,6 @@ typedef struct AVCodecContext {
* low resolution decoding, 1-> 1/2 size, 2->1/4 size * low resolution decoding, 1-> 1/2 size, 2->1/4 size
* - encoding: unused * - encoding: unused
* - decoding: Set by user. * - decoding: Set by user.
* Code outside libavcodec should access this field using:
* av_codec_{get,set}_lowres(avctx)
*/ */
int lowres; int lowres;
#endif #endif
...@@ -3399,8 +3396,6 @@ typedef struct AVCodecContext { ...@@ -3399,8 +3396,6 @@ typedef struct AVCodecContext {
/** /**
* Timebase in which pkt_dts/pts and AVPacket.dts/pts are. * Timebase in which pkt_dts/pts and AVPacket.dts/pts are.
* Code outside libavcodec should access this field using:
* av_codec_{get,set}_pkt_timebase(avctx)
* - encoding unused. * - encoding unused.
* - decoding set by user. * - decoding set by user.
*/ */
...@@ -3408,8 +3403,6 @@ typedef struct AVCodecContext { ...@@ -3408,8 +3403,6 @@ typedef struct AVCodecContext {
/** /**
* AVCodecDescriptor * AVCodecDescriptor
* Code outside libavcodec should access this field using:
* av_codec_{get,set}_codec_descriptor(avctx)
* - encoding: unused. * - encoding: unused.
* - decoding: set by libavcodec. * - decoding: set by libavcodec.
*/ */
...@@ -3420,8 +3413,6 @@ typedef struct AVCodecContext { ...@@ -3420,8 +3413,6 @@ typedef struct AVCodecContext {
* low resolution decoding, 1-> 1/2 size, 2->1/4 size * low resolution decoding, 1-> 1/2 size, 2->1/4 size
* - encoding: unused * - encoding: unused
* - decoding: Set by user. * - decoding: Set by user.
* Code outside libavcodec should access this field using:
* av_codec_{get,set}_lowres(avctx)
*/ */
int lowres; int lowres;
#endif #endif
...@@ -3462,7 +3453,6 @@ typedef struct AVCodecContext { ...@@ -3462,7 +3453,6 @@ typedef struct AVCodecContext {
* However for formats that do not use pre-multiplied alpha * However for formats that do not use pre-multiplied alpha
* there might be serious artefacts (though e.g. libswscale currently * there might be serious artefacts (though e.g. libswscale currently
* assumes pre-multiplied alpha anyway). * assumes pre-multiplied alpha anyway).
* Code outside libavcodec should access this field using AVOptions
* *
* - decoding: set by user * - decoding: set by user
* - encoding: unused * - encoding: unused
...@@ -3479,7 +3469,6 @@ typedef struct AVCodecContext { ...@@ -3479,7 +3469,6 @@ typedef struct AVCodecContext {
#if !FF_API_DEBUG_MV #if !FF_API_DEBUG_MV
/** /**
* debug motion vectors * debug motion vectors
* Code outside libavcodec should access this field using AVOptions
* - encoding: Set by user. * - encoding: Set by user.
* - decoding: Set by user. * - decoding: Set by user.
*/ */
...@@ -3491,7 +3480,6 @@ typedef struct AVCodecContext { ...@@ -3491,7 +3480,6 @@ typedef struct AVCodecContext {
/** /**
* custom intra quantization matrix * custom intra quantization matrix
* Code outside libavcodec should access this field using av_codec_g/set_chroma_intra_matrix()
* - encoding: Set by user, can be NULL. * - encoding: Set by user, can be NULL.
* - decoding: unused. * - decoding: unused.
*/ */
...@@ -3500,8 +3488,6 @@ typedef struct AVCodecContext { ...@@ -3500,8 +3488,6 @@ typedef struct AVCodecContext {
/** /**
* dump format separator. * dump format separator.
* can be ", " or "\n " or anything else * can be ", " or "\n " or anything else
* Code outside libavcodec should access this field using AVOptions
* (NO direct access).
* - encoding: Set by user. * - encoding: Set by user.
* - decoding: Set by user. * - decoding: Set by user.
*/ */
...@@ -3511,13 +3497,12 @@ typedef struct AVCodecContext { ...@@ -3511,13 +3497,12 @@ typedef struct AVCodecContext {
* ',' separated list of allowed decoders. * ',' separated list of allowed decoders.
* If NULL then all are allowed * If NULL then all are allowed
* - encoding: unused * - encoding: unused
* - decoding: set by user through AVOPtions (NO direct access) * - decoding: set by user
*/ */
char *codec_whitelist; char *codec_whitelist;
/* /*
* Properties of the stream that gets decoded * Properties of the stream that gets decoded
* To be accessed through av_codec_get_properties() (NO direct access)
* - encoding: unused * - encoding: unused
* - decoding: set by libavcodec * - decoding: set by libavcodec
*/ */
...@@ -3668,7 +3653,7 @@ typedef struct AVCodec { ...@@ -3668,7 +3653,7 @@ typedef struct AVCodec {
const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0 const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1 const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
const uint64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0 const uint64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
uint8_t max_lowres; ///< maximum value for lowres supported by the decoder, no direct access, use av_codec_get_max_lowres() uint8_t max_lowres; ///< maximum value for lowres supported by the decoder
const AVClass *priv_class; ///< AVClass for the private context const AVClass *priv_class; ///< AVClass for the private context
const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN} const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#define LIBAVCODEC_VERSION_MAJOR 57 #define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MINOR 81 #define LIBAVCODEC_VERSION_MINOR 81
#define LIBAVCODEC_VERSION_MICRO 101 #define LIBAVCODEC_VERSION_MICRO 102
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \ LIBAVCODEC_VERSION_MINOR, \
......
...@@ -1649,7 +1649,7 @@ typedef struct AVFormatContext { ...@@ -1649,7 +1649,7 @@ typedef struct AVFormatContext {
/** /**
* Audio preload in microseconds. * Audio preload in microseconds.
* Note, not all formats support this and unpredictable things may happen if it is used when not supported. * Note, not all formats support this and unpredictable things may happen if it is used when not supported.
* - encoding: Set by user via AVOptions (NO direct access) * - encoding: Set by user
* - decoding: unused * - decoding: unused
*/ */
int audio_preload; int audio_preload;
...@@ -1657,7 +1657,7 @@ typedef struct AVFormatContext { ...@@ -1657,7 +1657,7 @@ typedef struct AVFormatContext {
/** /**
* Max chunk time in microseconds. * Max chunk time in microseconds.
* Note, not all formats support this and unpredictable things may happen if it is used when not supported. * Note, not all formats support this and unpredictable things may happen if it is used when not supported.
* - encoding: Set by user via AVOptions (NO direct access) * - encoding: Set by user
* - decoding: unused * - decoding: unused
*/ */
int max_chunk_duration; int max_chunk_duration;
...@@ -1665,7 +1665,7 @@ typedef struct AVFormatContext { ...@@ -1665,7 +1665,7 @@ typedef struct AVFormatContext {
/** /**
* Max chunk size in bytes * Max chunk size in bytes
* Note, not all formats support this and unpredictable things may happen if it is used when not supported. * Note, not all formats support this and unpredictable things may happen if it is used when not supported.
* - encoding: Set by user via AVOptions (NO direct access) * - encoding: Set by user
* - decoding: unused * - decoding: unused
*/ */
int max_chunk_size; int max_chunk_size;
...@@ -1674,14 +1674,14 @@ typedef struct AVFormatContext { ...@@ -1674,14 +1674,14 @@ typedef struct AVFormatContext {
* forces the use of wallclock timestamps as pts/dts of packets * forces the use of wallclock timestamps as pts/dts of packets
* This has undefined results in the presence of B frames. * This has undefined results in the presence of B frames.
* - encoding: unused * - encoding: unused
* - decoding: Set by user via AVOptions (NO direct access) * - decoding: Set by user
*/ */
int use_wallclock_as_timestamps; int use_wallclock_as_timestamps;
/** /**
* avio flags, used to force AVIO_FLAG_DIRECT. * avio flags, used to force AVIO_FLAG_DIRECT.
* - encoding: unused * - encoding: unused
* - decoding: Set by user via AVOptions (NO direct access) * - decoding: Set by user
*/ */
int avio_flags; int avio_flags;
...@@ -1689,34 +1689,34 @@ typedef struct AVFormatContext { ...@@ -1689,34 +1689,34 @@ typedef struct AVFormatContext {
* The duration field can be estimated through various ways, and this field can be used * The duration field can be estimated through various ways, and this field can be used
* to know how the duration was estimated. * to know how the duration was estimated.
* - encoding: unused * - encoding: unused
* - decoding: Read by user via AVOptions (NO direct access) * - decoding: Read by user
*/ */
enum AVDurationEstimationMethod duration_estimation_method; enum AVDurationEstimationMethod duration_estimation_method;
/** /**
* Skip initial bytes when opening stream * Skip initial bytes when opening stream
* - encoding: unused * - encoding: unused
* - decoding: Set by user via AVOptions (NO direct access) * - decoding: Set by user
*/ */
int64_t skip_initial_bytes; int64_t skip_initial_bytes;
/** /**
* Correct single timestamp overflows * Correct single timestamp overflows
* - encoding: unused * - encoding: unused
* - decoding: Set by user via AVOptions (NO direct access) * - decoding: Set by user
*/ */
unsigned int correct_ts_overflow; unsigned int correct_ts_overflow;
/** /**
* Force seeking to any (also non key) frames. * Force seeking to any (also non key) frames.
* - encoding: unused * - encoding: unused
* - decoding: Set by user via AVOptions (NO direct access) * - decoding: Set by user
*/ */
int seek2any; int seek2any;
/** /**
* Flush the I/O context after each packet. * Flush the I/O context after each packet.
* - encoding: Set by user via AVOptions (NO direct access) * - encoding: Set by user
* - decoding: unused * - decoding: unused
*/ */
int flush_packets; int flush_packets;
...@@ -1726,14 +1726,14 @@ typedef struct AVFormatContext { ...@@ -1726,14 +1726,14 @@ typedef struct AVFormatContext {
* The maximal score is AVPROBE_SCORE_MAX, its set when the demuxer probes * The maximal score is AVPROBE_SCORE_MAX, its set when the demuxer probes
* the format. * the format.
* - encoding: unused * - encoding: unused
* - decoding: set by avformat, read by user via av_format_get_probe_score() (NO direct access) * - decoding: set by avformat, read by user
*/ */
int probe_score; int probe_score;
/** /**
* number of bytes to read maximally to identify format. * number of bytes to read maximally to identify format.
* - encoding: unused * - encoding: unused
* - decoding: set by user through AVOPtions (NO direct access) * - decoding: set by user
*/ */
int format_probesize; int format_probesize;
...@@ -1741,7 +1741,7 @@ typedef struct AVFormatContext { ...@@ -1741,7 +1741,7 @@ typedef struct AVFormatContext {
* ',' separated list of allowed decoders. * ',' separated list of allowed decoders.
* If NULL then all are allowed * If NULL then all are allowed
* - encoding: unused * - encoding: unused
* - decoding: set by user through AVOptions (NO direct access) * - decoding: set by user
*/ */
char *codec_whitelist; char *codec_whitelist;
...@@ -1749,7 +1749,7 @@ typedef struct AVFormatContext { ...@@ -1749,7 +1749,7 @@ typedef struct AVFormatContext {
* ',' separated list of allowed demuxers. * ',' separated list of allowed demuxers.
* If NULL then all are allowed * If NULL then all are allowed
* - encoding: unused * - encoding: unused
* - decoding: set by user through AVOptions (NO direct access) * - decoding: set by user
*/ */
char *format_whitelist; char *format_whitelist;
...@@ -1771,7 +1771,7 @@ typedef struct AVFormatContext { ...@@ -1771,7 +1771,7 @@ typedef struct AVFormatContext {
* Forced video codec. * Forced video codec.
* This allows forcing a specific decoder, even when there are multiple with * This allows forcing a specific decoder, even when there are multiple with
* the same codec_id. * the same codec_id.
* Demuxing: Set by user via av_format_set_video_codec (NO direct access). * Demuxing: Set by user
*/ */
AVCodec *video_codec; AVCodec *video_codec;
...@@ -1779,7 +1779,7 @@ typedef struct AVFormatContext { ...@@ -1779,7 +1779,7 @@ typedef struct AVFormatContext {
* Forced audio codec. * Forced audio codec.
* This allows forcing a specific decoder, even when there are multiple with * This allows forcing a specific decoder, even when there are multiple with
* the same codec_id. * the same codec_id.
* Demuxing: Set by user via av_format_set_audio_codec (NO direct access). * Demuxing: Set by user
*/ */
AVCodec *audio_codec; AVCodec *audio_codec;
...@@ -1787,7 +1787,7 @@ typedef struct AVFormatContext { ...@@ -1787,7 +1787,7 @@ typedef struct AVFormatContext {
* Forced subtitle codec. * Forced subtitle codec.
* This allows forcing a specific decoder, even when there are multiple with * This allows forcing a specific decoder, even when there are multiple with
* the same codec_id. * the same codec_id.
* Demuxing: Set by user via av_format_set_subtitle_codec (NO direct access). * Demuxing: Set by user
*/ */
AVCodec *subtitle_codec; AVCodec *subtitle_codec;
...@@ -1795,7 +1795,7 @@ typedef struct AVFormatContext { ...@@ -1795,7 +1795,7 @@ typedef struct AVFormatContext {
* Forced data codec. * Forced data codec.
* This allows forcing a specific decoder, even when there are multiple with * This allows forcing a specific decoder, even when there are multiple with
* the same codec_id. * the same codec_id.
* Demuxing: Set by user via av_format_set_data_codec (NO direct access). * Demuxing: Set by user
*/ */
AVCodec *data_codec; AVCodec *data_codec;
...@@ -1819,15 +1819,13 @@ typedef struct AVFormatContext { ...@@ -1819,15 +1819,13 @@ typedef struct AVFormatContext {
/** /**
* Output timestamp offset, in microseconds. * Output timestamp offset, in microseconds.
* Muxing: set by user via AVOptions (NO direct access) * Muxing: set by user
*/ */
int64_t output_ts_offset; int64_t output_ts_offset;
/** /**
* dump format separator. * dump format separator.
* can be ", " or "\n " or anything else * can be ", " or "\n " or anything else
* Code outside libavformat should access this field using AVOptions
* (NO direct access).
* - muxing: Set by user. * - muxing: Set by user.
* - demuxing: Set by user. * - demuxing: Set by user.
*/ */
...@@ -1864,7 +1862,7 @@ typedef struct AVFormatContext { ...@@ -1864,7 +1862,7 @@ typedef struct AVFormatContext {
/** /**
* ',' separated list of allowed protocols. * ',' separated list of allowed protocols.
* - encoding: unused * - encoding: unused
* - decoding: set by user through AVOptions (NO direct access) * - decoding: set by user
*/ */
char *protocol_whitelist; char *protocol_whitelist;
...@@ -1899,18 +1897,22 @@ typedef struct AVFormatContext { ...@@ -1899,18 +1897,22 @@ typedef struct AVFormatContext {
/** /**
* ',' separated list of disallowed protocols. * ',' separated list of disallowed protocols.
* - encoding: unused * - encoding: unused
* - decoding: set by user through AVOptions (NO direct access) * - decoding: set by user
*/ */
char *protocol_blacklist; char *protocol_blacklist;
/** /**
* The maximum number of streams. * The maximum number of streams.
* - encoding: unused * - encoding: unused
* - decoding: set by user through AVOptions (NO direct access) * - decoding: set by user
*/ */
int max_streams; int max_streams;
} AVFormatContext; } AVFormatContext;
/**
* Accessors for some AVFormatContext fields. These used to be provided for ABI
* compatibility, and do not need to be used anymore.
*/
int av_format_get_probe_score(const AVFormatContext *s); int av_format_get_probe_score(const AVFormatContext *s);
AVCodec * av_format_get_video_codec(const AVFormatContext *s); AVCodec * av_format_get_video_codec(const AVFormatContext *s);
void av_format_set_video_codec(AVFormatContext *s, AVCodec *c); void av_format_set_video_codec(AVFormatContext *s, AVCodec *c);
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
// Also please add any ticket numbers that you believe might be affected here // Also please add any ticket numbers that you believe might be affected here
#define LIBAVFORMAT_VERSION_MAJOR 57 #define LIBAVFORMAT_VERSION_MAJOR 57
#define LIBAVFORMAT_VERSION_MINOR 66 #define LIBAVFORMAT_VERSION_MINOR 66
#define LIBAVFORMAT_VERSION_MICRO 102 #define LIBAVFORMAT_VERSION_MICRO 103
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \ LIBAVFORMAT_VERSION_MINOR, \
......
...@@ -179,9 +179,6 @@ typedef struct AVFrameSideData { ...@@ -179,9 +179,6 @@ typedef struct AVFrameSideData {
* *
* sizeof(AVFrame) is not a part of the public ABI, so new fields may be added * sizeof(AVFrame) is not a part of the public ABI, so new fields may be added
* to the end with a minor bump. * to the end with a minor bump.
* Similarly fields that are marked as to be only accessed by
* av_opt_ptr() can be reordered. This allows 2 forks to add fields
* without breaking compatibility with each other.
* *
* Fields can be accessed through AVOptions, the name string used, matches the * Fields can be accessed through AVOptions, the name string used, matches the
* C structure field name for fields accessible through AVOptions. The AVClass * C structure field name for fields accessible through AVOptions. The AVClass
...@@ -420,8 +417,6 @@ typedef struct AVFrame { ...@@ -420,8 +417,6 @@ typedef struct AVFrame {
/** /**
* MPEG vs JPEG YUV range. * MPEG vs JPEG YUV range.
* It must be accessed using av_frame_get_color_range() and
* av_frame_set_color_range().
* - encoding: Set by user * - encoding: Set by user
* - decoding: Set by libavcodec * - decoding: Set by libavcodec
*/ */
...@@ -433,8 +428,6 @@ typedef struct AVFrame { ...@@ -433,8 +428,6 @@ typedef struct AVFrame {
/** /**
* YUV colorspace type. * YUV colorspace type.
* It must be accessed using av_frame_get_colorspace() and
* av_frame_set_colorspace().
* - encoding: Set by user * - encoding: Set by user
* - decoding: Set by libavcodec * - decoding: Set by libavcodec
*/ */
...@@ -444,8 +437,6 @@ typedef struct AVFrame { ...@@ -444,8 +437,6 @@ typedef struct AVFrame {
/** /**
* frame timestamp estimated using various heuristics, in stream time base * frame timestamp estimated using various heuristics, in stream time base
* Code outside libavutil should access this field using:
* av_frame_get_best_effort_timestamp(frame)
* - encoding: unused * - encoding: unused
* - decoding: set by libavcodec, read by user. * - decoding: set by libavcodec, read by user.
*/ */
...@@ -453,8 +444,6 @@ typedef struct AVFrame { ...@@ -453,8 +444,6 @@ typedef struct AVFrame {
/** /**
* reordered pos from the last AVPacket that has been input into the decoder * reordered pos from the last AVPacket that has been input into the decoder
* Code outside libavutil should access this field using:
* av_frame_get_pkt_pos(frame)
* - encoding: unused * - encoding: unused
* - decoding: Read by user. * - decoding: Read by user.
*/ */
...@@ -463,8 +452,6 @@ typedef struct AVFrame { ...@@ -463,8 +452,6 @@ typedef struct AVFrame {
/** /**
* duration of the corresponding packet, expressed in * duration of the corresponding packet, expressed in
* AVStream->time_base units, 0 if unknown. * AVStream->time_base units, 0 if unknown.
* Code outside libavutil should access this field using:
* av_frame_get_pkt_duration(frame)
* - encoding: unused * - encoding: unused
* - decoding: Read by user. * - decoding: Read by user.
*/ */
...@@ -472,8 +459,6 @@ typedef struct AVFrame { ...@@ -472,8 +459,6 @@ typedef struct AVFrame {
/** /**
* metadata. * metadata.
* Code outside libavutil should access this field using:
* av_frame_get_metadata(frame)
* - encoding: Set by user. * - encoding: Set by user.
* - decoding: Set by libavcodec. * - decoding: Set by libavcodec.
*/ */
...@@ -483,8 +468,6 @@ typedef struct AVFrame { ...@@ -483,8 +468,6 @@ typedef struct AVFrame {
* decode error flags of the frame, set to a combination of * decode error flags of the frame, set to a combination of
* FF_DECODE_ERROR_xxx flags if the decoder produced a frame, but there * FF_DECODE_ERROR_xxx flags if the decoder produced a frame, but there
* were errors during the decoding. * were errors during the decoding.
* Code outside libavutil should access this field using:
* av_frame_get_decode_error_flags(frame)
* - encoding: unused * - encoding: unused
* - decoding: set by libavcodec, read by user. * - decoding: set by libavcodec, read by user.
*/ */
...@@ -494,8 +477,6 @@ typedef struct AVFrame { ...@@ -494,8 +477,6 @@ typedef struct AVFrame {
/** /**
* number of audio channels, only used for audio. * number of audio channels, only used for audio.
* Code outside libavutil should access this field using:
* av_frame_get_channels(frame)
* - encoding: unused * - encoding: unused
* - decoding: Read by user. * - decoding: Read by user.
*/ */
...@@ -503,8 +484,7 @@ typedef struct AVFrame { ...@@ -503,8 +484,7 @@ typedef struct AVFrame {
/** /**
* size of the corresponding packet containing the compressed * size of the corresponding packet containing the compressed
* frame. It must be accessed using av_frame_get_pkt_size() and * frame.
* av_frame_set_pkt_size().
* It is set to a negative value if unknown. * It is set to a negative value if unknown.
* - encoding: unused * - encoding: unused
* - decoding: set by libavcodec, read by user. * - decoding: set by libavcodec, read by user.
...@@ -514,13 +494,11 @@ typedef struct AVFrame { ...@@ -514,13 +494,11 @@ typedef struct AVFrame {
#if FF_API_FRAME_QP #if FF_API_FRAME_QP
/** /**
* QP table * QP table
* Not to be accessed directly from outside libavutil
*/ */
attribute_deprecated attribute_deprecated
int8_t *qscale_table; int8_t *qscale_table;
/** /**
* QP store stride * QP store stride
* Not to be accessed directly from outside libavutil
*/ */
attribute_deprecated attribute_deprecated
int qstride; int qstride;
...@@ -528,9 +506,6 @@ typedef struct AVFrame { ...@@ -528,9 +506,6 @@ typedef struct AVFrame {
attribute_deprecated attribute_deprecated
int qscale_type; int qscale_type;
/**
* Not to be accessed directly from outside libavutil
*/
AVBufferRef *qp_table_buf; AVBufferRef *qp_table_buf;
#endif #endif
/** /**
...@@ -552,9 +527,8 @@ typedef struct AVFrame { ...@@ -552,9 +527,8 @@ typedef struct AVFrame {
} AVFrame; } AVFrame;
/** /**
* Accessors for some AVFrame fields. * Accessors for some AVFrame fields. These used to be provided for ABI
* The position of these field in the structure is not part of the ABI, * compatibility, and do not need to be used anymore.
* they should not be accessed directly outside libavutil.
*/ */
int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame); int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame);
void av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val); void av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val);
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
#define LIBAVUTIL_VERSION_MAJOR 55 #define LIBAVUTIL_VERSION_MAJOR 55
#define LIBAVUTIL_VERSION_MINOR 47 #define LIBAVUTIL_VERSION_MINOR 47
#define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_MICRO 101
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \ LIBAVUTIL_VERSION_MINOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment