[MPlayer-cygwin] Giving mplayer higher priority

Diego Biurrun diego at biurrun.de
Tue Jul 6 17:07:01 CEST 2004


Reimar Döffinger writes:
> I want to suggest giving MPlayer higher priority.
> Please tell me if you agree.
> 
> Reasons:
> 1) MPlayer is a (soft) realtime app, so it's actually correct ;-)
> 2) Even when only playing MP3s (uses < 2% of CPU), MPlayer stutters 
> otherwise when I do something CPU-bound in a foreground process or 
> simply start a new program (because foreground processes get higher 
> priority automatically).
> 
> I used HIGH_PRIORITY_CLASS, because the class inbetween HIGH and NORMAL 
> isn't available in Win9x (although the problem isn't so big there, it's 
> mostly with WinXP).
> 
> I'm not sure where to put this in mplayer.c, just took a random place.
> 
> --- mplayer.c.org	Fri May 14 20:25:04 2004
> +++ mplayer.c	Fri May 14 20:26:44 2004
> @@ -824,6 +824,10 @@
>  }
>  #endif /*WIN32 && USE_WIN32DLL*/
>  
> +#ifdef WIN32
> +SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
> +#endif
> +
>  #ifdef USE_TV
>    tv_param_immediate = 1;
>  #endif

Sascha, have you refused/applied this?

Diego




More information about the MPlayer-cygwin mailing list