[MPlayer-dev-eng] [OS/2] ao fixes due to switch from AVFifoBuffer to AVFifi

Alexander Strasser eclipse7 at gmx.net
Tue Oct 1 19:06:45 EEST 2024


On 2024-10-01 16:39 +0900, KO Myung-Hun wrote:
> Hi/2.
>
> Alexander Strasser wrote:
> > On 2024-09-27 18:30 +0900, KO Myung-Hun wrote:
> >> Alexander Strasser wrote:
> >>> On 2024-09-26 16:55 +0200, Nicolas George wrote:
> >>>> Dave Yeo (12024-09-25):
> >>>>> Hi, this diff is needed to fix compilation on OS/2. Based on the changes to
> >>>>> ao_sdl,
> >>>>
> >>>> This patch looks legit. I cannot test, but I can push if nobody objects.
> >>>
> >>> Just reviewed the patch...
> >>>
> >>> IMHO it is OK to push if Dave can confirm it works.
> >>> I mean not only builds, but actual audio output is acceptable.
> >>>
> >>> I have the suspicion that it's not fully correct.
> >>> How does the playback work for OS/2 dart/kai?
> >>> Is it possible that the playback thread runs in parallel to the mplayer
> >>> thread?
> >>>
> >>
> >> As Dave said, libdart which is used by ao_dart and libkai which is used
> >> by ao_kai run its own threads to playback audio streams.
> >
> > If that's the current code is, to my understanding, not fully correct.
> >
> > The FIFO code must be safely usable by 2 threads concurrently for
> > this kind of architecture to work correctly.
> >
>
> BTW, AVFifo is not thread-safe ?

AVFifoBuffer mostly was I think.

AVFifo completely ditched thread safety and said it was a non-goal
from the beginning. Contrary to the history of that code that definitely
tried to be thread safe.

Anyway it is what it is now and probably better than no audio on OS/2.


  Alexander


> > But if you tested it and it worked for you, I'm not opposed to
> > having this committed to MPlayer SVN.
> >
>
> Thanks! I'll commit this patch.
>
> > When I ever get the time to look into jack again, I will consider
> > providing a safe FIFO implementation for this use case.
> >
>
> Ok, I'll apply your implementation later.


More information about the MPlayer-dev-eng mailing list