[MPlayer-dev-eng] [PATCH] use pthreads for cache on cygwin

David DeHaven dave at sagetv.com
Mon Dec 1 23:45:33 CET 2008


>>> I know, I just was not sure about the best logic.
>>> I still don't have Cygwin to test myself, but attached patch would
>>> probably work.
>>> I don't like it much though because it leaves the cache checks a  
>>> bit spread all
>>> over the place.
>>
>> It's better than what we have now, so commit it.
>
> Applied then. Maybe someone makes it a proper configure option or
> something, there may be a few people who might like to try it on Linux
> or some other OSes, it might work better with gmplayer (it might also
> crash more, depending whether GTK is thread-safe enough).

It'd be nice to have on Linux and Darwin. I had my own patch to do  
something similar... I was going develop it a bit further, clean it up  
then sumbit it but you beat me to the punch :)

The only _major_ difference I had was I moved the main cache loop into  
a separate function instead of #ifdef'ing the closing brace of  
stream_enable_cache (looks kinda sloppy).

I haven't tested this version yet, but I will get around to it today  
or tomorrow...

There's one problem I can see, pthread_t may or may not be a "unsigned  
int" sized value (esp. 64 bit systems) so I propose the following  
patch to stream/cache2.h.

-DrD-

-------------- next part --------------
A non-text attachment was scrubbed...
Name: stream-cache_pid_t.patch
Type: application/octet-stream
Size: 1186 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081201/c5b4b5b3/attachment.obj>
-------------- next part --------------





More information about the MPlayer-dev-eng mailing list