avformat: Remove FFserver leftovers

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
pull/362/head
Andreas Rheinhardt 4 years ago committed by James Almer
parent 56450a0ee4
commit 131f2c2712
  1. 18
      libavformat/avformat.h
  2. 22
      libavformat/utils.c
  3. 3
      libavformat/version.h

@ -1000,18 +1000,6 @@ typedef struct AVStream {
*/ */
AVRational r_frame_rate; AVRational r_frame_rate;
#if FF_API_LAVF_FFSERVER
/**
* String containing pairs of key and values describing recommended encoder configuration.
* Pairs are separated by ','.
* Keys are separated from values by '='.
*
* @deprecated unused
*/
attribute_deprecated
char *recommended_encoder_configuration;
#endif
/** /**
* Codec parameters associated with this stream. Allocated and freed by * Codec parameters associated with this stream. Allocated and freed by
* libavformat in avformat_new_stream() and avformat_free_context() * libavformat in avformat_new_stream() and avformat_free_context()
@ -1107,12 +1095,6 @@ attribute_deprecated
AVRational av_stream_get_r_frame_rate(const AVStream *s); AVRational av_stream_get_r_frame_rate(const AVStream *s);
attribute_deprecated attribute_deprecated
void av_stream_set_r_frame_rate(AVStream *s, AVRational r); void av_stream_set_r_frame_rate(AVStream *s, AVRational r);
#if FF_API_LAVF_FFSERVER
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
#endif #endif
struct AVCodecParserContext *av_stream_get_parser(const AVStream *s); struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);

@ -115,11 +115,6 @@ static int64_t wrap_timestamp(const AVStream *st, int64_t timestamp)
#if FF_API_FORMAT_GET_SET #if FF_API_FORMAT_GET_SET
MAKE_ACCESSORS(AVStream, stream, AVRational, r_frame_rate) MAKE_ACCESSORS(AVStream, stream, AVRational, r_frame_rate)
#if FF_API_LAVF_FFSERVER
FF_DISABLE_DEPRECATION_WARNINGS
MAKE_ACCESSORS(AVStream, stream, char *, recommended_encoder_configuration)
FF_ENABLE_DEPRECATION_WARNINGS
#endif
MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, video_codec) MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, video_codec)
MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, audio_codec) MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, audio_codec)
MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, subtitle_codec) MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, subtitle_codec)
@ -4392,18 +4387,6 @@ int ff_stream_encode_params_copy(AVStream *dst, const AVStream *src)
} }
} }
#if FF_API_LAVF_FFSERVER
FF_DISABLE_DEPRECATION_WARNINGS
av_freep(&dst->recommended_encoder_configuration);
if (src->recommended_encoder_configuration) {
const char *conf_str = src->recommended_encoder_configuration;
dst->recommended_encoder_configuration = av_strdup(conf_str);
if (!dst->recommended_encoder_configuration)
return AVERROR(ENOMEM);
}
FF_ENABLE_DEPRECATION_WARNINGS
#endif
return 0; return 0;
} }
@ -4448,11 +4431,6 @@ FF_DISABLE_DEPRECATION_WARNINGS
FF_ENABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS
#endif #endif
av_freep(&st->priv_data); av_freep(&st->priv_data);
#if FF_API_LAVF_FFSERVER
FF_DISABLE_DEPRECATION_WARNINGS
av_freep(&st->recommended_encoder_configuration);
FF_ENABLE_DEPRECATION_WARNINGS
#endif
av_freep(pst); av_freep(pst);
} }

@ -82,9 +82,6 @@
#ifndef FF_API_OLD_AVIO_EOF_0 #ifndef FF_API_OLD_AVIO_EOF_0
#define FF_API_OLD_AVIO_EOF_0 (LIBAVFORMAT_VERSION_MAJOR < 59) #define FF_API_OLD_AVIO_EOF_0 (LIBAVFORMAT_VERSION_MAJOR < 59)
#endif #endif
#ifndef FF_API_LAVF_FFSERVER
#define FF_API_LAVF_FFSERVER (LIBAVFORMAT_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_FORMAT_FILENAME #ifndef FF_API_FORMAT_FILENAME
#define FF_API_FORMAT_FILENAME (LIBAVFORMAT_VERSION_MAJOR < 59) #define FF_API_FORMAT_FILENAME (LIBAVFORMAT_VERSION_MAJOR < 59)
#endif #endif

Loading…
Cancel
Save