[Ffmpeg-devel] alsa input / output

Michael Niedermayer michaelni
Sun Mar 25 15:10:57 CEST 2007


Hi

On Sun, Mar 25, 2007 at 01:29:56PM +0100, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> 
> > Hi
> >
> > On Sun, Mar 25, 2007 at 11:48:19AM +0200, Reimar D?ffinger wrote:
> >> Hello,
> >> On Sun, Mar 25, 2007 at 05:26:16AM +0200, Michael Niedermayer wrote:
> >> > > I should also note that such a lock-free implementation depends
> >> > > on volatile keyword working "well enough" and pointer reads and
> >> > > writes being atomic on the architecture...
> >> > 
> >> > could you show one example where volatile makes a difference in practice?
> >> 
> >> In practice maybe not, but in theory you could do
> >> while (av_fifo_size(f) <= 0) sleep();
> >> and the compiler might inline av_fifo_size (not gcc though unless we
> >
> > NO!!!
> > no compiler can do this, it breaks the seperation of implementation and API
> > no way to relink with a lavu with different fifo implementation ...
> >
> > any inlining must be limited to within lavu ...
> 
> That's not a problem if the library is linked statically.  I'm not
> aware of linker that can do such inlining, but I'm pretty sure it's
> allowed.

the linker would have to disassemble the code ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070325/446fb650/attachment.pgp>



More information about the ffmpeg-devel mailing list