mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
v4l2bufferpool: set buffer interlace flags when field is V4L2_FIELD_INTERLACED
If v4l2_buffer.field is V4L2_FIELD_INTERLACED, we set corresponding GstVideoBuffer flags depending on the video standard. According to V4L2 specification, M/NTSC transmits the bottom field first, all other standards the top field first. https://bugzilla.gnome.org/show_bug.cgi?id=737603
This commit is contained in:
parent
fef1a8d88a
commit
62193129c5
1 changed files with 10 additions and 0 deletions
|
@ -1130,6 +1130,16 @@ gst_v4l2_buffer_pool_dqbuf (GstV4l2BufferPool * pool, GstBuffer ** buffer)
|
|||
GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_FLAG_INTERLACED);
|
||||
GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF);
|
||||
break;
|
||||
case V4L2_FIELD_INTERLACED:
|
||||
GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_FLAG_INTERLACED);
|
||||
if (obj->tv_norm == V4L2_STD_NTSC_M ||
|
||||
obj->tv_norm == V4L2_STD_NTSC_M_JP ||
|
||||
obj->tv_norm == V4L2_STD_NTSC_M_KR) {
|
||||
GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF);
|
||||
} else {
|
||||
GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_FLAG_INTERLACED);
|
||||
GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF);
|
||||
|
|
Loading…
Reference in a new issue