From 8b56480652c83603a877c8e72c20c30c7de5b9cf Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 18 Apr 2023 14:11:03 +0200 Subject: fftools/ffmpeg_filter: add a function for creating a filtergraph Code creating a new filtergraph is currently duplicated in 3 places. This commit unifies it and moves towards making filtergraphs more self-contained. --- fftools/ffmpeg.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'fftools/ffmpeg.h') diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index c9d499efdd..b181d433b0 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -803,6 +803,14 @@ int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame); int ifilter_parameters_from_codecpar(InputFilter *ifilter, AVCodecParameters *par); int ifilter_has_all_input_formats(FilterGraph *fg); +/** + * Create a new filtergraph in the global filtergraph list. + * + * @param graph_desc Graph description; an av_malloc()ed string, filtergraph + * takes ownership of it. + */ +FilterGraph *fg_create(char *graph_desc); + int ffmpeg_parse_options(int argc, char **argv); void enc_stats_write(OutputStream *ost, EncStats *es, -- cgit v1.2.1