mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
d1b9a3ddb4
Callers currently have two ways of adding filters to a graph - they can either - create, initialize, and link them manually - use one of the avfilter_graph_parse*() functions, which take a (typically end-user-written) string, split it into individual filter definitions+options, then create filters, apply options, initialize filters, and finally link them - all based on information from this string. A major problem with the second approach is that it performs many actions as a single atomic unit, leaving the caller no space to intervene in between. Such intervention would be useful e.g. to - modify filter options; - supply hardware device contexts; both of which typically must be done before the filter is initialized. Callers who need such intervention are then forced to invent their own filtergraph parsing, which is clearly suboptimal. This commit aims to address this problem by adding a new modular filtergraph parsing API. It adds a new avfilter_graph_segment_parse() function to parse a string filtergraph description into an intermediate tree-like representation (AVFilterGraphSegment and its children). This intermediate form may then be applied step by step using further new avfilter_graph_segment*() functions, with user intervention possible between each step.
49 lines
1.6 KiB
C
49 lines
1.6 KiB
C
/*
|
|
* Version macros.
|
|
*
|
|
* This file is part of FFmpeg.
|
|
*
|
|
* FFmpeg is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with FFmpeg; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#ifndef AVFILTER_VERSION_H
|
|
#define AVFILTER_VERSION_H
|
|
|
|
/**
|
|
* @file
|
|
* @ingroup lavfi
|
|
* Libavfilter version macros
|
|
*/
|
|
|
|
#include "libavutil/version.h"
|
|
|
|
#include "version_major.h"
|
|
|
|
#define LIBAVFILTER_VERSION_MINOR 1
|
|
#define LIBAVFILTER_VERSION_MICRO 100
|
|
|
|
|
|
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
|
|
LIBAVFILTER_VERSION_MINOR, \
|
|
LIBAVFILTER_VERSION_MICRO)
|
|
#define LIBAVFILTER_VERSION AV_VERSION(LIBAVFILTER_VERSION_MAJOR, \
|
|
LIBAVFILTER_VERSION_MINOR, \
|
|
LIBAVFILTER_VERSION_MICRO)
|
|
#define LIBAVFILTER_BUILD LIBAVFILTER_VERSION_INT
|
|
|
|
#define LIBAVFILTER_IDENT "Lavfi" AV_STRINGIFY(LIBAVFILTER_VERSION)
|
|
|
|
#endif /* AVFILTER_VERSION_H */
|