[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbsd-tech
Subject:    Re: video -c: showing auto white balance temperature
From:       Marcus Glocker <marcus () nazgul ! ch>
Date:       2020-08-23 10:24:02
Message-ID: 20200823122402.3ffd14bf () x1 ! nazgul ! ch
[Download RAW message or body]

On Sun, 23 Aug 2020 08:59:10 +0100
Laurence Tratt <laurie@tratt.net> wrote:

> On Sun, Aug 23, 2020 at 09:17:57AM +0200, Marcus Glocker wrote:
> 
> Hello Marcus,
> 
> > Sorry for the delay - I'm back to business mode and need to take
> > care about naive project managers with crazy requirements the most
> > of the day  
> 
> Rather you than me :)
> 
> > See inline some (nitpicking) feedback and adapted diff.  Ok for
> > you?  
> 
> This is fine except:
> 
> > @@ -1684,7 +1705,7 @@ setup(struct video *vid)
> >  	 * after the video stream has been started since some cams
> > only
> >  	 * process this control while the video stream is on.
> >  	 */
> > -	dev_set_ctrl_auto_white_balance(vid, 0, 1);
> > +	dev_set_ctrl_auto(vid, V4L2_CID_AUTO_WHITE_BALANCE, 0, 1);
> >  
> >  	if (vid->mode & M_OUT_XV)
> >  		net_wm_supported(vid);  
> 
> This segfaults because we're passing the wrong constant in. This chunk
> should be:
> 
> @@ -1684,7 +1707,7 @@ setup(struct video *vid)
>  	 * after the video stream has been started since some cams
> only
>  	 * process this control while the video stream is on.
>  	 */
> -	dev_set_ctrl_auto_white_balance(vid, 0, 1);
> +	dev_set_ctrl_auto(vid, CTRL_WHITE_BALANCE_TEMPERATURE, 0, 1);
>  
>  	if (vid->mode & M_OUT_XV)
>  		net_wm_supported(vid);

Oh dear, thanks for spotting :-)

> 
> Laurie
> 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic