[Bug 784599] kmssink: support videooverlay interface

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Aug 7 20:48:56 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=784599

Nicolas Dufresne (stormer) <nicolas at ndufresne.ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #356624|committed                   |needs-work
             status|                            |

--- Comment #56 from Nicolas Dufresne (stormer) <nicolas at ndufresne.ca> ---
Review of attachment 356624:
 --> (https://bugzilla.gnome.org/review?bug=784599&attachment=356624)

I tried to fix it myself, but it's not exactly trivial. I have reverted it, so
we gain time to fix it properly.

::: sys/kms/gstkmssink.c
@@ -1327,3 @@
-  } else {
-    src.w = GST_VIDEO_INFO_WIDTH (&self->vinfo);
-    src.h = GST_VIDEO_INFO_HEIGHT (&self->vinfo);

Removing this code is what caused the regression. The idea in this blob is to
replace src.w/h scaled value with non-scaled one. With this patch, you don't do
that anymore, as a result, you give a scaled value to drmModeSetPlane which can
lead to ENOSPC.

Now, the old code is assuming that if the driver cannot scale, you don't need
to clip the src rectangle (that DRM will clip for us. I would need to refer to
the doc on what shall be expect from drivers. I should probably hack the
can_scale locally to be able to test that.

@@ +1447,3 @@
+
+  if ((result.y + result.h) > self->vdisplay)
+    src.h = self->vdisplay - result.y;

Here that code seem wrong, you check if result (the destination rectangle)
overflow the display, but clip the src rectangle.

@@ +1457,3 @@
+  if (!self->can_scale) {
+    result.w = src.w;
+    result.h = src.h;

What if the src.w/h is larder then your display ?

@@ +1631,3 @@
   sink->plane_id = -1;
+  sink->original_width = -1;
+  sink->original_heigth = -1;

This need to be reset on _start() I believe. Though, I'm not even sure we need
this.

-- 
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