[FFmpeg-devel] [PATCH] [2/??] [2/3] Filter graphs - Basic infrastructure

Michael Niedermayer michaelni
Fri Feb 22 00:11:45 CET 2008


On Sat, Feb 16, 2008 at 12:44:04PM +0100, Vitor Sessak wrote:
> See $subj.
>

> /*
>  * filter graphs
>  * copyright (c) 2007 Bobby Bingham
>  *
[...]
> #include "avfilter.h"
> #include "avfiltergraph.h"
> 

> extern AVFilter avfilter_vf_scale;
> extern AVFilter avfilter_vf_graph;
> extern AVFilter avfilter_vf_graphdesc;

this belongs in some header


> 
> typedef struct AVFilterGraph {
>     unsigned filter_count;
>     AVFilterContext **filters;
> 
>     /** fake filters to handle links to internal filters */
>     AVFilterContext *link_filter_in;
>     AVFilterContext *link_filter_out;
> } GraphContext;
> 
> typedef struct {
>     AVFilterContext *graph;
> } GraphLinkContext;
> 
> static int link_init(AVFilterContext *ctx, const char *args, void *opaque)
> {
>     GraphLinkContext *linkctx = ctx->priv;
>     linkctx->graph = opaque;
>     return !opaque;
> }
> 
> /**
>  * Given the link between the dummy filter and an internal filter whose input
>  * is being exported outside the graph, this returns the externally visible
>  * link.
>  */
> static inline AVFilterLink *get_extern_input_link(AVFilterLink *link)
> {
>     GraphLinkContext *lctx = link->src->priv;
>     return lctx->graph->inputs[link->srcpad];
> }

Why are all the dummy filters needed? This looks kinda messy ...
Cant a filter graph just be a filter graph where the filters directly link
to the outside? If dummy filters really are needed (i need a clear explanation
for this first) then they should at least be in their seperate vf_ files.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080222/a6cbd918/attachment.pgp>



More information about the ffmpeg-devel mailing list