[gst-devel] Re: [patch] gstreamer v4l2 source frame rate detection

Edgard Lima edgard.lima at indt.org.br
Thu May 4 07:15:08 CEST 2006


Hi Martin,

Thanks. I'm coding v4l2src right now. I ll put credits for you when 
commiting it.
Ive have a tv-card here, but a webcam, so we could test together :)

BR,
Edgard - alima
edgard.lima at indt.org.br


ext Martin_Rubli at logitech.com wrote:

>Hi Edgard,
>
>I've been working with the author of the Linux UVC driver
>(http://linux-uvc.berlios.de/) on a few issues and when we did some tests
>with the GStreamer v4l2 source we discovered a problem with the frame rate
>detection.
>
>The gst_v4l2src_get_fps function relies on the driver's video standard
>announcements, something that's not usually available in webcams (and it
>certainly isn't in the UVC driver). If the norm cannot be detected, it
>bails out and capturing fails. Instead, VIDIOC_G_PARM should be used in
>such cases.
>
>Something else that stroke me as a little weird was the fact that the frame
>rate gets queried before every frame (actually twice, once in 'buffer_new'
>and once in 'create'). In the original case where the frame rate came from
>a cached list of video standards, the overhead is minimal, yet present.
>When the frame rate comes from a G_PARM ioctl request, the overhead is
>somewhat higher. I'm not aware of any devices that dynamically change the
>frame rate, so I think there's no point. If such devices do exist, please
>correct me! :-)
>
>The first version of the patch only adds G_PARM support to the get_fps
>function. The second one is a superset of the first one and caches the fps
>numerator and denominator in the _GstV4l2Src structure after querying it in
>the capture_init method to avoid repeated ioctls. The changes allow UVC
>devices to work with GStreamer.
>
>Unfortunately, I don't have a TV card here that I could test it with, but I
>think the patch shouldn't break anything. Please let me know, if you have
>any questions/suggestions.
>
>Cheers,
>Martin
>
>
>(See attached file: 01-webcam_framerate.patch)(See attached file:
>02-webcam_framerate.patch)
>





More information about the gstreamer-devel mailing list