[FFmpeg-devel] [PATCH] lavfi: add duration field to AVFilterBufferRef

Michael Niedermayer michaelni at gmx.at
Tue Jul 31 15:53:19 CEST 2012


On Mon, Jul 30, 2012 at 07:20:32PM +0200, Nicolas George wrote:
> Le tridi 13 thermidor, an CCXX, Stefano Sabatini a écrit :
> > ---
> >  libavfilter/audio.c       |    1 +
> >  libavfilter/avcodec.c     |    2 ++
> >  libavfilter/avfilter.h    |    7 +++++++
> >  libavfilter/buffer.c      |    1 +
> >  libavfilter/f_settb.c     |   10 ++++++----
> >  libavfilter/vf_showinfo.c |    6 ++++--
> >  6 files changed, 21 insertions(+), 6 deletions(-)
> 
> I must say, after some thought since last time it was suggested, I am not
> completely sure it is such a good idea.

duration is neccessary for low latency frame rate changing filters.
i think the filter framework would be a joke if it couldnt do that.


> 
> What happens with filters such as select? Is it supposed to wait for the
> next accepted frame in order to adjust the duration?

not really relevant.
select can set duration = N/A, thats just what it does ATM
improving select beyond that becomes possible if duration is available
also its easy to add a flag to inputs that says need_duration and let
the avfilter core then buffer one frame to get the duration if its
not available


> 
> And what if the duration and the next timestamp are inconsistent?

undefined behavior and there could be a filter that corrects such
inconsistencies in a consistent way


> 
> This is not an easy issue.

no but IMHO not adding information because its too hard to use it in all
cases is the worse.
A filter can alway just not look at a field if it doesnt want to


[....]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120731/c50b0c3d/attachment.asc>


More information about the ffmpeg-devel mailing list