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

Stefano Sabatini stefano.sabatini-lala
Wed Sep 15 16:39:47 CEST 2010


On date Wednesday 2010-09-15 13:54:14 +0200, Michael Niedermayer encoded:
> On Wed, Sep 15, 2010 at 12:56:38AM +0200, Stefano Sabatini wrote:
[...] 
> as said, the filter must be functional to be approved.
> source implicates that it produces some samples, a filter never returning a
> single sample is just broken.
> and you dont need a mixer (whatever that may be) to return an array inited
> with memset(0)

Repeating the same considerations I already did, why would a nullsrc
filter useful?

1) for testing a functional source and an ff* tool we need an audio
mixer filter (I mean a filter for merging two audio inputs), which
currently we don't have.

2) even if we'd have the mixer filter, it may be useful to test the
setup of a source with a particular channel layout / sample rate /
sample format which is not necessarily reproducible with a random
source.

For example the ffplay.c audio source is not registered, having a
nullsrc filter can be useful for testing the setup of an ffplay
filterchain (btw this is also the reason for which I implemented the
null video source).

3) the code is pedagogically useful as example and template

4) it is consistent with the null video source

Finally we'll add real "functional" sources later, once we'll have the
basic testing framework already set-up.

Regards.
-- 
FFmpeg = Fabulous Faithful Mean Purposeless Enchanting Gadget



More information about the ffmpeg-devel mailing list