(no subject)
From: p.gilardetti@libero.it <hidden>
Date: 2003-02-06 15:27:25
Hi,
I have a problem when I change the bpp value, here is the code:
if( ioctl(fbd, FBIOGET_VSCREENINFO, &var_info) == -1){
perror("\nError IOCTL 1");
exit(0);
}
printf("\n bpp: %d", var_info.bits_per_pixel); // output is bpp: 16
var_info.bits_per_pixel = 24;
if( ioctl(fbd, FBIOPUT_VSCREENINFO, &var_info) == -1){
perror("\nError IOCTL 2");
exit(0);
}
The program exit with the following message error:
Error IOCTL 2: Invalid argument
How can I set the bpp value? Should I modify the file /etc/X11/XF86Config?
I have another problem, I try to write a simple program that reads frame from framebuffer and then creates a Divx file of a few seconds.
I map the framebuffer to a buffer, but the program crash with a segmentation fault:
screen_buffer = (char *)malloc(DIM_BUFFER * sizeof(char));
screen_buffer = (void *)mmap(0, DIM_BUFFER, PROT_READ, MAP_SHARED, fbd, 0);
encFrame.image = (void *)screen_buffer; <--- causes seg fault
What's wrong?
Thanks,
Paolo Gilardetti
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com