Hi,
On 9/12/06, Laurent Pinchart <[EMAIL PROTECTED]> wrote:
> Hi,
>
> > > The UVC driver returns the size of the currently set format. So if you do
> > > a S_FMT with 640x480 first, CROPCAP should indeed return 640x480.
> > >
> > > The problem with CROPCAP is that for the most part it doesn't apply to
> > > digital devices. For a while, the call wasn't supported at all but it
> > > seems that it is mandatory, so we just tried to return _something_ that
> > > makes sense. If you have any suggestions as to the interpretation of the
> > > V4L2 spec, I'd be happy to hear your view.
> >
> > Currently i think very less information is given by uvcvideo driver.
> > When i applied one by one ioctl's to get what my webcam can supports
> > and what not in terms of frame formats, various width and heights.
>
> Could you elaborate ? I don't understand what you mean.

  I mean i have written a v4l2-tool GUI application that will take
video device and apply all available ioctls under v4l2 API and get all
information of attached webcam and display it.
There when i apply CROPCAP ioctl i got 160x120 width and height which
must be 640x480( I am talking about Logitech Quickcam Pro 5000
webcam).

>
> > I found if i use  v4l2_enumfrmfmt.h  then i am getting various sizes.
> > Is not it possible ti include this header file in uvcviodeo.c and let
> > ioctl given in that header file give the various sizes supported by
> > webcam hardware. So is it possible to make that VIDIOC_ENUM_FMT be
> > included in uvcviudeo.c
>
> You don't need to include v4l2_enumfrmfmt.h in uvcvideo.c. v4l2_enumfrmfmt.h
> defines a few new ioctls. Those ioctls will be submitted for inclusion to the
> V4L2 maintainer, so the v4l2_enumfrmfmt.h file is only needed until the
> ioctls will be included in the standard. In other words, if you want to use
> the new ioctls, just include the file v4l2_enumfrmfmt.h in your application
> until those ioctls are added to linux/videodev2.h.

  That's very nice. Those ioctls must be included then in V4L2 APIs.

[snip]
> > It clearly showed that as MJPG is default frame thru ioclt,s i am
> > getting therefore i am getting the first value in above output as
> > width=160 and height=120.
> > But same output showed max width=640 and height=480. So can it be
> > possible to modify ioctl code to return either max values for default
> > frame when applied VIDIOC_CROPCAP ??
>
> I understand what you mean. VIDIOC_CROPCAP should be changed to return the
> sensor size. But that leaves a question: how do we find out the sensor size ?
> It might not be the maximum resolution, as the camera could upscale the
> image. The biggest width/height could also not be available at the same time.
> Imagine a webcam with a 1024x768 sensor which could do 1024x512 and 800x756
> only ? (I know it sounds weird, but manufacturers sometimes come up with
> weirder things).
>

So all problems should end in those ioctls which are waiting for their
inclusion in V4L2 API.

> > Or can it be possible in uvcvideo to have max and min width and height
> > structure members and let them return max and min values. I know it
> > was case for V4l but not for V4l2.
> >
> > All above are my thought for uvcvideo. This all i am thinking for if
> > anyone want to write a video viewer app then how come he will get that
> > info to show streaming video in various supported sizes( Me is also
> > trying to write video viewer but first to understand all v4l2 API
> > well)
>
> You should use the frame rate enumeration ioctls if you need information
> regarding all the supported formats and sizes. The UVC driver is currently
> the only driver supporting those ioctls, but other drivers will hopefully be
> migrated soon when the ioctls will be submitted for inclusion in the v4l2
> spec.

Thanks for explanation.
Regards,
Parag.
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to