[FFmpeg-devel] [PATCH] Add asrc_anullsrc - null audio source

Michael Niedermayer michaelni
Mon Aug 23 20:24:10 CEST 2010


On Sat, Aug 21, 2010 at 12:25:24AM +0200, Stefano Sabatini wrote:
> On date Friday 2010-08-20 01:06:04 +0200, Michael Niedermayer encoded:
> > On Fri, Aug 20, 2010 at 01:03:27AM +0200, Stefano Sabatini wrote:
> [...]
> > > > > +/**
> > > > > + * @file
> > > > > + * null audio source
> > > > > + */
> > > > > +
> > > > > +#include "avfilter.h"
> > > > > +
> > > > > +typedef struct {
> > > > > +    int64_t channel_layout;
> > > > > +    int64_t sample_rate;
> > > > > +} ANullContext;
> > > > > +
> > > > > +static int init(AVFilterContext *ctx, const char *args, void *opaque)
> > > > > +{
> > > > > +    ANullContext *priv = ctx->priv;
> > > > > +
> > > > > +    priv->sample_rate = 44100;
> > > > > +    priv->channel_layout = CH_LAYOUT_STEREO;
> > > > > +
> > > > > +    if (args)
> > > > > +        sscanf(args, "%ld:%ld", &priv->sample_rate, &priv->channel_layout);
> > > > 
> > > > reading channel layout like this is maybe not ideal
> > > 
> > > Please elaborate.
> > 
> > 7
> > 
> > you want an english awnser instead of a number?
> > the user also wants to specify his speaker configuration be listing
> > speakers and not just their number
> 
> I suppose this means that the user should be able to specify a string
> rather than a number? I had the same concern, but I'm not sure we have
> an API right now for doing the string <-> number mapping.

yes
but not only that, x channels is ambigous, there can be several layouts
with x channels


[...]

> > > > this appears a little pointless whats the point of this filter then if it
> > > > generates no output
> > > 
> > > To test the setup of a filterchain, e.g. with graph2dot.
> > 
> > and why does the filter only that and not work like a real one?
> 
> Because it is supposed to be used only for testing the filterchain
> setup, and so the simpler it is the better it is (note that this is
> the corresponding of the nullsrc video source).

you surely can use a functional filter to test the filterchain setup.
So this filter as is is unneeded


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

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100823/fec62b01/attachment.pgp>



More information about the ffmpeg-devel mailing list