[FFmpeg-devel] [PATCH 3/3] lavfi: fix doxygen doc for AVFilterLink.time_base
stefasab at gmail.com
Fri Sep 16 11:55:27 CEST 2011
On date Monday 2011-09-12 03:05:59 +0200, Michael Niedermayer encoded:
> On Sun, Sep 11, 2011 at 01:47:29PM +0200, Stefano Sabatini wrote:
> > Subject: [PATCH] lavfi: drop AVFilterLink.sample_rate at the next major bump
> > Use time_base instead for storing such information.
> > This avoids duplication of information, and simplifies PTS handling for
> > the unified API, as time_base can be used for computing both audio and
> > video buffers timestamps.
> iam ok with this, just one note to make sure we dont by mistake run in
> an issue with it
> mpeg-ps has a timebase of 90khz and samplerates of 44.1,48,22.05, ...
> that means if we want to preserve this through the filter chains
> (and i dont know if we want or dont want...)
> then we need both timebase & sample_rate
> otoh i dont mind at all to drop that extra complexity and use a
> timebase equal to the samplerate
Uhm, no strong opinion on this, in general timebase can be different
from 1/samplerate, so I'm not against keeping both fields if it makes
sense (does it?).
In case we want to follow this path: how to set correctly the
sample_rate/time_base in the link?
I suppose a possible approach may be:
1. if both sample_rate and time_base are set, do nothing
2. if the sample_rate is not set and time_base is, set the samplerate
to the value of time_base.den
3. if time_base is not set and time_base is, set the time_base to
4. fail otherwise
So a source may decide to set either only the sample_rate or only the
time_base in an output link.
So it may set the time_base (in this case samplerate is set as
time_base.den), or the samplerate (in this case timebase is
set to 1/samplerate).
FFmpeg = Faithless and Funny Minimal Programmable Enlightening Genius
More information about the ffmpeg-devel