History

avfilter/buffersrc: deprecate sws_param option

Zhao Zhili committed 6 years ago

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

Showing the changes to libavfilter (2 of 3 files). Show all

Unified · Split

2 files
  1. libavfilter/buffersrc.c +12 −2
  2. libavfilter/version.h +4 −1
libavfilter/buffersrc.c+12−2
@@ -51,7 +51,9 @@ typedef struct BufferSourceContext { · 50 unmodified lines
51 int w, h;51 int w, h;
52 enum AVPixelFormat pix_fmt;52 enum AVPixelFormat pix_fmt;
53 AVRational pixel_aspect;53 AVRational pixel_aspect;
54#if FF_API_SWS_PARAM_OPTION
54 char *sws_param;55 char *sws_param;
56#endif
55 57
56 AVBufferRef *hw_frames_ctx;58 AVBufferRef *hw_frames_ctx;
57 59
@@ -271,10 +273,16 @@ static av_cold int init_video(AVFilterContext *ctx) · 213 unmodified lines
271 return AVERROR(EINVAL);273 return AVERROR(EINVAL);
272 }274 }
273 275
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",
275 c->w, c->h, av_get_pix_fmt_name(c->pix_fmt),277 c->w, c->h, av_get_pix_fmt_name(c->pix_fmt),
276 c->time_base.num, c->time_base.den, c->frame_rate.num, c->frame_rate.den,278 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
278 return 0;286 return 0;
279}287}
280 288
@@ -296,7 +304,9 @@ static const AVOption buffer_options[] = { · 15 unmodified lines
296 { "pixel_aspect", "sample aspect ratio", OFFSET(pixel_aspect), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, DBL_MAX, V },304 { "pixel_aspect", "sample aspect ratio", OFFSET(pixel_aspect), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, DBL_MAX, V },
297 { "time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, DBL_MAX, V },305 { "time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, DBL_MAX, V },
298 { "frame_rate", NULL, OFFSET(frame_rate), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, DBL_MAX, V },306 { "frame_rate", NULL, OFFSET(frame_rate), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, DBL_MAX, V },
307#if FF_API_SWS_PARAM_OPTION
299 { "sws_param", NULL, OFFSET(sws_param), AV_OPT_TYPE_STRING, .flags = V },308 { "sws_param", NULL, OFFSET(sws_param), AV_OPT_TYPE_STRING, .flags = V },
309#endif
300 { NULL },310 { NULL },
301};311};
302 312
libavfilter/version.h+4−1
@@ -31,7 +31,7 @@ · 30 unmodified lines
31 31
32#define LIBAVFILTER_VERSION_MAJOR 732#define LIBAVFILTER_VERSION_MAJOR 7
33#define LIBAVFILTER_VERSION_MINOR 7033#define LIBAVFILTER_VERSION_MINOR 70
34#define LIBAVFILTER_VERSION_MICRO 10034#define LIBAVFILTER_VERSION_MICRO 101
35 35
36 36
37#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \37#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
@@ -59,6 +59,9 @@ · 21 unmodified lines
59#ifndef FF_API_FILTER_GET_SET59#ifndef FF_API_FILTER_GET_SET
60#define FF_API_FILTER_GET_SET (LIBAVFILTER_VERSION_MAJOR < 8)60#define FF_API_FILTER_GET_SET (LIBAVFILTER_VERSION_MAJOR < 8)
61#endif61#endif
62#ifndef FF_API_SWS_PARAM_OPTION
63#define FF_API_SWS_PARAM_OPTION (LIBAVFILTER_VERSION_MAJOR < 8)
64#endif
62#ifndef FF_API_NEXT65#ifndef FF_API_NEXT
63#define FF_API_NEXT (LIBAVFILTER_VERSION_MAJOR < 8)66#define FF_API_NEXT (LIBAVFILTER_VERSION_MAJOR < 8)
64#endif67#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