X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Favfiltergraph.h;h=05181245823da3e5be24ea8e9ec8b436d1697b1d;hb=39a8275fdf4f607023b483a58b255600d5f7a9e7;hp=b0037957500082953d37c4017cb3c6eea292f6ed;hpb=015903294ca983f007ab5cae098a54013e77f2f6;p=ffmpeg diff --git a/libavfilter/avfiltergraph.h b/libavfilter/avfiltergraph.h index b0037957500..05181245823 100644 --- a/libavfilter/avfiltergraph.h +++ b/libavfilter/avfiltergraph.h @@ -26,9 +26,7 @@ #include "libavutil/log.h" typedef struct AVFilterGraph { -#if FF_API_GRAPH_AVCLASS const AVClass *av_class; -#endif unsigned filter_count; AVFilterContext **filters; @@ -43,6 +41,8 @@ typedef struct AVFilterGraph { AVFilterLink **sink_links; int sink_links_count; + + unsigned disable_auto_convert; } AVFilterGraph; /** @@ -83,6 +83,21 @@ int avfilter_graph_create_filter(AVFilterContext **filt_ctx, AVFilter *filt, const char *name, const char *args, void *opaque, AVFilterGraph *graph_ctx); +/** + * Enable or disable automatic format conversion inside the graph. + * + * Note that format conversion can still happen inside explicitly inserted + * scale and aconvert filters. + * + * @param flags any of the AVFILTER_AUTO_CONVERT_* constants + */ +void avfilter_graph_set_auto_convert(AVFilterGraph *graph, unsigned flags); + +enum { + AVFILTER_AUTO_CONVERT_ALL = 0, /**< all automatic conversions enabled */ + AVFILTER_AUTO_CONVERT_NONE = -1, /**< all automatic conversions disabled */ +}; + /** * Check validity and configure all the links and formats in the graph. * @@ -240,8 +255,14 @@ char *avfilter_graph_dump(AVFilterGraph *graph, const char *options); * of a filtergraph, only a convenience function to help drain a filtergraph * in a balanced way under normal circumstances. * - * @return the return value of avfilter_request_frame, - * or AVERROR_EOF of all links returned AVERROR_EOF. + * Also note that AVERROR_EOF does not mean that frames did not arrive on + * some of the sinks during the process. + * When there are multiple sink links, in case the requested link + * returns an EOF, this may cause a filter to flush pending frames + * which are sent to another sink link, although unrequested. + * + * @return the return value of ff_request_frame(), + * or AVERROR_EOF if all links returned AVERROR_EOF */ int avfilter_graph_request_oldest(AVFilterGraph *graph);