summaryrefslogtreecommitdiff
path: root/libavformat/avformat.h
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-10-23 11:39:08 -0300
committerJames Almer <jamrial@gmail.com>2017-10-29 10:29:43 -0300
commitb7785d10b00c88029d8af7dbddac09ab0d6f2b7f (patch)
treebb9aaf90fcc89c85d33e4f5f6164cee87824174b /libavformat/avformat.h
parent307c24b32f30f08b759457bd9997cdfcd51927ae (diff)
avformat: deprecate getters and setters for AVFormatContext and AVStream fields
The fields can be accessed directly, so these are not needed anymore. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r--libavformat/avformat.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index a84e0f4dcc..941a7bc3eb 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1209,11 +1209,22 @@ typedef struct AVStream {
AVStreamInternal *internal;
} AVStream;
+#if FF_API_FORMAT_GET_SET
+/**
+ * Accessors for some AVStream fields. These used to be provided for ABI
+ * compatibility, and do not need to be used anymore.
+ */
+attribute_deprecated
AVRational av_stream_get_r_frame_rate(const AVStream *s);
+attribute_deprecated
void av_stream_set_r_frame_rate(AVStream *s, AVRational r);
-struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
+attribute_deprecated
char* av_stream_get_recommended_encoder_configuration(const AVStream *s);
+attribute_deprecated
void av_stream_set_recommended_encoder_configuration(AVStream *s, char *configuration);
+#endif
+
+struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
/**
* Returns the pts of the last muxed packet + its duration
@@ -1885,29 +1896,46 @@ typedef struct AVFormatContext {
int max_streams;
} AVFormatContext;
+#if FF_API_FORMAT_GET_SET
/**
* Accessors for some AVFormatContext fields. These used to be provided for ABI
* compatibility, and do not need to be used anymore.
*/
+attribute_deprecated
int av_format_get_probe_score(const AVFormatContext *s);
+attribute_deprecated
AVCodec * av_format_get_video_codec(const AVFormatContext *s);
+attribute_deprecated
void av_format_set_video_codec(AVFormatContext *s, AVCodec *c);
+attribute_deprecated
AVCodec * av_format_get_audio_codec(const AVFormatContext *s);
+attribute_deprecated
void av_format_set_audio_codec(AVFormatContext *s, AVCodec *c);
+attribute_deprecated
AVCodec * av_format_get_subtitle_codec(const AVFormatContext *s);
+attribute_deprecated
void av_format_set_subtitle_codec(AVFormatContext *s, AVCodec *c);
+attribute_deprecated
AVCodec * av_format_get_data_codec(const AVFormatContext *s);
+attribute_deprecated
void av_format_set_data_codec(AVFormatContext *s, AVCodec *c);
+attribute_deprecated
int av_format_get_metadata_header_padding(const AVFormatContext *s);
+attribute_deprecated
void av_format_set_metadata_header_padding(AVFormatContext *s, int c);
+attribute_deprecated
void * av_format_get_opaque(const AVFormatContext *s);
+attribute_deprecated
void av_format_set_opaque(AVFormatContext *s, void *opaque);
+attribute_deprecated
av_format_control_message av_format_get_control_message_cb(const AVFormatContext *s);
+attribute_deprecated
void av_format_set_control_message_cb(AVFormatContext *s, av_format_control_message callback);
#if FF_API_OLD_OPEN_CALLBACKS
attribute_deprecated AVOpenCallback av_format_get_open_cb(const AVFormatContext *s);
attribute_deprecated void av_format_set_open_cb(AVFormatContext *s, AVOpenCallback callback);
#endif
+#endif
/**
* This function will cause global side data to be injected in the next packet