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>
This commit is contained in:
James Almer
2017-10-23 11:39:08 -03:00
parent 307c24b32f
commit b7785d10b0
3 changed files with 36 additions and 1 deletions

View File

@@ -104,6 +104,7 @@ static int64_t wrap_timestamp(const AVStream *st, int64_t timestamp)
return timestamp;
}
#if FF_API_FORMAT_GET_SET
MAKE_ACCESSORS(AVStream, stream, AVRational, r_frame_rate)
MAKE_ACCESSORS(AVStream, stream, char *, recommended_encoder_configuration)
MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, video_codec)
@@ -118,6 +119,7 @@ FF_DISABLE_DEPRECATION_WARNINGS
MAKE_ACCESSORS(AVFormatContext, format, AVOpenCallback, open_cb)
FF_ENABLE_DEPRECATION_WARNINGS
#endif
#endif
int64_t av_stream_get_end_pts(const AVStream *st)
{
@@ -215,10 +217,12 @@ static const AVCodec *find_probe_decoder(AVFormatContext *s, const AVStream *st,
return codec;
}
#if FF_API_FORMAT_GET_SET
int av_format_get_probe_score(const AVFormatContext *s)
{
return s->probe_score;
}
#endif
/* an arbitrarily chosen "sane" max packet size -- 50M */
#define SANE_CHUNK_SIZE (50000000)