History

lavfi: allow building without swscale.

Anton Khirnov committed 14 years ago

Commit 2f296e31 parent a4880284 files · +13 −9Browse files

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

Unified · Split

3 files
  1. libavfilter/Makefile +3 −1
  2. libavfilter/allfilters.c +1 −4
  3. libavfilter/avfiltergraph.c +7 −2
libavfilter/Makefile+3−1
@@ -1,8 +1,9 @@
1NAME = avfilter1NAME = avfilter
2FFLIBS = avutil swscale2FFLIBS = avutil
3FFLIBS-$(CONFIG_ASYNCTS_FILTER) += avresample3FFLIBS-$(CONFIG_ASYNCTS_FILTER) += avresample
4FFLIBS-$(CONFIG_MOVIE_FILTER) += avformat avcodec4FFLIBS-$(CONFIG_MOVIE_FILTER) += avformat avcodec
5FFLIBS-$(CONFIG_RESAMPLE_FILTER) += avresample5FFLIBS-$(CONFIG_RESAMPLE_FILTER) += avresample
6FFLIBS-$(CONFIG_SCALE_FILTER) += swscale
6 7
7HEADERS = avfilter.h \8HEADERS = avfilter.h \
8 avfiltergraph.h \9 avfiltergraph.h \
@@ -63,6 +64,7 @@ OBJS-$(CONFIG_OCV_FILTER) += vf_libopencv.o · 54 unmodified lines
63OBJS-$(CONFIG_OVERLAY_FILTER) += vf_overlay.o64OBJS-$(CONFIG_OVERLAY_FILTER) += vf_overlay.o
64OBJS-$(CONFIG_PAD_FILTER) += vf_pad.o65OBJS-$(CONFIG_PAD_FILTER) += vf_pad.o
65OBJS-$(CONFIG_PIXDESCTEST_FILTER) += vf_pixdesctest.o66OBJS-$(CONFIG_PIXDESCTEST_FILTER) += vf_pixdesctest.o
67OBJS-$(CONFIG_SCALE_FILTER) += vf_scale.o
66OBJS-$(CONFIG_SELECT_FILTER) += vf_select.o68OBJS-$(CONFIG_SELECT_FILTER) += vf_select.o
67OBJS-$(CONFIG_SETDAR_FILTER) += vf_aspect.o69OBJS-$(CONFIG_SETDAR_FILTER) += vf_aspect.o
68OBJS-$(CONFIG_SETPTS_FILTER) += vf_setpts.o70OBJS-$(CONFIG_SETPTS_FILTER) += vf_setpts.o
libavfilter/allfilters.c+1−4
@@ -73,6 +73,7 @@ void avfilter_register_all(void) · 72 unmodified lines
73 REGISTER_FILTER (OVERLAY, overlay, vf);73 REGISTER_FILTER (OVERLAY, overlay, vf);
74 REGISTER_FILTER (PAD, pad, vf);74 REGISTER_FILTER (PAD, pad, vf);
75 REGISTER_FILTER (PIXDESCTEST, pixdesctest, vf);75 REGISTER_FILTER (PIXDESCTEST, pixdesctest, vf);
76 REGISTER_FILTER (SCALE, scale, vf);
76 REGISTER_FILTER (SELECT, select, vf);77 REGISTER_FILTER (SELECT, select, vf);
77 REGISTER_FILTER (SETDAR, setdar, vf);78 REGISTER_FILTER (SETDAR, setdar, vf);
78 REGISTER_FILTER (SETPTS, setpts, vf);79 REGISTER_FILTER (SETPTS, setpts, vf);
@@ -113,8 +114,4 @@ void avfilter_register_all(void) · 34 unmodified lines
113 extern AVFilter avfilter_asink_abuffer;114 extern AVFilter avfilter_asink_abuffer;
114 avfilter_register(&avfilter_asink_abuffer);115 avfilter_register(&avfilter_asink_abuffer);
115 }116 }
116 {
117 extern AVFilter avfilter_vf_scale;
118 avfilter_register(&avfilter_vf_scale);
119 }
120}117}
libavfilter/avfiltergraph.c+7−2
@@ -213,11 +213,16 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) · 212 unmodified lines
213 /* couldn't merge format lists. auto-insert conversion filter */213 /* couldn't merge format lists. auto-insert conversion filter */
214 switch (link->type) {214 switch (link->type) {
215 case AVMEDIA_TYPE_VIDEO:215 case AVMEDIA_TYPE_VIDEO:
216 if (!(filter = avfilter_get_by_name("scale"))) {
217 av_log(log_ctx, AV_LOG_ERROR, "'scale' filter "
218 "not present, cannot convert pixel formats.\n");
219 return AVERROR(EINVAL);
220 }
221
216 snprintf(inst_name, sizeof(inst_name), "auto-inserted scaler %d",222 snprintf(inst_name, sizeof(inst_name), "auto-inserted scaler %d",
217 scaler_count++);223 scaler_count++);
218 snprintf(scale_args, sizeof(scale_args), "0:0:%s", graph->scale_sws_opts);224 snprintf(scale_args, sizeof(scale_args), "0:0:%s", graph->scale_sws_opts);
219 if ((ret = avfilter_graph_create_filter(&convert,225 if ((ret = avfilter_graph_create_filter(&convert, filter,
220 avfilter_get_by_name("scale"),
221 inst_name, scale_args, NULL,226 inst_name, scale_args, NULL,
222 graph)) < 0)227 graph)) < 0)
223 return ret;228 return ret;

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