[FFmpeg-devel] [PATCH] libavdevice: JACK demuxer

Michael Niedermayer michaelni
Sun Mar 8 01:23:01 CET 2009

On Sun, Mar 08, 2009 at 12:26:33AM +0100, Olivier Guilyardi wrote:
> Michael Niedermayer a ?crit :
> > What you didnt consider though is that we will need a similar buffer for OSS
> > and possibly others, the jack ringbuffer cant be used for these.
> Okay, so, now please tell me why the hell do you want to use a ringbuffer in the 
> oss or other (de)muxers ?

a single threaded application like ffmpeg
that captures video and audio, encodes, muxes and stores this to disk is
not able to read data from the demuxers as regular as it might want.
That is even more true if the system is busy with other work.

I dont know straight of my head how much buffering is guranteed by OSS itself
so maybe iam underestimating the amount ...

And with some things like V4L there is the addiional issue that you have
neither a timestamp nor a way to find how much is in the buffer.
meassuring times by gettimeofday() from a seperate thread is likely more
accurate than the main thread that happens sometimes to be 100ms late
every few frames

also, it seems libavutil/fifo.c/h could be used now (as ive fixed a
alignment bug) so you dont have to implement anything, just call the
code from fifo.*
(and by that i of course mean storing AVPackets in there not the
floats themselfs)

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090308/d79a6960/attachment.pgp>

More information about the ffmpeg-devel mailing list