mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
v4l2sink: Use V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY if driver advertises it.
On modern kernels, the G/S_FMT ioctls will always fail using V4L2_BUF_TYPE_VIDEO_OVERLAY with VFL_DIR_TX (e.g. real overlay out drivers) since this is not the intented use (rather rx, according to v4l2 API doc). Probably this is why the Video Output Overlay interface was created, so if the driver advertises it we might as well use. For old kernels (pre 2012) the old way might still work so keeping this for compatibility. https://bugzilla.gnome.org/show_bug.cgi?id=761165
This commit is contained in:
parent
b4e6a71566
commit
b18031cf4b
1 changed files with 4 additions and 1 deletions
|
@ -250,7 +250,10 @@ gst_v4l2sink_sync_overlay_fields (GstV4l2Sink * v4l2sink)
|
|||
struct v4l2_format format;
|
||||
|
||||
memset (&format, 0x00, sizeof (struct v4l2_format));
|
||||
format.type = V4L2_BUF_TYPE_VIDEO_OVERLAY;
|
||||
if ( v4l2sink->v4l2object->vcap.capabilities & V4L2_CAP_VIDEO_OUTPUT_OVERLAY )
|
||||
format.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY;
|
||||
else
|
||||
format.type = V4L2_BUF_TYPE_VIDEO_OVERLAY;
|
||||
|
||||
if (v4l2_ioctl (fd, VIDIOC_G_FMT, &format) < 0) {
|
||||
GST_WARNING_OBJECT (v4l2sink, "VIDIOC_G_FMT failed");
|
||||
|
|
Loading…
Reference in a new issue