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

Showing the changes to libavfilter/avfiltergraph.h (1 of 1 file). Show all

Unified · Split

libavfilter/avfiltergraph.h+34−0
@@ -57,6 +57,16 @@ typedef struct AVFilterGraphDescExport · 56 unmodified lines
57 struct AVFilterGraphDescExport *next;57 struct AVFilterGraphDescExport *next;
58} AVFilterGraphDescExport;58} AVFilterGraphDescExport;
59 59
60/** Sections of a filter graph description */
61typedef enum
62{
63 SEC_NONE = 0,
64 SEC_FILTERS,
65 SEC_LINKS,
66 SEC_INPUTS,
67 SEC_OUTPUTS
68} AVFilterGraphDescSection;
69
60/** Description of a graph to be loaded from a file, etc */70/** Description of a graph to be loaded from a file, etc */
61typedef struct71typedef struct
62{72{
@@ -66,6 +76,30 @@ typedef struct · 3 unmodified lines
66 AVFilterGraphDescExport *outputs; ///< outputs to export76 AVFilterGraphDescExport *outputs; ///< outputs to export
67} AVFilterGraphDesc;77} AVFilterGraphDesc;
68 78
79typedef 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 */
99int avfilter_graph_parse_desc(AVFilterGraphDesc **desc,
100 AVFilterGraphDescParser **parser,
101 char *line);
102
69/**103/**
70 * Load a filter graph description from a file104 * Load a filter graph description from a file
71 * @param filename Name of the file from which to load the description105 * @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