Wayland / Gstreamer: Remove desktop bar / Show video in fullscreen

Hi team,

A customer asked me that they want to show the video in fullscreen. Currently the desktop bar is showing:

How should we do this? Stop the Window Manager before playing the video? Show the video on fullscreen through some extra command in Gstreamer?

Currently we are using the following command (I also tried disabling the Qt Cinematic demo, same result):

gst-launch-1.0 filesrc location=testvideo_h264.mp4 ! video/quicktime ! aiurdemux ! h264parse ! v4l2h264dec ! imxvideoconvert_g2d ! autovideosink

Thanks!

Hi @alvaro.tx

On option would be to remove the panel from weston entirely. Just add the following line to /etc/xdg/weston/weston.ini:

[shell]
panel-position=none

Afterwards you need to restart weston:

systemctl restart weston@root

Regards,
Stefan

Thanks Stefan, that worked like a charm :slight_smile:

@stefan_e.tx, do you also know how to make the application “full-screen”, e.g. without the minimize/close buttons? Something similar to what “kiosk” is capable to do.

According to our experience, editing the panel position is not enough, as the waylandsik gstreamer plugin has a hard-coded size setting. We got rid of this with the following patch:

diff --git a/ext/wayland/wlutils.c b/ext/wayland/wlutils.c
index a4d4399a3..404eedff9 100644
--- a/ext/wayland/wlutils.c
+++ b/ext/wayland/wlutils.c
@@ -131,7 +131,7 @@ gst_wl_init_surface_state(GstWlDisplay * display, GstWlWindow * window)
             goto out;
         }
         window->fullscreen_width = desktop_width;
-        window->fullscreen_height = desktop_height - PANEL_HEIGH;
+        window->fullscreen_height = desktop_height;// - PANEL_HEIGH;
     } else {
         ret = FALSE;
         goto out;
@@ -144,4 +144,4 @@ out:
         g_free (size);
     fclose(fp);
     return ret;
-}
\ No newline at end of file
+}
diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c
index 4d1c1fcd8..9a39dbe0b 100644
--- a/ext/wayland/wlwindow.c
+++ b/ext/wayland/wlwindow.c
@@ -166,7 +166,7 @@ gst_wl_window_new_internal (GstWlDisplay * display, GMutex * render_lock)
 
   if (!gst_wl_init_surface_state(display, window)) {
     window->fullscreen_width = display->width;
-    window->fullscreen_height = display->height - PANEL_HEIGH;
+    window->fullscreen_height = display->height;// - PANEL_HEIGH;
     window->scale = 1;
     GST_WARNING ("init surface_state fail, fallback to scale=%d fullscreen (%dx%d)",
                 window->scale,

and a gstreamer1.0-plugins-bad_1.14.imx.bbappend file:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

SRC_URI += "\
	file://screensize.patch \
	"

Any feedbacks on that @stefan_e.tx ?

Hi @svogl

Which BSP version are you using? I think the wlutils.c file is only there in gstreamer1.0-plugins-bad_1.14. With zeus (BSP3.0) and dunfell (BSP5.0) it should be different (1.16). Maybe it was just an issue on that specific version?

Regards,
Stefan

the 1.14 patch is from an older BSP (thud / 2.8); I had a look at what dunfell is doing: the plugin upgraded to 1.16, the wayland code looks the same and the patch applies flawlessly.

Simon

Hi @svogl,

Nice! Thanks for the feedback.

Best regards,
André Curvello

Is there any update for this subject ?
I’m experiencing the same issue, that is,

[shell]
panel-position=none

It’s not enough, indeed. There’s still a kind of bar on the top and bottom.
I’ve also applied the patch above…but it doesn’t work much better.

Am I missing something ?

Karim

Hi @karim,

Can you share a picture of this?

And, which GUI Framework are you using for your Graphical application?

Best regards,
André Curvello.

Hi @andrecurvello.tx

Please find attached a camera picture (sorry for the sun reflections).
You can a kind of border on top & bottom.

I’m using a toradex multimedia reference image with gstreamer playback using waylandsink. No custom modifications in this image.

Karimalt text

Ok.

Can you take another picture?

And I’ll ask you to open another thread here on Toradex Community.

Could be that your problem is the same as this topic, or it’s something else.

Can you create the post and send the link here?

Please provide as much information as possible:

  • Which module are you using
  • Which carrier board are you using
  • Which TorizonCore are you using

Best regards,
André Curvello