Originally committed as revision 25502 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -13,6 +13,9 @@ libavutil: 2009-03-08 · 12 unmodified lines | |||
| 13 | 13 | ||
| 14 | API changes, most recent first: | 14 | API changes, most recent first: |
| 15 | 15 | ||
| 16 | 2010-10-16 - r25502 - lavfi 1.52.0 - avfilter_graph_config() | ||
| 17 | Add the function avfilter_graph_config() in avfiltergraph.h. | ||
| 18 | |||
| 16 | 2010-10-15 - r25493 - lavf 52.83.0 - metadata API | 19 | 2010-10-15 - r25493 - lavf 52.83.0 - metadata API |
| 17 | Change demuxers to export metadata in generic format and | 20 | Change demuxers to export metadata in generic format and |
| 18 | muxers to accept generic format. Deprecate the public | 21 | muxers to accept generic format. Deprecate the public |
| @@ -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; |
| @@ -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 | #endif | 1856 | #endif |
| @@ -25,8 +25,8 @@ · 24 unmodified lines | |||
| 25 | #include "libavutil/avutil.h" | 25 | #include "libavutil/avutil.h" |
| 26 | 26 | ||
| 27 | #define LIBAVFILTER_VERSION_MAJOR 1 | 27 | #define LIBAVFILTER_VERSION_MAJOR 1 |
| 28 | #define LIBAVFILTER_VERSION_MINOR 51 | 28 | #define LIBAVFILTER_VERSION_MINOR 52 |
| 29 | #define LIBAVFILTER_VERSION_MICRO 1 | 29 | #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, \ |
| @@ -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 | ||
| 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 | } | ||
| @@ -69,6 +69,14 @@ int avfilter_graph_config_links(AVFilterGraph *graphctx, AVClass *log_ctx); · 68 unmodified lines | |||
| 69 | */ | 69 | */ |
| 70 | int avfilter_graph_config_formats(AVFilterGraph *graphctx, AVClass *log_ctx); | 70 | int 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 | */ | ||
| 78 | int 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 | */ |
| @@ -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); |