[MPlayer-cygwin] Change priority to realtime in windows
Joey Parrish
joey at nicewarrior.org
Tue Oct 5 18:20:15 CEST 2004
On Tue, Oct 05, 2004 at 01:02:54PM +0200, Diego Biurrun wrote:
> Joseph Miller writes:
> >
> > On Sunday 26 September 2004 6:28 pm, Daniel Johansson wrote:
> > > Hi, how to I change so that mplayer gets realtime priority by windows every
> > > time I start a movie? I got some problems with laggy movies but it works
> > > fine as soon as I change the priority to realtime. Is there any way to tell
> > > mplayer to always use realtime as priority, if so how?
> >
> > SetThreadPriority in winbase.h ought to help you out some.
> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/setthreadpriority.asp
>
> Any volunteers to implement something like this as an option? It has
> been requested many many times..
#ifdef WIN32
# include <windows.h>
#endif
[...]
#ifdef WIN32
SetThreadPriority(GetCurrentProcess(), THREAD_PRIORITY_TIME_CRITICAL);
#endif
IMHO, "time critical" is helpful, but not so aggressive that it even
needs to be optional. I do this in my packages. With this priority,
MPlayer gets preference over other normal apps, but will still defer CPU
time to critical OS tasks.
However, I think "real time" priority is bad, because it means as soon
as I try to play an extremely high bitrate file that my CPU just can't
handle, MPlayer eats up 100% CPU and gets priority over a lot of basic
windows components. I think this is a bad idea always.
--Joey
--
Me: "Isn't Kennedy as real as Colonel Sanders?"
Chad: "... Which Kennedy?"
More information about the MPlayer-cygwin
mailing list