Fast Screenshot without blocking X events

GORIN Guillaume guillaume.gorin at
Tue Oct 16 02:00:27 PDT 2007


I have some questions concerning the way of doing screenshot on X11. Ok
there is some software that can do it, but, i need to implement it in my
software and I have some restrictions:

-I don't want that all events on X are waiting in a stack, or something
like this. Actually when capturing (using XGetImage) i can't continue to
move window. It's why I suppose there is a stack of X events, that wait
while capturing. Is it true? (If someone can tell me where to find
informations about that. Xorg Wiki didn't help me).

-I need something that is really fast (0.1 second maximum for capturing
 and saving the frame in RAM) (I capture the maximum of frames to encode
in a video)

My screen is in 3200x1200 pixels in 24 bits (2 screens in 1600x1200 in
twinview). So to optimize the time and to make screenshot without using
X events, I tried to use the framebuffer. I modified the VESA driver for
using a resolution in 3200x1200 (it didn't want to take this resolution
with fbset). I use it to boot, and then I use the nvidia driver (from
nvidia website) on X.
I'm able to take screenshot in 3200x1200 in the framebuffer, but it
takes 2.8 seconds. It's too long for me. I suppose there is a stream
from X to the framebuffer, it's why reading is too long. And yeah the
DMA isn't activate, and NVIDIA has no support with EXA.

My questions are:
-How X use the framebuffer /dev/fb0 when activated?
-Can I take screenshot without blocking X events?
-Where can I get the picture of the screen before X send it to my
geforce? (Is it possible?)
-Where can i find informations on interactions between xorg, the vesa
driver and the nvidia driver.
-If someone has a best Idea of doing what I want, thank you.

My computer, if it helps
Intel P4 3GHz
512 Mo of RAM
Geforce FX 5700 Ultra
Kernel: (I can use one other)
Video driver:
Xorg: 6.8.1 (I can use a newer if needed)
Fedora Core realese 3 (I didn't have the choice) 

Best regards,

More information about the xorg mailing list