GNOME Bugzilla – Bug 726195
v4l2src was marking known interlaced buffers as progressive
Last modified: 2014-12-08 23:32:25 UTC
v4l2src silently marks buffers as progressive if we don't know the field order. The attached patch changes this to complain loudly if you give us an unknown field order, and to mark interleaved buffers as interlaced.
Created attachment 271640 [details] [review] [PATCH] v4l2: Clean up interlace flagging This is getting messy, and it's hard to see when your capture device's interlace type is unhandled. Replace chained ifs with a switch statement, and add an ERROR for unknown types. Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> --- sys/v4l2/gstv4l2bufferpool.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-)
Review of attachment 271640 [details] [review]: ::: sys/v4l2/gstv4l2bufferpool.c @@ +988,3 @@ + GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_FLAG_INTERLACED); + GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF); + break; Maybe we should have a look at the configure format, and setup some sensible values. E.g. if the device is configured INTERLACED_TB, we already know what the flag should be, no need to check the buffer flags.
Ping ?
I'm hoping to have time to look into this and 726194 in the near future; if I remain busy, I'll see if I can get this work outsourced to one of the GStreamer consultancies we've used before.
*** Bug 737603 has been marked as a duplicate of this bug. ***
The patch in 737603 seems better.
*** This bug has been marked as a duplicate of bug 737603 ***