History

Make filter graph description parsing code independent of the code to read said description from a file.

Commited in SoC by Bobby Bingham on 2007-12-22 17:16:21 Originally committed as revision 12714 to svn://svn.ffmpeg.org/ffmpeg/trunk

Vitor Sessak committed 18 years ago

Commit 16db7fe1 parent 1df675b1 file · +34 −0Browse files

Unified · Split

libavfilter/avfiltergraph.h+34−0
@@ -57,6 +57,16 @@ typedef struct AVFilterGraphDescExport · 56 unmodified lines
5757 struct AVFilterGraphDescExport *next;
5858 } AVFilterGraphDescExport;
5959
60+/** Sections of a filter graph description */
61+typedef enum
62+{
63+ SEC_NONE = 0,
64+ SEC_FILTERS,
65+ SEC_LINKS,
66+ SEC_INPUTS,
67+ SEC_OUTPUTS
68+} AVFilterGraphDescSection;
69+
6070 /** Description of a graph to be loaded from a file, etc */
6171 typedef struct
6272 {
@@ -66,6 +76,30 @@ typedef struct · 3 unmodified lines
6676 AVFilterGraphDescExport *outputs; ///< outputs to export
6777 } AVFilterGraphDesc;
6878
79+typedef struct
80+{
81+ AVFilterGraphDescSection section; ///< current section being parsed
82+
83+ AVFilterGraphDescFilter **filterp; ///< last parsed filter
84+ AVFilterGraphDescLink **linkp; ///< last parsed link
85+ AVFilterGraphDescExport **inputp; ///< last parsed exported input
86+ AVFilterGraphDescExport **outputp; ///< last parsed exported output
87+} AVFilterGraphDescParser;
88+
89+/** Parse a line of a filter graph description.
90+ * @param desc Pointer to an AVFilterGraphDesc pointer. If *desc is NULL,
91+ * a new AVFilterGraphDesc structure will be created for you.
92+ * Must be the same between multiple invocations when parsing
93+ * the same description.
94+ * @param parser Parser state. Must be the same between multiple invocations
95+ * when parsing the same description
96+ * @param line Line of the graph description to parse.
97+ * @return Zero on success, negative on error.
98+ */
99+int avfilter_graph_parse_desc(AVFilterGraphDesc **desc,
100+ AVFilterGraphDescParser **parser,
101+ char *line);
102+
69103 /**
70104 * Load a filter graph description from a file
71105 * @param filename Name of the file from which to load the description

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t