After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 761165 - Setting overlay parameters on v4l2sink fails
Setting overlay parameters on v4l2sink fails
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.8.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-01-27 08:55 UTC by Andreas Naumann
Modified: 2016-06-07 21:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (1.42 KB, patch)
2016-01-27 09:07 UTC, Andreas Naumann
committed Details | Review

Description Andreas Naumann 2016-01-27 08:55:55 UTC
I observed positioning of video overlays using the v4l2sink parameters like 'overlay-left' doesnt work. Digging a little I found out the VIDIOC_G_FMT/VIDIOC_S_FMT ioctl's dont reach the overlay-driver due to being filtered in the kernels v4l2 ioctl dispatcher functions because my driver is not a VFL_DIR_RX but TX type.

After reading the Linux for Video API docu, it seems that the S/G_FMT function are indeed intended for the Capture/Rx part of the Video Overlay Interface. Somehow I cant image such a device but anyway, the code that checks for RX is in place since 2012.

Now, the gstreamer v4l2sink does need a TX device doesnt it? So with current kernels, the video-overlay ioctls cant ever work, or what am I missing?

Digging further I came across another type, that is V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY. This is per API doc intended for output and shares the data structures for S/G_FMT ioctls with V4L2_BUF_TYPE_VIDEO_OVERLAY. So I tried telling my driver that he supports such an interface and redirected the existing s/g_fmt function pointers (as I saw in some other implementation, I think omap).
On v4l2sink side its a oneliner to change to using that interface ( gst_v4l2sink_sync_overlay_fields()).
Comment 1 Andreas Naumann 2016-01-27 09:07:23 UTC
Created attachment 319808 [details] [review]
Proposed patch

Proposing patch after discussion on gstreamer-devel@lists.freedesktop.org.
Comment 2 Nicolas Dufresne (ndufresne) 2016-06-06 19:26:52 UTC
(In reply to Andreas Naumann from comment #0)
> Now, the gstreamer v4l2sink does need a TX device doesnt it? So with current
> kernels, the video-overlay ioctls cant ever work, or what am I missing?

This v4l2sink was written by TI. On their platform hey had created a TX that had the overlay interface. This is not according to the spec, and not what the overlay is meant for. They also had X11 extension to that, which we remove as it was hard to support.

> 
> Digging further I came across another type, that is
> V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY. This is per API doc intended for output
> and shares the data structures for S/G_FMT ioctls with
> V4L2_BUF_TYPE_VIDEO_OVERLAY. So I tried telling my driver that he supports
> such an interface and redirected the existing s/g_fmt function pointers (as
> I saw in some other implementation, I think omap).
> On v4l2sink side its a oneliner to change to using that interface (
> gst_v4l2sink_sync_overlay_fields()).

You seem to guess correctly.
Comment 3 Nicolas Dufresne (ndufresne) 2016-06-06 21:26:56 UTC
Pushed as b18031c
Comment 4 Nicolas Dufresne (ndufresne) 2016-06-07 21:23:11 UTC
Branch: 1.8
Commit: 41882ab33c7cfd81f6a69fa7a70ddc91893c67d3