Re: Re: Slow Frame Rate (approx. 4 fps)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi Stephen,

Op vr 16-08-2002, om 06:01 schreef Stephen Crampton:
> > Also, the image freezes briefly every so often.  Do you have
> > recommendations for how to keep the frame rate more or less constant?
> 
> For instance, does anyone know what C routines would give my process a
> higher than ordinary priority (I realize this means I would probably have
> to run it as root)?  When I'm running the video program, I don't want to
> be interrupted by routine system processes.

For separate threads, pthread has some functions for that. See
pthread_setschedparam() in pthread.h. For the application (main thread),
see 'man nice'. 'nice -n -10 -- <yourapp> [options]' would probably be a
good start. In C, you would look at nice() (man 2 nice) or setpriority()
(man setpriority). And indeed, setting negative priorities (negative
means higher priority) requires root.

Ronald

-- 
-   .-.
-   /V\    | Ronald Bultje <rbultje@xxxxxxxxxxxxxxxxxxx>
-  // \\   | Running: Linux-2.4.18-3 and OpenBSD 3.0
- /(   )\  | http://ronald.bitfreak.net/
-  ^^-^^





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux