public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Genius Look 317
@ 2009-02-21 10:55 Sergei Antonov
  2009-02-22 20:49 ` CityK
  0 siblings, 1 reply; 3+ messages in thread
From: Sergei Antonov @ 2009-02-21 10:55 UTC (permalink / raw)
  To: video4linux-list

Hi!
I'm trying to make 'Genius Look 317' (0c45:60b0, gspca recognizes it) webcam work.

v4lgrab.c (from linux-2.6.28.5\Documentation\video4linux) loops infinitely in this code:

  do {
    int newbright;
    read(fd, buffer, win.width * win.height * bpp);
    f = get_brightness_adj(buffer, win.width * win.height, &newbright);
    if (f) {
      vpic.brightness += (newbright << 8);
      if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) {
        perror("VIDIOSPICT");
        break;
      }
    }
  } while (f);

because variable 'f' is always non-zero.
If I write 'while(0);' the resulting .ppm contains some random pixels in the top and the rest of the picture is black.
Need help.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-23  8:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-21 10:55 Genius Look 317 Sergei Antonov
2009-02-22 20:49 ` CityK
2009-02-23  8:52   ` Sergei Antonov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox