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



Le mar 23/09/2003 à 10:26, Stefan Bruens a écrit :
> ---
> |  The minimum and maximum sizes listed for a capture device do not imply all
> |  that all height/width ratios or sizes within the range are possible. A 
> |  request to set a size will be honoured by the largest available capture
> |  size whose capture is no large than the requested rectangle in either
> |  direction. For example the quickcam has 3 fixed settings.
> ---
> This means, the driver can choose any smaller size, as the maximum size may 
> depend on other circumstances, as frame size or colour format ...
> 
> Citing further:
> ---
> |  A successful call to VIDIOCSWIN indicates that a suitable set of parameters
> |  have been chosen. They do not indicate that exactly what was requested was
> |  granted. The program should call VIDIOCGWIN to check if the nearest match
> |  was suitable. 
> ---
> So the correct solution is to ask for a size, see, what we get, and, in the 
> case of pwlib, choose an appropriate converter.
> 

That's what PWLib is doing. And I can confirm that in the current case,
it is respecting the SPEC. But what happens is that it works in 2 steps:

- first, it tries to create a colour converter for YUV420P that will
convert between colour formats if the webcam doesn't support the
requested colour format (it will recurse until it finds a working
converter). That converter needs to work at a given size.
PWLib takes the returned max. width and max. height as default size.

- second, it tries to create a frame converter, able to convert between
a size that the camera supports and the size requested by the
application (it will recurse until it finds a working converter). That
converter is the same than in 1), but with the correct size this time.

However, it fails in the first step in the philips camera case because
the max. width and max. height reported sizes do not work. So creating a
colour format converter will not work. The first step only recurses to
find a valid colour format converter for a colour format supported by
the camera. It will not recurse to find a valid size supported by the
camera, that is done by the second step. That is why the first step
relies on values reported by the camera driver to always work. But that
is not the case here.

Of course, I don't tell PWLib is fully following the specs, and I don't
think Derek is telling that either, no code is perfect. GnomeMeeting is
not perfect either. We are just all doing our best to reach the best
quality possible.
-- 
 _	Damien Sandras
(o-	GnomeMeeting: http://www.gnomemeeting.org/
//\	FOSDEM 2004:  http://www.fosdem.org
v_/_	H.323 phone:  callto:ils.seconix.com/dsandras seconix com




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