History

Add avfilter_graph_config().

Originally committed as revision 25502 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 16 years ago

Commit 2a24df91 parent 0b6d3587 files · +30 −14Browse files

Unified · Split

7 files
  1. doc/APIchanges +3 −0
  2. ffmpeg.c +1 −6
  3. ffplay.c +2 −3
  4. libavfilter/avfilter.h +2 −2
  5. libavfilter/avfiltergraph.c +13 −0
  6. libavfilter/avfiltergraph.h +8 −0
  7. tools/graph2dot.c +1 −3
doc/APIchanges+3−0
@@ -13,6 +13,9 @@ libavutil: 2009-03-08 · 12 unmodified lines
1313
1414 API changes, most recent first:
1515
16+2010-10-16 - r25502 - lavfi 1.52.0 - avfilter_graph_config()
17+ Add the function avfilter_graph_config() in avfiltergraph.h.
18+
1619 2010-10-15 - r25493 - lavf 52.83.0 - metadata API
1720 Change demuxers to export metadata in generic format and
1821 muxers to accept generic format. Deprecate the public
ffmpeg.c+1−6
@@ -452,12 +452,7 @@ static int configure_filters(AVInputStream *ist, AVOutputStream *ost) · 451 unmodified lines
452452 return ret;
453453 }
454454
455− /* configure all the filter links */
456− if ((ret = avfilter_graph_check_validity(graph, NULL)) < 0)
457− return ret;
458− if ((ret = avfilter_graph_config_formats(graph, NULL)) < 0)
459− return ret;
460− if ((ret = avfilter_graph_config_links(graph, NULL)) < 0)
455+ if ((ret = avfilter_graph_config(graph, NULL)) < 0)
461456 return ret;
462457
463458 codec->width = ist->output_video_filter->inputs[0]->w;
ffplay.c+2−3
@@ -1849,9 +1849,8 @@ static int video_thread(void *arg) · 1848 unmodified lines
18491849 avfilter_graph_add_filter(graph, filt_src);
18501850 avfilter_graph_add_filter(graph, filt_out);
18511851
1852− if(avfilter_graph_check_validity(graph, NULL)) goto the_end;
1853− if(avfilter_graph_config_formats(graph, NULL)) goto the_end;
1854− if(avfilter_graph_config_links(graph, NULL)) goto the_end;
1852+ if (avfilter_graph_config(graph, NULL) < 0)
1853+ goto the_end;
18551854
18561855 is->out_video_filter = filt_out;
18571856 #endif
libavfilter/avfilter.h+2−2
@@ -25,8 +25,8 @@ · 24 unmodified lines
2525 #include "libavutil/avutil.h"
2626
2727 #define LIBAVFILTER_VERSION_MAJOR 1
28−#define LIBAVFILTER_VERSION_MINOR 51
29−#define LIBAVFILTER_VERSION_MICRO 1
28+#define LIBAVFILTER_VERSION_MINOR 52
29+#define LIBAVFILTER_VERSION_MICRO 0
3030
3131 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
3232 LIBAVFILTER_VERSION_MINOR, \
libavfilter/avfiltergraph.c+13−0
@@ -202,3 +202,16 @@ int avfilter_graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx) · 201 unmodified lines
202202 return 0;
203203 }
204204
205+int avfilter_graph_config(AVFilterGraph *graphctx, AVClass *log_ctx)
206+{
207+ int ret;
208+
209+ if ((ret = avfilter_graph_check_validity(graphctx, log_ctx)))
210+ return ret;
211+ if ((ret = avfilter_graph_config_formats(graphctx, log_ctx)))
212+ return ret;
213+ if ((ret = avfilter_graph_config_links(graphctx, log_ctx)))
214+ return ret;
215+
216+ return 0;
217+}
libavfilter/avfiltergraph.h+8−0
@@ -69,6 +69,14 @@ int avfilter_graph_config_links(AVFilterGraph *graphctx, AVClass *log_ctx); · 68 unmodified lines
6969 */
7070 int avfilter_graph_config_formats(AVFilterGraph *graphctx, AVClass *log_ctx);
7171
72+/**
73+ * Check validity and configure all the links and formats in the graph.
74+ *
75+ * @see avfilter_graph_check_validity(), avfilter_graph_config_links(),
76+ * avfilter_graph_config_formats()
77+ */
78+int avfilter_graph_config(AVFilterGraph *graphctx, AVClass *log_ctx);
79+
7280 /**
7381 * Free a graph and destroy its links.
7482 */
tools/graph2dot.c+1−3
@@ -152,9 +152,7 @@ int main(int argc, char **argv) · 151 unmodified lines
152152 return 1;
153153 }
154154
155− if (avfilter_graph_check_validity(graph, NULL) ||
156− avfilter_graph_config_formats(graph, NULL) ||
157− avfilter_graph_config_links (graph, NULL))
155+ if (avfilter_graph_config(graph, NULL) < 0)
158156 return 1;
159157
160158 print_digraph(outfile, graph);

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