...
|
...
|
@@ -41,6 +41,7 @@
|
41
|
41
|
typedef struct {
|
42
|
42
|
AVClass *class; ///< class for private options
|
43
|
43
|
char *graph_str;
|
|
44
|
+ char *dump_graph;
|
44
|
45
|
AVFilterGraph *graph;
|
45
|
46
|
AVFilterContext **sinks;
|
46
|
47
|
int *sink_stream_map;
|
...
|
...
|
@@ -230,6 +231,13 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx,
|
230
|
230
|
if ((ret = avfilter_graph_config(lavfi->graph, avctx)) < 0)
|
231
|
231
|
FAIL(ret);
|
232
|
232
|
|
|
233
|
+ if (lavfi->dump_graph) {
|
|
234
|
+ char *dump = avfilter_graph_dump(lavfi->graph, lavfi->dump_graph);
|
|
235
|
+ fputs(dump, stderr);
|
|
236
|
+ fflush(stderr);
|
|
237
|
+ av_free(dump);
|
|
238
|
+ }
|
|
239
|
+
|
233
|
240
|
/* fill each stream with the information in the corresponding sink */
|
234
|
241
|
for (i = 0; i < avctx->nb_streams; i++) {
|
235
|
242
|
AVFilterLink *link = lavfi->sinks[lavfi->stream_sink_map[i]]->inputs[0];
|
...
|
...
|
@@ -329,6 +337,7 @@ static int lavfi_read_packet(AVFormatContext *avctx, AVPacket *pkt)
|
329
|
329
|
|
330
|
330
|
static const AVOption options[] = {
|
331
|
331
|
{ "graph", "Libavfilter graph", OFFSET(graph_str), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, DEC },
|
|
332
|
+ { "dumpgraph", "Dump graph to stderr", OFFSET(dump_graph), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC },
|
332
|
333
|
{ NULL },
|
333
|
334
|
};
|
334
|
335
|
|