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. How to show video in video, using gstreamer on wayland (weston)?
Forum Updated to NodeBB v4.3 + New Features

How to show video in video, using gstreamer on wayland (weston)?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 2.4k Views 2 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
    TryChen
    wrote on last edited by
    #1

    Hi Sirs,
    I want show video in video, using gstreamer on wayland(weston).
    the following is the part of my code, let gstwaylandsink render on qt widget,

    QPlatformNativeInterface *native =
                QGuiApplication::platformNativeInterface();
    struct wl_surface *surface = static_cast<struct wl_surface *>(
    native->nativeResourceForWindow("surface", m_topWidget->windowHandle()));
    gst_video_overlay_set_window_handle(
                GST_VIDEO_OVERLAY (GST_MESSAGE_SRC (msg)),
                (guintptr) surface
            );
    gst_video_overlay_set_render_rectangle(
                GST_VIDEO_OVERLAY (GST_MESSAGE_SRC (msg)),
                rect.x(), rect.y(),
                rect.width(), rect.height()
            );
    

    I use QGridLayout, trying to overlap the video,

          m_layout->addWidget(m_videoWidgetArr[iMain], 0, 0, 3, 3);
          m_layout->addWidget(m_videoWidgetArr[iMain+1], 2, 2, 1, 1);
    

    But , it is no use, what do i miss?
    Thank you for reading.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      What result are you getting currently ?

      One way would also be to place them by hand in your container widget.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      T 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        What result are you getting currently ?

        One way would also be to place them by hand in your container widget.

        T Offline
        T Offline
        TryChen
        wrote on last edited by
        #3

        @SGaist The result looks like randomly, sometimes only show the bigger video, sometimes the bigger video covers the smaller one.
        Thanks for your reply.

        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