Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-44251

Add wayland support to QGstreamerVideoWidget

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.4.0
    • Multimedia, QPA: Wayland
    • None
    • ARM, yocto/poky based distribution with latest meta-qt5

      I try to run a video using qtmultimedia 5.4.0 examples with built in support for gstreamer-1.0 on a board using wayland-egl with weston.
      I get this error: "No m_videoSink available!"

      So, after looking into the code -> file src/gsttools/qgstreamervideowidget.cpp, in method QGstreamerVideoWidgetControl::createVideoWidget(). It is creating X11 specific sink. I guess for wayland, "waylandsink" should be created. Maybe using some sink component like "autovideosink" if available?

      m_videoSink = gst_element_factory_make ("xvimagesink", NULL);
      m_videoSink = gst_element_factory_make ("ximagesink", NULL);

      gst specific functions to manage the m_videoSink:

      #if !GST_CHECK_VERSION(1,0,0)
      if (m_videoSink && GST_IS_X_OVERLAY(m_videoSink))

      { gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(m_videoSink), m_windowId); }

      #else
      if (m_videoSink && GST_IS_VIDEO_OVERLAY(m_videoSink))

      { gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(m_videoSink), m_windowId); }

      #endif

      By the way, on last code, when using gst-0.10, according to ( http://www.freedesktop.org/software/gstreamer-sdk/data/docs/latest/gst-plugins-base-libs-0.10/gst-plugins-base-libs-gstxoverlay.html#gst-x-overlay-set-xwindow-id ):
      "gst_x_overlay_set_xwindow_id is deprecated and should not be used in newly-written code. Use gst_x_overlay_set_window_handle() instead."

      These links also confirmes lack of integration with wayland:
      https://bugs.tizen.org/jira/si/jira.issueviews:issue-html/PTREL-792/PTREL-792.html
      https://www.mail-archive.com/ivi@lists.tizen.org/msg02525.html

      Also some related interesting links which might be of help to know more about the issue/solution:
      https://gkiagia.wordpress.com/2014/06/10/gstreamer-on-wayland-with-gtk/
      https://bugreports.qt.io/browse/QTBUG-29024

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            pespin Pau Espin Pedrol
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes