[MPlayer-dev-eng] Export audio filter: a few patches
ed at catmur.co.uk
ed at catmur.co.uk
Tue Nov 25 02:52:19 CET 2003
Thanks for your comments; sorry it took me a whole week to act on them.
I must have been on crack when I put that delay in. I tried a number of
methods to get synchronisation and settled on SysV semaphores as the
most elegant and portable - I'd have liked to use Posix condition
variables but in the LinuxThreads implementation they can't be shared
between processes. This isn't any of the classic IPC problems (that I
know of) but using 4 semaphores (2 for the writer, 2 for readers) seems
to work well.
This means adding an item to the header, for the semaphore array ID. In
order to future-proof the header I've placed the struct in a header file
and made its first element the size of the header.
The patch is now a little big (16K) so I've put it up at
http://home.jesus.ox.ac.uk/~ecatmur/patch/mplayer-1.0_pre2-export-filter.patch
Perhaps a third of that is explanation and example code (as much for my
benefit as for anyone else's)
Hope this meets with your approval,
Ed
On Mon, 2003-11-17 at 01:38, Anders Johansson wrote:
> > On Fri, 14 Nov 2003 06:05:00 +0000
> > ed at catmur.co.uk wrote:
> >
> > > I've been hacking on the export filter (trying to use it to import audio
> > > into XMMS), and have generated a few alterations.
> >
> > Is this patch ok ?
> >
> > Attila Kinali
> >
>
> The spelling corections and bugfixes are very good, but the changes
> from line 197 and down are bad. One should use spinlocks to control
> syncronization between apps, not delays. Also the delay will affect
> the playback of mplayer. I can not apply the bugfixes right now (no
> time) feel free to apply them.
>
> Cheers,
> //Anders
>
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
More information about the MPlayer-dev-eng
mailing list