After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 498297 - [v4l2src] put real supported resolutions in caps instead of ranges
[v4l2src] put real supported resolutions in caps instead of ranges
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-19 19:59 UTC by Jaap A. Haitsma
Modified: 2007-12-07 10:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jaap A. Haitsma 2007-11-19 19:59:54 UTC
Currently some webcams return a GstIntRange for their width and height. However not all resolutions within those ranges work. In practice usually a few.

The v4l2src element should return only the reported resolutions.

See also mail on gst-devel
http://sourceforge.net/mailarchive/forum.php?thread_name=8a8adccc0711171336o75ced1aau999b38cb2e4e5f2b%40mail.gmail.com&forum_name=gstreamer-devel
Comment 1 Tim-Philipp Müller 2007-12-06 10:09:03 UTC
I believe this is fixed in CVS already (for kernels >= 2.6.19 at least).

Please re-open if this is not the case or I misunderstood.

Comment 2 Tim-Philipp Müller 2007-12-06 10:11:41 UTC
ie. I get this with gst-plugins-good CVS + ubuntu gutsy packages for my iSight:

$ GST_DEBUG=v4l2*:5 gst-launch-0.10 v4l2src ! fakesink 2>&1 | grep 'probed caps'
0:00:00.184046037 15978 0x6060a0 INFO               v4l2src gstv4l2src.c:710:gst_v4l2src_get_caps:<v4l2src0> probed caps: video/x-raw-yuv, format=(fourcc)YUY2, width=(int)720, height=(int)480, framerate=(fraction){ 25/1, 45/2, 20/1, 35/2, 15/1, 25/2, 10/1, 15/2, 5/1, 5/2, 1/1 }; video/x-raw-yuv, format=(fourcc)YUY2, width=(int)704, height=(int)576, framerate=(fraction){ 25/1, 45/2, 20/1, 35/2, 15/1, 25/2, 10/1, 15/2, 5/1, 5/2, 1/1 }; video/x-raw-yuv, format=(fourcc)YUY2, width=(int)160, height=(int)120, framerate=(fraction){ 30/1, 55/2, 25/1, 45/2, 20/1, 35/2, 15/1, 25/2, 10/1, 15/2, 5/1 }; video/x-raw-yuv, format=(fourcc)YUY2, width=(int)176, height=(int)144, framerate=(fraction){ 30/1, 55/2, 25/1, 45/2, 20/1, 35/2, 15/1, 25/2, 10/1, 15/2, 5/1 }; video/x-raw-yuv, format=(fourcc)YUY2, width=(int)320, height=(int)240, framerate=(fraction){ 30/1, 55/2, 25/1, 45/2, 20/1, 35/2, 15/1, 25/2, 10/1, 15/2, 5/1 }; video/x-raw-yuv, format=(fourcc)YUY2, width=(int)352, height=(int)288, framerate=(fraction){ 30/1, 55/2, 25/1, 45/2, 20/1, 35/2, 15/1, 25/2, 10/1, 15/2, 5/1 }; video/x-raw-yuv, format=(fourcc)YUY2, width=(int)640, height=(int)480, framerate=(fraction){ 30/1, 55/2, 25/1, 45/2, 20/1, 35/2, 15/1, 25/2, 10/1, 15/2, 5/1 }; image/jpeg, width=(int)1280, height=(int)1024, framerate=(fraction){ 30/1, 55/2, 25/1, 45/2, 20/1, 35/2, 15/1, 25/2, 10/1, 15/2, 5/1 }; image/jpeg, width=(int)1280, height=(int)960, framerate=(fraction){ 30/1, 55/2, 25/1, 45/2, 20/1, 35/2, 15/1, 25/2, 10/1, 15/2, 5/1 }; image/jpeg, width=(int)1280, height=(int)720, framerate=(fraction){ 30/1, 55/2, 25/1, 45/2, 20/1, 35/2, 15/1, 25/2, 10/1, 15/2, 5/1 }; image/jpeg, width=(int)1024, height=(int)768, framerate=(fraction){ 30/1, 55/2, 25/1, 45/2, 20/1, 35/2, 15/1, 25/2, 10/1, 15/2, 5/1 }; image/jpeg, width=(int)1024, height=(int)576, framerate=(fraction){ 30/1, 55/2, 25/1, 45/2, 20/1, 35/2, 15/1, 25/2, 10/1, 15/2, 5/1 }; image/jpeg, width=(int)800, height=(int)600, framerate=(fraction){ 30/1, 55/2, 25/1, 45/2, 20/1, 35/2, 15/1, 25/2, 10/1, 15/2, 5/1 }; image/jpeg, width=(int)720, height=(int)480, framerate=(fraction){ 60/1, 30/1, 55/2, 25/1, 45/2, 20/1, 35/2, 15/1, 25/2, 10/1, 15/2, 5/1 }; image/jpeg, width=(int)640, height=(int)480, framerate=(fraction){ 60/1, 30/1, 55/2, 25/1, 45/2, 20/1, 35/2, 15/1, 25/2, 10/1, 15/2, 5/1 }

Comment 3 Jaap A. Haitsma 2007-12-06 16:59:52 UTC
Tim,

Maybe on a low level it is OK but the reports I got was that gstreamer returns an int range for the width and the height.

I don't have an iSight myself. Can you compile cheese from SVN? (It's also in jhbuild if you use that)

And then check if in the function cheese_webcam_get_supported_video_formats  in cheese_webcam if the height and the width are returned as a range, or a list or just an int.

Thanks

Jaap
Comment 4 Tim-Philipp Müller 2007-12-06 19:26:40 UTC
> Maybe on a low level it is OK but the reports I got was that gstreamer returns
> an int range for the width and the height.
> 
> I don't have an iSight myself. Can you compile cheese from SVN? (It's also in
> jhbuild if you use that)
> 
> And then check if in the function cheese_webcam_get_supported_video_formats  in
> cheese_webcam if the height and the width are returned as a range, or a list or
> just an int.

In _get_supported_formats() the

    if (G_VALUE_HOLDS_INT (width))
    {
      ..
    }

code path gets executed.  No int ranges for width/height.

Comment 5 Jaap A. Haitsma 2007-12-06 21:01:46 UTC
OK, Daniel can you also try. If I remember correctly your camera (maybe a different iSight camera) had this problem

Comment 6 Jaap A. Haitsma 2007-12-06 22:16:37 UTC
Sorry, I think I got confused. iSight cameras don't return ranges for width and height. It's other cameras

Patryk we had some emails about this. Can you tell us which cameras do have this behavior and paste the output of 

GST_DEBUG=v4l2*:5 gst-launch-0.10 v4l2src ! fakesink 2>&1 | grep 'probed caps'
Comment 7 Tim-Philipp Müller 2007-12-07 10:28:15 UTC
(In reply to comment #6)
> Sorry, I think I got confused. iSight cameras don't return ranges for width and
> height. It's other cameras

Wouldn't that most likely just be an issue with the driver for that camera not implementing the (new-ish) VIDIOC_ENUM_FRAMESIZES ioctl?


> Patryk we had some emails about this. Can you tell us which cameras do have
> this behavior and paste the output of 
> 
> GST_DEBUG=v4l2*:5 gst-launch-0.10 v4l2src ! fakesink 2>&1 | grep 'probed caps'

and

   gst-inspect-0.10 v4l2src | grep Version

and

   uname -a