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
13 13
14API changes, most recent first:14API changes, most recent first:
15 15
162010-10-16 - r25502 - lavfi 1.52.0 - avfilter_graph_config()
17 Add the function avfilter_graph_config() in avfiltergraph.h.
18
162010-10-15 - r25493 - lavf 52.83.0 - metadata API192010-10-15 - r25493 - lavf 52.83.0 - metadata API
17 Change demuxers to export metadata in generic format and20 Change demuxers to export metadata in generic format and
18 muxers to accept generic format. Deprecate the public21 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
452 return ret;452 return ret;
453 }453 }
454 454
455 /* configure all the filter links */455 if ((ret = avfilter_graph_config(graph, NULL)) < 0)
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)
461 return ret;456 return ret;
462 457
463 codec->width = ist->output_video_filter->inputs[0]->w;458 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
1849 avfilter_graph_add_filter(graph, filt_src);1849 avfilter_graph_add_filter(graph, filt_src);
1850 avfilter_graph_add_filter(graph, filt_out);1850 avfilter_graph_add_filter(graph, filt_out);
1851 1851
1852 if(avfilter_graph_check_validity(graph, NULL)) goto the_end;1852 if (avfilter_graph_config(graph, NULL) < 0)
1853 if(avfilter_graph_config_formats(graph, NULL)) goto the_end;1853 goto the_end;
1854 if(avfilter_graph_config_links(graph, NULL)) goto the_end;
1855 1854
1856 is->out_video_filter = filt_out;1855 is->out_video_filter = filt_out;
1857#endif1856#endif
libavfilter/avfilter.h+2−2
@@ -25,8 +25,8 @@ · 24 unmodified lines
25#include "libavutil/avutil.h"25#include "libavutil/avutil.h"
26 26
27#define LIBAVFILTER_VERSION_MAJOR 127#define LIBAVFILTER_VERSION_MAJOR 1
28#define LIBAVFILTER_VERSION_MINOR 5128#define LIBAVFILTER_VERSION_MINOR 52
29#define LIBAVFILTER_VERSION_MICRO 129#define LIBAVFILTER_VERSION_MICRO 0
30 30
31#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \31#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
32 LIBAVFILTER_VERSION_MINOR, \32 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
202 return 0;202 return 0;
203}203}
204 204
205int 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
69 */69 */
70int avfilter_graph_config_formats(AVFilterGraph *graphctx, AVClass *log_ctx);70int avfilter_graph_config_formats(AVFilterGraph *graphctx, AVClass *log_ctx);
71 71
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 */
78int avfilter_graph_config(AVFilterGraph *graphctx, AVClass *log_ctx);
79
72/**80/**
73 * Free a graph and destroy its links.81 * Free a graph and destroy its links.
74 */82 */
tools/graph2dot.c+1−3
@@ -152,9 +152,7 @@ int main(int argc, char **argv) · 151 unmodified lines
152 return 1;152 return 1;
153 }153 }
154 154
155 if (avfilter_graph_check_validity(graph, NULL) ||155 if (avfilter_graph_config(graph, NULL) < 0)
156 avfilter_graph_config_formats(graph, NULL) ||
157 avfilter_graph_config_links (graph, NULL))
158 return 1;156 return 1;
159 157
160 print_digraph(outfile, graph);158 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