Re: Questions about detecting video devices (detect.py)



2007/11/15, daniel g. siegel <dgsiegel gmail com>:
> btw: i updated patryks script, which is available on the cheese page

Thanks.

> On Mi, 2007-11-14 at 22:12 +0100, Jaap A. Haitsma wrote:
> > Patryk,
> >
> > Based on you detect.py I made a C implementation that works for me,
> > but unfortunately not for Daniel.
> >
> > I've now discovered what's causing this because I now understand your
> > detect.py script fully (I think)
> >
> >
> > The problem is that if you ask for the width or height or framerate
> > gstreamer has multiple ways to tell you this they can be in a GstList
> > or in a GstFractionRange, GstIntRange or GstDoubleRange.
> >
> > My question is do all these types occur for webcams. For instance for
> > width a GstDoubleRange or GstFractionRange seems pretty lame. My
> > current thinking is the following
> >
> >  width, height
> > ------------------------------
> > 1. Just an integer in seprate GstStructures
> > 2. GstList with ints
> > 3. GstIntRange
> >
> > So no Fractions and doubles

Yes, fractions and doubles are out.

> > Frame rate
> > ------------------------
> > 1. a GstList with Fractions
> > 2. a GstList with ints
> > 3. a GstList with doubles
> > 4. a GstFractionRange
> > 5. a GstDoubleRange
> >
> > Do you know if my thinking is correct?

I believe framerate is always a fraction range or a list of fractions.
Never saw any other entries.

> > Furthermore I see in your code that if width, and height are
> > GstIntRanges you don't list all the possible values. But just values
> > that are powers of 2 larger than the minimum or powers of 2 lower than
> > the maximum.
> >
> > Do you do this to limit the number of entries in your fdi file or do
> > cameras with GstIntRange for width and height not support weird
> > resolutions such as for instance 349 x 254

My testing shows that no tested camera supported resolutions outsite
this range. One reason is the sensor has a pre-defined resolution,
another is it has to keep the aspect ratio. I believe the problem is
width and height are separate values so there is no way for a driver
to return a list of working pairs.

-- 
Patryk Zawadzki
PLD Linux Distribution


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