Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT5.15.2 with Wayland/Weston and GStreamer video sink losing surface
Forum Updated to NodeBB v4.3 + New Features

QT5.15.2 with Wayland/Weston and GStreamer video sink losing surface

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 802 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Terry Barnaby
    wrote on last edited by Terry Barnaby
    #1

    We are trying to output a GStreamer video into a QWidget using the GStreamwer waylandsink GStreamer module.
    In general we have this working setting teh QWidget with the Qt::WA_NativeWindow, Qt::WA_DontCreateNativeAncestors and Qt::WA_TransparentForMouseEvents attributes and passing the Wayland surface to the waylandsink module with:

    struct wl_surface* surface = static_cast<struct wl_surface*>(native->nativeResourceForWindow("surface", owVideo1->windowHandle()));
    gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(ogstVideoSink), (guintptr)surface);
    

    However, we need the video windows to be within a QStackedWidget so that separate "pages" of information, settings and the video can be shown. Unfortunately it appears that the QStackedWidget effectively uses setVisible(0) in the QWidget tree when hiding the widget and if you then show the video "page" the gstreamer video output is no longer shown probably as Qt has deleted the underlying Wayland surface or something like that.
    I have tried using a QStackedLayout with mode QStackedLayout::StackAll, and this works sort of (uses raise()/lower()), however the video window remains above others even with the lower(). A move of the QWidget (move(4096, 0)) does make it disappear so this can work just. But this messes up the QT keyboard tabbing in all of the other widgets in the QStackedLayout.

    We have also tried parenting the QWidget used for video from a higher level widget so the QStackedLayout can work properly with tabbing and then move the QWidget over the stacked area when the video page is shown. This works but then messes up operation with QScrolledAreas within the stacked widgets for some reason.

    Any ideas on how we can properly output gstreamer to a QWidget in a Wayland/Weston environment (With X11 it works fine) ?
    Is there a way to stop Qt using the hide()/show() on a particular QWidget within a QStackedLayout ?
    Is there a way to get GStreamers waylandsink to use a, I presume, new surface when a new one is created when the QStackedLayout shows the QWidget ?

    Terry

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved