History

avfilter/buffersrc: deprecate sws_param option

Zhao Zhili committed 6 years ago

Commit b2491561 parent e20c6d93 files · +20 −7Browse files

Unified · Split

3 files
  1. doc/filters.texi +4 −4
  2. libavfilter/buffersrc.c +12 −2
  3. libavfilter/version.h +4 −1
doc/filters.texi+4−4
@@ -21209,9 +21209,9 @@ Specify the frame rate expected for the video stream. · 21208 unmodified lines
2120921209 The sample (pixel) aspect ratio of the input video.
2121021210
2121121211 @item sws_param
21212−Specify the optional parameters to be used for the scale filter which
21213−is automatically inserted when an input change is detected in the
21214−input size or format.
21212+This option is deprecated and ignored. Prepend @code{sws_flags=@var{flags};}
21213+to the filtergraph description to specify swscale flags for automatically
21214+inserted scalers. See @ref{Filtergraph syntax}.
2121521215
2121621216 @item hw_frames_ctx
2121721217 When using a hardware pixel format, this should be a reference to an
@@ -21236,7 +21236,7 @@ buffer=size=320x240:pixfmt=6:time_base=1/24:pixel_aspect=1/1 · 18 unmodified lines
2123621236 Alternatively, the options can be specified as a flat string, but this
2123721237 syntax is deprecated:
2123821238
21239−@var{width}:@var{height}:@var{pix_fmt}:@var{time_base.num}:@var{time_base.den}:@var{pixel_aspect.num}:@var{pixel_aspect.den}[:@var{sws_param}]
21239+@var{width}:@var{height}:@var{pix_fmt}:@var{time_base.num}:@var{time_base.den}:@var{pixel_aspect.num}:@var{pixel_aspect.den}
2124021240
2124121241 @section cellauto
2124221242
libavfilter/buffersrc.c+12−2
@@ -51,7 +51,9 @@ typedef struct BufferSourceContext { · 50 unmodified lines
5151 int w, h;
5252 enum AVPixelFormat pix_fmt;
5353 AVRational pixel_aspect;
54+#if FF_API_SWS_PARAM_OPTION
5455 char *sws_param;
56+#endif
5557
5658 AVBufferRef *hw_frames_ctx;
5759
@@ -271,10 +273,16 @@ static av_cold int init_video(AVFilterContext *ctx) · 213 unmodified lines
271273 return AVERROR(EINVAL);
272274 }
273275
274− av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d pixfmt:%s tb:%d/%d fr:%d/%d sar:%d/%d sws_param:%s\n",
276+ av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d pixfmt:%s tb:%d/%d fr:%d/%d sar:%d/%d\n",
275277 c->w, c->h, av_get_pix_fmt_name(c->pix_fmt),
276278 c->time_base.num, c->time_base.den, c->frame_rate.num, c->frame_rate.den,
277− c->pixel_aspect.num, c->pixel_aspect.den, (char *)av_x_if_null(c->sws_param, ""));
279+ c->pixel_aspect.num, c->pixel_aspect.den);
280+
281+#if FF_API_SWS_PARAM_OPTION
282+ if (c->sws_param)
283+ av_log(ctx, AV_LOG_WARNING, "sws_param option is deprecated and ignored\n");
284+#endif
285+
278286 return 0;
279287 }
280288
@@ -296,7 +304,9 @@ static const AVOption buffer_options[] = { · 15 unmodified lines
296304 { "pixel_aspect", "sample aspect ratio", OFFSET(pixel_aspect), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, DBL_MAX, V },
297305 { "time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, DBL_MAX, V },
298306 { "frame_rate", NULL, OFFSET(frame_rate), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, DBL_MAX, V },
307+#if FF_API_SWS_PARAM_OPTION
299308 { "sws_param", NULL, OFFSET(sws_param), AV_OPT_TYPE_STRING, .flags = V },
309+#endif
300310 { NULL },
301311 };
302312
libavfilter/version.h+4−1
@@ -31,7 +31,7 @@ · 30 unmodified lines
3131
3232 #define LIBAVFILTER_VERSION_MAJOR 7
3333 #define LIBAVFILTER_VERSION_MINOR 70
34−#define LIBAVFILTER_VERSION_MICRO 100
34+#define LIBAVFILTER_VERSION_MICRO 101
3535
3636
3737 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
@@ -59,6 +59,9 @@ · 21 unmodified lines
5959 #ifndef FF_API_FILTER_GET_SET
6060 #define FF_API_FILTER_GET_SET (LIBAVFILTER_VERSION_MAJOR < 8)
6161 #endif
62+#ifndef FF_API_SWS_PARAM_OPTION
63+#define FF_API_SWS_PARAM_OPTION (LIBAVFILTER_VERSION_MAJOR < 8)
64+#endif
6265 #ifndef FF_API_NEXT
6366 #define FF_API_NEXT (LIBAVFILTER_VERSION_MAJOR < 8)
6467 #endif

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