[Bug 726194] v4l2src does not cope well when a capture card is sometimes interlaced, sometimes progressive at the same resolution

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Oct 31 10:47:20 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=726194
  GStreamer | gst-plugins-good | git

--- Comment #13 from Simon Farnsworth <simon.farnsworth at onelan.co.uk> 2014-10-31 17:47:13 UTC ---
Created an attachment (id=289757)
 View: https://bugzilla.gnome.org/attachment.cgi?id=289757
 Review: https://bugzilla.gnome.org/review?bug=726194&attachment=289757

[PATCH] v4l2: Clean up interlace support


Rather than try and guess interlace support as part of checking supported
sizes, look for interlace support specifically in its own function.

As a cleanup, use V4L2_FIELD_ANY when probing sizes, which should result in
the driver doing the right thing.

With my capture setup, this gets me the following sample caps:

For 1080i resolution:
video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)interleaved,
framerate=(fraction){ 25/1, 30/1 }

For 720p resolution:
video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
framerate=(fraction){ 50/1, 60/1 }

For 576i/p resolution (both possible at the point of query):
video/x-raw, format=(string)YUY2, width=(int)720, height=(int)576,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string){ progressive,
interleaved }, framerate=(fraction){ 25/1, 50/1 }

This, in turn, makes 576i work correctly; with the old code,
the caps would be interlace-mode=progressive for interlaced video.

Signed-off-by: Simon Farnsworth <simon.farnsworth at onelan.co.uk>
---
 sys/v4l2/gstv4l2bufferpool.c |  28 ++++--
 sys/v4l2/gstv4l2object.c     | 226 ++++++++++++++++++++++++-------------------
 sys/v4l2/gstv4l2src.c        |   3 +
 3 files changed, 151 insertions(+), 106 deletions(-)

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list