History

avformat: deprecate another ffserver API leftover

wm4 committed 8 years ago

Commit 6512ff71 parent 83e34ae4 files · +25 −1Browse files

Unified · Split

4 files
  1. doc/APIchanges +4 −0
  2. libavformat/avformat.h +5 −0
  3. libavformat/utils.c +12 −0
  4. libavformat/version.h +4 −1
doc/APIchanges+4−0
@@ -15,6 +15,10 @@ libavutil: 2017-10-21 · 14 unmodified lines
1515
1616 API changes, most recent first:
1717
18+2018-01-xx - xxxxxxx - lavf 58.4.100 - avformat.h
19+ Deprecate AVStream.recommended_encoder_configuration. It was useful only for
20+ FFserver, which has been removed.
21+
1822 2018-01-xx - xxxxxxx - lavfi 7.11.101 - avfilter.h
1923 Deprecate avfilter_link_get_channels(). Use av_buffersink_get_channels().
2024
libavformat/avformat.h+5−0
@@ -986,12 +986,15 @@ typedef struct AVStream { · 985 unmodified lines
986986 */
987987 AVRational r_frame_rate;
988988
989+#if FF_API_LAVF_FFSERVER
989990 /**
990991 * String containing pairs of key and values describing recommended encoder configuration.
991992 * Pairs are separated by ','.
992993 * Keys are separated from values by '='.
993994 */
995+ attribute_deprecated
994996 char *recommended_encoder_configuration;
997+#endif
995998
996999 /**
9971000 * Codec parameters associated with this stream. Allocated and freed by
@@ -1218,10 +1221,12 @@ AVRational av_stream_get_r_frame_rate(const AVStream *s); · 220 unmodified lines
12181221 attribute_deprecated
12191222 void av_stream_set_r_frame_rate(AVStream *s, AVRational r);
12201223 attribute_deprecated
1224+#if FF_API_LAVF_FFSERVER
12211225 char* av_stream_get_recommended_encoder_configuration(const AVStream *s);
12221226 attribute_deprecated
12231227 void av_stream_set_recommended_encoder_configuration(AVStream *s, char *configuration);
12241228 #endif
1229+#endif
12251230
12261231 struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
12271232
libavformat/utils.c+12−0
@@ -119,7 +119,11 @@ static int64_t wrap_timestamp(const AVStream *st, int64_t timestamp) · 118 unmodified lines
119119
120120 #if FF_API_FORMAT_GET_SET
121121 MAKE_ACCESSORS(AVStream, stream, AVRational, r_frame_rate)
122+#if FF_API_LAVF_FFSERVER
123+FF_DISABLE_DEPRECATION_WARNINGS
122124 MAKE_ACCESSORS(AVStream, stream, char *, recommended_encoder_configuration)
125+FF_ENABLE_DEPRECATION_WARNINGS
126+#endif
123127 MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, video_codec)
124128 MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, audio_codec)
125129 MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, subtitle_codec)
@@ -4256,6 +4260,8 @@ int ff_stream_encode_params_copy(AVStream *dst, const AVStream *src) · 4130 unmodified lines
42564260 }
42574261 }
42584262
4263+#if FF_API_LAVF_FFSERVER
4264+FF_DISABLE_DEPRECATION_WARNINGS
42594265 av_freep(&dst->recommended_encoder_configuration);
42604266 if (src->recommended_encoder_configuration) {
42614267 const char *conf_str = src->recommended_encoder_configuration;
@@ -4263,6 +4269,8 @@ int ff_stream_encode_params_copy(AVStream *dst, const AVStream *src) · 1 unmodified line
42634269 if (!dst->recommended_encoder_configuration)
42644270 return AVERROR(ENOMEM);
42654271 }
4272+FF_ENABLE_DEPRECATION_WARNINGS
4273+#endif
42664274
42674275 return 0;
42684276 }
@@ -4310,7 +4318,11 @@ FF_ENABLE_DEPRECATION_WARNINGS · 41 unmodified lines
43104318 if (st->info)
43114319 av_freep(&st->info->duration_error);
43124320 av_freep(&st->info);
4321+#if FF_API_LAVF_FFSERVER
4322+FF_DISABLE_DEPRECATION_WARNINGS
43134323 av_freep(&st->recommended_encoder_configuration);
4324+FF_ENABLE_DEPRECATION_WARNINGS
4325+#endif
43144326
43154327 av_freep(pst);
43164328 }
libavformat/version.h+4−1
@@ -32,7 +32,7 @@ · 31 unmodified lines
3232 // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
3333 // Also please add any ticket numbers that you believe might be affected here
3434 #define LIBAVFORMAT_VERSION_MAJOR 58
35−#define LIBAVFORMAT_VERSION_MINOR 3
35+#define LIBAVFORMAT_VERSION_MINOR 4
3636 #define LIBAVFORMAT_VERSION_MICRO 100
3737
3838 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
@@ -82,6 +82,9 @@ · 43 unmodified lines
8282 #ifndef FF_API_OLD_AVIO_EOF_0
8383 #define FF_API_OLD_AVIO_EOF_0 (LIBAVFORMAT_VERSION_MAJOR < 59)
8484 #endif
85+#ifndef FF_API_LAVF_FFSERVER
86+#define FF_API_LAVF_FFSERVER (LIBAVFORMAT_VERSION_MAJOR < 59)
87+#endif
8588
8689
8790 #ifndef FF_API_R_FRAME_RATE

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t