[Fwd: [GnomeMeeting-list] [PATCH] Better integration with Video4Linux for PWLIB]
- From: Damien Sandras <dsandras seconix com>
- To: gnomemeeting-list gnome org, derek indranet co nz
- Subject: [Fwd: [GnomeMeeting-list] [PATCH] Better integration with Video4Linux for PWLIB]
- Date: 21 Sep 2003 19:00:53 +0200
Hi Chris,
You are right about this one. I'm forwarding this email to Derek
Smithies who will be able to comment on your fix.
However, the driver shouldn't return a maximum width of 640 if it
doesn't support it.
My worry with the current patch is that other buggy drivers could also
report wrong default values after the VIDIOCGWIN ioctl. Nothing
indicates that the driver will return sensible values for this, in this
case, it will also fail.
-----Message suivi-----
> From: Chris Rankin <rankincj yahoo com>
> To: openh323 openh323 org, webcam smcc demon nl
> Cc: gnomemeeting-list gnome org
> Subject: [GnomeMeeting-list] [PATCH] Better integration with Video4Linux for PWLIB
> Date: 21 Sep 2003 17:16:26 +0100
>
> 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;
--
Damien Sandras <dsandras seconix com>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]