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
Unified · Split
| @@ -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 */ | ||
| 61 | typedef 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 */ |
| 61 | typedef struct | 71 | typedef struct |
| 62 | { | 72 | { |
| @@ -66,6 +76,30 @@ typedef struct · 3 unmodified lines | |||
| 66 | AVFilterGraphDescExport *outputs; ///< outputs to export | 76 | AVFilterGraphDescExport *outputs; ///< outputs to export |
| 67 | } AVFilterGraphDesc; | 77 | } AVFilterGraphDesc; |
| 68 | 78 | ||
| 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 | |||
| 69 | /** | 103 | /** |
| 70 | * Load a filter graph description from a file | 104 | * Load a filter graph description from a file |
| 71 | * @param filename Name of the file from which to load the description | 105 | * @param filename Name of the file from which to load the description |