summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2017-02-13 11:40:22 +0100
committerwm4 <nfxjfg@googlemail.com>2017-03-02 10:32:12 +0100
commit554bc4eea8aa71d5c017289a036b49313882f7e6 (patch)
tree4eb93a93845ae7f910a56dcf891e74e90b1ab477 /libavformat
parent3733039610d76231e404ebf089f0ff2b9d8e5490 (diff)
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.
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avformat.h50
-rw-r--r--libavformat/version.h2
2 files changed, 27 insertions, 25 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index ebb0e05c04..64180bca9e 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1649,7 +1649,7 @@ typedef struct AVFormatContext {
/**
* Audio preload in microseconds.
* 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
*/
int audio_preload;
@@ -1657,7 +1657,7 @@ typedef struct AVFormatContext {
/**
* Max chunk time in microseconds.
* 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
*/
int max_chunk_duration;
@@ -1665,7 +1665,7 @@ typedef struct AVFormatContext {
/**
* Max chunk size in bytes
* 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
*/
int max_chunk_size;
@@ -1674,14 +1674,14 @@ typedef struct AVFormatContext {
* forces the use of wallclock timestamps as pts/dts of packets
* This has undefined results in the presence of B frames.
* - encoding: unused
- * - decoding: Set by user via AVOptions (NO direct access)
+ * - decoding: Set by user
*/
int use_wallclock_as_timestamps;
/**
* avio flags, used to force AVIO_FLAG_DIRECT.
* - encoding: unused
- * - decoding: Set by user via AVOptions (NO direct access)
+ * - decoding: Set by user
*/
int avio_flags;
@@ -1689,34 +1689,34 @@ typedef struct AVFormatContext {
* The duration field can be estimated through various ways, and this field can be used
* to know how the duration was estimated.
* - encoding: unused
- * - decoding: Read by user via AVOptions (NO direct access)
+ * - decoding: Read by user
*/
enum AVDurationEstimationMethod duration_estimation_method;
/**
* Skip initial bytes when opening stream
* - encoding: unused
- * - decoding: Set by user via AVOptions (NO direct access)
+ * - decoding: Set by user
*/
int64_t skip_initial_bytes;
/**
* Correct single timestamp overflows
* - encoding: unused
- * - decoding: Set by user via AVOptions (NO direct access)
+ * - decoding: Set by user
*/
unsigned int correct_ts_overflow;
/**
* Force seeking to any (also non key) frames.
* - encoding: unused
- * - decoding: Set by user via AVOptions (NO direct access)
+ * - decoding: Set by user
*/
int seek2any;
/**
* Flush the I/O context after each packet.
- * - encoding: Set by user via AVOptions (NO direct access)
+ * - encoding: Set by user
* - decoding: unused
*/
int flush_packets;
@@ -1726,14 +1726,14 @@ typedef struct AVFormatContext {
* The maximal score is AVPROBE_SCORE_MAX, its set when the demuxer probes
* the format.
* - 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;
/**
* number of bytes to read maximally to identify format.
* - encoding: unused
- * - decoding: set by user through AVOPtions (NO direct access)
+ * - decoding: set by user
*/
int format_probesize;
@@ -1741,7 +1741,7 @@ typedef struct AVFormatContext {
* ',' separated list of allowed decoders.
* If NULL then all are allowed
* - encoding: unused
- * - decoding: set by user through AVOptions (NO direct access)
+ * - decoding: set by user
*/
char *codec_whitelist;
@@ -1749,7 +1749,7 @@ typedef struct AVFormatContext {
* ',' separated list of allowed demuxers.
* If NULL then all are allowed
* - encoding: unused
- * - decoding: set by user through AVOptions (NO direct access)
+ * - decoding: set by user
*/
char *format_whitelist;
@@ -1771,7 +1771,7 @@ typedef struct AVFormatContext {
* Forced video codec.
* This allows forcing a specific decoder, even when there are multiple with
* the same codec_id.
- * Demuxing: Set by user via av_format_set_video_codec (NO direct access).
+ * Demuxing: Set by user
*/
AVCodec *video_codec;
@@ -1779,7 +1779,7 @@ typedef struct AVFormatContext {
* Forced audio codec.
* This allows forcing a specific decoder, even when there are multiple with
* the same codec_id.
- * Demuxing: Set by user via av_format_set_audio_codec (NO direct access).
+ * Demuxing: Set by user
*/
AVCodec *audio_codec;
@@ -1787,7 +1787,7 @@ typedef struct AVFormatContext {
* Forced subtitle codec.
* This allows forcing a specific decoder, even when there are multiple with
* the same codec_id.
- * Demuxing: Set by user via av_format_set_subtitle_codec (NO direct access).
+ * Demuxing: Set by user
*/
AVCodec *subtitle_codec;
@@ -1795,7 +1795,7 @@ typedef struct AVFormatContext {
* Forced data codec.
* This allows forcing a specific decoder, even when there are multiple with
* the same codec_id.
- * Demuxing: Set by user via av_format_set_data_codec (NO direct access).
+ * Demuxing: Set by user
*/
AVCodec *data_codec;
@@ -1819,15 +1819,13 @@ typedef struct AVFormatContext {
/**
* Output timestamp offset, in microseconds.
- * Muxing: set by user via AVOptions (NO direct access)
+ * Muxing: set by user
*/
int64_t output_ts_offset;
/**
* dump format separator.
* can be ", " or "\n " or anything else
- * Code outside libavformat should access this field using AVOptions
- * (NO direct access).
* - muxing: Set by user.
* - demuxing: Set by user.
*/
@@ -1864,7 +1862,7 @@ typedef struct AVFormatContext {
/**
* ',' separated list of allowed protocols.
* - encoding: unused
- * - decoding: set by user through AVOptions (NO direct access)
+ * - decoding: set by user
*/
char *protocol_whitelist;
@@ -1899,18 +1897,22 @@ typedef struct AVFormatContext {
/**
* ',' separated list of disallowed protocols.
* - encoding: unused
- * - decoding: set by user through AVOptions (NO direct access)
+ * - decoding: set by user
*/
char *protocol_blacklist;
/**
* The maximum number of streams.
* - encoding: unused
- * - decoding: set by user through AVOptions (NO direct access)
+ * - decoding: set by user
*/
int max_streams;
} 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);
AVCodec * av_format_get_video_codec(const AVFormatContext *s);
void av_format_set_video_codec(AVFormatContext *s, AVCodec *c);
diff --git a/libavformat/version.h b/libavformat/version.h
index 7368743236..cd505242ef 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -33,7 +33,7 @@
// Also please add any ticket numbers that you believe might be affected here
#define LIBAVFORMAT_VERSION_MAJOR 57
#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, \
LIBAVFORMAT_VERSION_MINOR, \