[GnomeMeeting-list] [PATCH] Better integration with Video4Linux for PWLIB



Hi,

I have been trying to get my QuickCam working with gnomemeeting 0.98.5 and pwlib-1.5.3. The problem was that my camera was reporting a maximum frame size of 640x480, which is only correct when compression is available. However, I'm currently unable to use compression. This means that my maximum frame size is actually 352x288 at 5 fps.

I'm not sure what the best fix(es) are, but this patch against pwlib works. The idea is that the library reads the current hardware frame size instead of assuming that the maximum size is OK. I can set the driver's default hardware frame size and fps via module parameters, of course.

A second option is to modify the kernel module so that it reports a less ambitious maximum frame size if no compression is available, and this doesn't sound unreasonable either. I suppose that the ideal solution would involve both these fixes.

Cheers,
Chris
--- pwlib/src/ptlib/unix/video4linux.cxx.orig	Sun Sep 21 15:54:35 2003
+++ pwlib/src/ptlib/unix/video4linux.cxx	Sun Sep 21 17:00:50 2003
@@ -355,9 +355,15 @@
   }
 
   // set height and width
-  frameHeight = videoCapability.maxheight;
-  frameWidth  = videoCapability.maxwidth;
-  
+  struct video_window vwin;
+  if (::ioctl(videoFd, VIDIOCGWIN, &vwin) == 0) {
+    frameHeight = vwin.height;
+    frameWidth = vwin.width;
+  }
+  else {
+    frameHeight = videoCapability.maxheight;
+    frameWidth  = videoCapability.maxwidth;
+  }
 
   // Init audio
   struct video_audio videoAudio;


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