Re: [GnomeMeeting-list] [PATCH] Add USE_CURRENT_HARDWARE_SIZE hint



Hi Chris,

Are you sure that your camera always returns good default values for the
current hardware size?

I'm a bit against the integration of this patch in CVS for several
reasons :
- I have emailed the driver author so that he fixes the problem
- we are several to use the same camera with the same driver as you with
the pwcx module loaded and it fixes the problem
- we take the risk to break things

As soon as I have the answer of the driver author and as soon there is a
fix, we can remove that hint from CVS.

Le lun 22/09/2003 à 01:14, Chris Rankin a écrit :
> OK, I can take a hint... ;-)
> 
> Chris
> 
> ______________________________________________________________________
> --- pwlib/src/ptlib/unix/video4linux.cxx.orig	Sun Sep 21 15:54:35 2003
> +++ pwlib/src/ptlib/unix/video4linux.cxx	Mon Sep 22 00:08:27 2003
> @@ -192,6 +192,7 @@
>  #define HINT_CGWIN_FAILS                    0x0080  /// ioctl VIDIOCGWIN always fails.
>  #define HINT_FORCE_LARGE_SIZE               0x0100  /// driver does not work in small video size.
>  #define HINT_FORCE_DEPTH_16                 0x0200  /// CPiA cameras return a wrong value for the depth, and if you try to use that wrong value, it fails.
> +#define HINT_USE_CURRENT_HARDWARE_SIZE      0x0400  // Use defaults instead of claimed limits
>  
>  static struct {
>    char     *name_regexp;        // String used to match the driver name
> @@ -245,6 +246,15 @@
>      VIDEO_PALETTE_YUV420P 
>    },
>  
> +  /** This should really apply to all Philips-based
> +   *  webcams without the decompressor module loaded.
> +   */
> +  { "^Logitech QuickCam",
> +    "Logitech QuickCam, using default settings",
> +    HINT_USE_CURRENT_HARDWARE_SIZE,
> +    VIDEO_PALETTE_YUV420P 
> +  },
> +
>    /** Creative VideoBlaster Webcam II USB
>     */
>    {"CPiA Camera",
> @@ -355,9 +365,16 @@
>    }
>  
>    // set height and width
> -  frameHeight = videoCapability.maxheight;
> -  frameWidth  = videoCapability.maxwidth;
> -  
> +  struct video_window vwin;
> +  if ( HINT(HINT_USE_CURRENT_HARDWARE_SIZE) &&
> +       (::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
(o-	GnomeMeeting: http://www.gnomemeeting.org/
//\	FOSDEM 2003:  http://www.fosdem.org
v_/_	H.323 phone:  callto://ils.seconix.com/dsandras seconix com
echo
'12245692587856285105409351sn[ln0=aln256%Pln256/snlbx]sb[q]salbxq'|dc






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