Configure IMX8 with below.
gst-launch-1.0 filesrc location=video.mp4 ! decodebin3 ! imxvideoconvert_g2d ! queue ! waylandsink window-width=1280 window-height=480
Issue is Weston-terminal cannot be moved on top of the video.
Understanding is video is rendered under a desktop wayland window. But it is not. we are not able to control the video window. Video rendering is blocking the behind desktop shell.
But if you open two Weston-terminal, you can control the view of windows by selecting through mouse.
We can understand that the video rendering directly to a plane on top of wayland o/p plane. But it should not be the case. How to solve this issue.
And we have integrated IVI_shell, want to control the video window.
Solved! Go to Solution.
The reason for the situation you saw is that Weston compositor will try to use DPU overlay to render videoplay by default. But it will put the videoplay on the top.
You can try following patch to disable using DPU overlay to render videoplay, then it will use GPU to render and fix the issue you saw.
diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index 3365d29..b5bb9a4 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -3748,6 +3748,7 @@ drm_output_propose_state(struct weston_output *output_base,
struct weston_buffer *buffer = ev->surface->buffer_ref.buffer;
dmabuf = linux_dmabuf_buffer_get(buffer->resource);
if (dmabuf) {
+/*
if (dmabuf->attributes.format == DRM_FORMAT_NV12
|| dmabuf->attributes.format == DRM_FORMAT_P010
|| dmabuf->attributes.format == DRM_FORMAT_YUYV) {
@@ -3757,6 +3758,7 @@ drm_output_propose_state(struct weston_output *output_base,
else
force_renderer = true;
} else
+*/
force_renderer = true;
}
}
Apply the patch to weston-imx, recompile and replace drm-backend.so.
Best regards,
Danwei
The reason for the situation you saw is that Weston compositor will try to use DPU overlay to render videoplay by default. But it will put the videoplay on the top.
You can try following patch to disable using DPU overlay to render videoplay, then it will use GPU to render and fix the issue you saw.
diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index 3365d29..b5bb9a4 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -3748,6 +3748,7 @@ drm_output_propose_state(struct weston_output *output_base,
struct weston_buffer *buffer = ev->surface->buffer_ref.buffer;
dmabuf = linux_dmabuf_buffer_get(buffer->resource);
if (dmabuf) {
+/*
if (dmabuf->attributes.format == DRM_FORMAT_NV12
|| dmabuf->attributes.format == DRM_FORMAT_P010
|| dmabuf->attributes.format == DRM_FORMAT_YUYV) {
@@ -3757,6 +3758,7 @@ drm_output_propose_state(struct weston_output *output_base,
else
force_renderer = true;
} else
+*/
force_renderer = true;
}
}
Apply the patch to weston-imx, recompile and replace drm-backend.so.
Best regards,
Danwei
Thanks Danwei,
We will try this patch and update here.
I have a question.
We understand, this drm based video rendering is basically for fast rendering.
To keep this, Is there any configuration to render video in the bottom plane, when wayland o/p rendered at top plane.
So that we can configure wayland plane with colorkey configuration to make transparent and blend with video and render in the display.
Since wayland final display o/p pixel color cannot have alpha. so that we cannot use pixel alpha based blending.
Thanks,
Arunkumar R
Checked with R&D, currently using DPU to render video has to be done at top plane. So what you suggested cannot be done. But the performance of GPU rendering should be good as well.
Best regards,
Danwei