[Ffmpeg-devel] Re: [Ffmpeg-cvslog] r7570 - trunk/libavutil/fifo.c
Roman Shaposhnik
rvs
Wed Jan 24 03:58:31 CET 2007
Hi
On Fri, 2007-01-19 at 12:12 +0100, Michael Niedermayer wrote:
> i knew you would like my suggestion ;)
I always do ;-)
> > Now, the only problem I have with your approach is that you're
> > exposing the guts of a Fifo implementation and that doesn't seem
> > right to my OO-self. After all, that's what av_fifo_peek()
> > was introduced for anyway.
>
> the problem i have (and had) with av_fifo_peek() is that it doesnt
> solve the fifo-guts dependance it just hides it which IMHO is worse
> people could use av_fifo_peek() and expect to have no dependance on the
> fifo guts but they do, at the ABI level
Right. That's the price paid for av_fifo_peek()'s performance. Now,
currently the way DV audio is shuffled we have to 'peek' every time we
need to get to the next byte in the FIFO. As I pointed out it is
possible to restructure the code so that we would go over the bytes
stored in FIFO in a linear fashion and thus eliminate the peeking
process. But even though that would let us get rid of av_fifo_peek()
it will introduce a different kind of ugliness where I would have
to supply a stateful 'thunk' to av_fifo_generic_read.
I guess at this point I am really curious to understand why do you
consider ABI level dependency to be a big deal ? Do you actually expect
anybody to use libavutil independently of libavcodec/libavformat ?
We don't make a shared library out of libavutil, do we ?
Thanks,
Roman.
More information about the ffmpeg-devel
mailing list