History

Prefix with "ff_" the functions: ff_avfilter_graph_check_validity() ff_avfilter_graph_config_links() ff_avfilter_graph_config_formats()

and move their declaration to internal.h. These functions are never used in application code, so it is better to consider them internal functions, this can be changed later if necessary. Simplify API. Originally committed as revision 25737 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 16 years ago

Commit 4fcbb2a1 parent bbf07bf5 files · +42 −31Browse files

Unified · Split

5 files
  1. doc/APIchanges +8 −0
  2. libavfilter/avfilter.h +1 −1
  3. libavfilter/avfiltergraph.c +7 −6
  4. libavfilter/avfiltergraph.h +3 −24
  5. libavfilter/internal.h +23 −0
doc/APIchanges+8−0
@@ -13,6 +13,14 @@ libavutil: 2009-03-08 · 12 unmodified lines
13 13
14API changes, most recent first:14API changes, most recent first:
15 15
162010-11-13 - r25737 - lavfi 1.61.0 - avfiltergraph.h
17 Remove declarations from avfiltergraph.h for the functions:
18 avfilter_graph_check_validity()
19 avfilter_graph_config_links()
20 avfilter_graph_config_formats()
21 which are now internal.
22 Use avfilter_graph_config() instead.
23
162010-11-08 - r25708 - lavu 50.33.0 - eval.h242010-11-08 - r25708 - lavu 50.33.0 - eval.h
17 Deprecate functions:25 Deprecate functions:
18 av_parse_and_eval_expr(),26 av_parse_and_eval_expr(),
libavfilter/avfilter.h+1−1
@@ -25,7 +25,7 @@ · 24 unmodified lines
25#include "libavutil/avutil.h"25#include "libavutil/avutil.h"
26 26
27#define LIBAVFILTER_VERSION_MAJOR 127#define LIBAVFILTER_VERSION_MAJOR 1
28#define LIBAVFILTER_VERSION_MINOR 6028#define LIBAVFILTER_VERSION_MINOR 61
29#define LIBAVFILTER_VERSION_MICRO 029#define LIBAVFILTER_VERSION_MICRO 0
30 30
31#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \31#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
libavfilter/avfiltergraph.c+7−6
@@ -25,6 +25,7 @@ · 24 unmodified lines
25 25
26#include "avfilter.h"26#include "avfilter.h"
27#include "avfiltergraph.h"27#include "avfiltergraph.h"
28#include "internal.h"
28 29
29AVFilterGraph *avfilter_graph_alloc(void)30AVFilterGraph *avfilter_graph_alloc(void)
30{31{
@@ -52,7 +53,7 @@ int avfilter_graph_add_filter(AVFilterGraph *graph, AVFilterContext *filter) · 21 unmodified lines
52 return 0;53 return 0;
53}54}
54 55
55int avfilter_graph_check_validity(AVFilterGraph *graph, AVClass *log_ctx)56int ff_avfilter_graph_check_validity(AVFilterGraph *graph, AVClass *log_ctx)
56{57{
57 AVFilterContext *filt;58 AVFilterContext *filt;
58 int i, j;59 int i, j;
@@ -82,7 +83,7 @@ int avfilter_graph_check_validity(AVFilterGraph *graph, AVClass *log_ctx) · 23 unmodified lines
82 return 0;83 return 0;
83}84}
84 85
85int avfilter_graph_config_links(AVFilterGraph *graph, AVClass *log_ctx)86int ff_avfilter_graph_config_links(AVFilterGraph *graph, AVClass *log_ctx)
86{87{
87 AVFilterContext *filt;88 AVFilterContext *filt;
88 int i, ret;89 int i, ret;
@@ -194,7 +195,7 @@ static void pick_formats(AVFilterGraph *graph) · 105 unmodified lines
194 }195 }
195}196}
196 197
197int avfilter_graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx)198int ff_avfilter_graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx)
198{199{
199 /* find supported formats from sub-filters, and merge along links */200 /* find supported formats from sub-filters, and merge along links */
200 if(query_formats(graph, log_ctx))201 if(query_formats(graph, log_ctx))
@@ -211,11 +212,11 @@ int avfilter_graph_config(AVFilterGraph *graphctx, AVClass *log_ctx) · 10 unmodified lines
211{212{
212 int ret;213 int ret;
213 214
214 if ((ret = avfilter_graph_check_validity(graphctx, log_ctx)))215 if ((ret = ff_avfilter_graph_check_validity(graphctx, log_ctx)))
215 return ret;216 return ret;
216 if ((ret = avfilter_graph_config_formats(graphctx, log_ctx)))217 if ((ret = ff_avfilter_graph_config_formats(graphctx, log_ctx)))
217 return ret;218 return ret;
218 if ((ret = avfilter_graph_config_links(graphctx, log_ctx)))219 if ((ret = ff_avfilter_graph_config_links(graphctx, log_ctx)))
219 return ret;220 return ret;
220 221
221 return 0;222 return 0;
libavfilter/avfiltergraph.h+3−24
@@ -52,33 +52,12 @@ AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, char *name); · 51 unmodified lines
52 */52 */
53int avfilter_graph_add_filter(AVFilterGraph *graphctx, AVFilterContext *filter);53int avfilter_graph_add_filter(AVFilterGraph *graphctx, AVFilterContext *filter);
54 54
55/**
56 * Check for the validity of graph.
57 *
58 * A graph is considered valid if all its input and output pads are
59 * connected.
60 *
61 * @return 0 in case of success, a negative value otherwise
62 */
63int avfilter_graph_check_validity(AVFilterGraph *graphctx, AVClass *log_ctx);
64
65/**
66 * Configure all the links of graphctx.
67 *
68 * @return 0 in case of success, a negative value otherwise
69 */
70int avfilter_graph_config_links(AVFilterGraph *graphctx, AVClass *log_ctx);
71
72/**
73 * Configure the formats of all the links in the graph.
74 */
75int avfilter_graph_config_formats(AVFilterGraph *graphctx, AVClass *log_ctx);
76
77/**55/**
78 * Check validity and configure all the links and formats in the graph.56 * Check validity and configure all the links and formats in the graph.
79 *57 *
80 * @see avfilter_graph_check_validity(), avfilter_graph_config_links(),58 * @param graphctx the filter graph
81 * avfilter_graph_config_formats()59 * @param log_ctx context used for logging
60 * @return 0 in case of success, a negative AVERROR code otherwise
82 */61 */
83int avfilter_graph_config(AVFilterGraph *graphctx, AVClass *log_ctx);62int avfilter_graph_config(AVFilterGraph *graphctx, AVClass *log_ctx);
84 63
libavfilter/internal.h+23−0
@@ -25,6 +25,7 @@ · 24 unmodified lines
25 */25 */
26 26
27#include "avfilter.h"27#include "avfilter.h"
28#include "avfiltergraph.h"
28 29
29void ff_dprintf_ref(void *ctx, AVFilterBufferRef *ref, int end);30void ff_dprintf_ref(void *ctx, AVFilterBufferRef *ref, int end);
30 31
@@ -34,4 +35,26 @@ void ff_dprintf_link(void *ctx, AVFilterLink *link, int end); · 3 unmodified lines
34 35
35#define FF_DPRINTF_START(ctx, func) dprintf(NULL, "%-16s: ", #func)36#define FF_DPRINTF_START(ctx, func) dprintf(NULL, "%-16s: ", #func)
36 37
38/**
39 * Check for the validity of graph.
40 *
41 * A graph is considered valid if all its input and output pads are
42 * connected.
43 *
44 * @return 0 in case of success, a negative value otherwise
45 */
46int ff_avfilter_graph_check_validity(AVFilterGraph *graphctx, AVClass *log_ctx);
47
48/**
49 * Configure all the links of graphctx.
50 *
51 * @return 0 in case of success, a negative value otherwise
52 */
53int ff_avfilter_graph_config_links(AVFilterGraph *graphctx, AVClass *log_ctx);
54
55/**
56 * Configure the formats of all the links in the graph.
57 */
58int ff_avfilter_graph_config_formats(AVFilterGraph *graphctx, AVClass *log_ctx);
59
37#endif /* AVFILTER_INTERNAL_H */60#endif /* AVFILTER_INTERNAL_H */

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