Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. qml6glsink
Forum Updated to NodeBB v4.3 + New Features

qml6glsink

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
25 Posts 8 Posters 7.2k Views 3 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.
  • A Offline
    A Offline
    ABest2
    wrote on last edited by
    #1

    We're moving to Qt6 as we migrate to Yocto Mickledore. We are using i.MX8M Plus devices. Has anyone managed to get the qml6glsink gstreamer plugin built into a Yocto project for i.MX8M Plus devices?

    Thanks

    JoeCFDJ D 2 Replies Last reply
    0
    • A ABest2

      We're moving to Qt6 as we migrate to Yocto Mickledore. We are using i.MX8M Plus devices. Has anyone managed to get the qml6glsink gstreamer plugin built into a Yocto project for i.MX8M Plus devices?

      Thanks

      JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by JoeCFD
      #2

      @ABest2
      check here out
      https://forum.qt.io/topic/144006/qt-6-3-streaming-camera-image/16

      use
      import org.freedesktop.gstreamer.Qt6GLVideoItem 1.0
      in your QML item for sink:

      A 1 Reply Last reply
      0
      • JoeCFDJ JoeCFD

        @ABest2
        check here out
        https://forum.qt.io/topic/144006/qt-6-3-streaming-camera-image/16

        use
        import org.freedesktop.gstreamer.Qt6GLVideoItem 1.0
        in your QML item for sink:

        A Offline
        A Offline
        ABest2
        wrote on last edited by
        #3

        @JoeCFD
        While that information will be useful eventually. For now I am stuck trying to get the plugin included with the Yocto created Linux distribution.

        I have the following in gstreamer1.0-plugins-good_%.bbappend:

        QTWAYLANDDEPENDS = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "qtwayland", "", d)}"
        PACKAGECONFIG[qt6] = "-Dqt6=enabled,-Dqt6=disabled,qtbase qtdeclarative qtbase-native qttools-native ${QTWAYLANDDEPENDS}"
        PACKAGECONFIG:append = "qt6"

        But I get the following error:

        | ../git/ext/qt6/meson.build:37:4: ERROR: Problem encountered: qt6 qmlglsink plugin is enabled, but qt specific tools were not found

        This may be related to the following:

        https://patchwork.yoctoproject.org/project/oe-core/patch/20231004160911.3030063-1-cordlandwehr@kde.org/#13852

        I'm working on implementing their suggestion.

        JoeCFDJ I 2 Replies Last reply
        0
        • A ABest2

          @JoeCFD
          While that information will be useful eventually. For now I am stuck trying to get the plugin included with the Yocto created Linux distribution.

          I have the following in gstreamer1.0-plugins-good_%.bbappend:

          QTWAYLANDDEPENDS = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "qtwayland", "", d)}"
          PACKAGECONFIG[qt6] = "-Dqt6=enabled,-Dqt6=disabled,qtbase qtdeclarative qtbase-native qttools-native ${QTWAYLANDDEPENDS}"
          PACKAGECONFIG:append = "qt6"

          But I get the following error:

          | ../git/ext/qt6/meson.build:37:4: ERROR: Problem encountered: qt6 qmlglsink plugin is enabled, but qt specific tools were not found

          This may be related to the following:

          https://patchwork.yoctoproject.org/project/oe-core/patch/20231004160911.3030063-1-cordlandwehr@kde.org/#13852

          I'm working on implementing their suggestion.

          JoeCFDJ Offline
          JoeCFDJ Offline
          JoeCFD
          wrote on last edited by
          #4

          @ABest2 show your gstreamer version please:
          gst-launch-1.0 --version

          A 1 Reply Last reply
          0
          • JoeCFDJ JoeCFD

            @ABest2 show your gstreamer version please:
            gst-launch-1.0 --version

            A Offline
            A Offline
            ABest2
            wrote on last edited by
            #5

            @JoeCFD
            I get the following output for gst-launch-1.0 --version.

            gst-launch-1.0 version 1.22.0
            GStreamer 1.22.0
            Unknown package origin

            I 1 Reply Last reply
            0
            • A ABest2

              @JoeCFD
              I get the following output for gst-launch-1.0 --version.

              gst-launch-1.0 version 1.22.0
              GStreamer 1.22.0
              Unknown package origin

              I Offline
              I Offline
              imahgin
              wrote on last edited by imahgin
              #6

              @ABest2 Same here.
              I've built a Yocto Mickledore for i.MX93 and I'm struggling trying to display a video source using Qt6 QML Video component. I get nothing but a blank image (sound works fine).
              The same if using MediaPlayer + VideoOutput components.

              I can play it with no issues using QtWidgets and also gst-launch-1.0 can play the stream.
              On Qt5 there is no problem at all, and I can play videos on QML.
              GStreamer version is the same as yours (1.22.0)
              According to this Qt6 support for rendering video inside a QML scene, but I cannot manage to make it working.

              These are the options added to my local.conf file:

              IMAGE_INSTALL:append = " qtmultimedia qtmultimedia-plugins qtmultimedia-qmlplugins"
              
              
              VIDEO_TOOLS = " \
              gstreamer1.0 \
              gstreamer1.0-plugins-good \
              gstreamer1.0-plugins-base \
              gstreamer1.0-plugins-ugly \
              gstreamer1.0-libav \
              gst-player \
              gstreamer1.0-meta-base \
              gst-examples \
              gstreamer1.0-rtsp-server \
              "
              IMAGE_INSTALL:append = " ${VIDEO_TOOLS}"
              LICENSE_FLAGS_ACCEPTED += "commercial"
              
              A 1 Reply Last reply
              0
              • I imahgin

                @ABest2 Same here.
                I've built a Yocto Mickledore for i.MX93 and I'm struggling trying to display a video source using Qt6 QML Video component. I get nothing but a blank image (sound works fine).
                The same if using MediaPlayer + VideoOutput components.

                I can play it with no issues using QtWidgets and also gst-launch-1.0 can play the stream.
                On Qt5 there is no problem at all, and I can play videos on QML.
                GStreamer version is the same as yours (1.22.0)
                According to this Qt6 support for rendering video inside a QML scene, but I cannot manage to make it working.

                These are the options added to my local.conf file:

                IMAGE_INSTALL:append = " qtmultimedia qtmultimedia-plugins qtmultimedia-qmlplugins"
                
                
                VIDEO_TOOLS = " \
                gstreamer1.0 \
                gstreamer1.0-plugins-good \
                gstreamer1.0-plugins-base \
                gstreamer1.0-plugins-ugly \
                gstreamer1.0-libav \
                gst-player \
                gstreamer1.0-meta-base \
                gst-examples \
                gstreamer1.0-rtsp-server \
                "
                IMAGE_INSTALL:append = " ${VIDEO_TOOLS}"
                LICENSE_FLAGS_ACCEPTED += "commercial"
                
                A Offline
                A Offline
                ABest2
                wrote on last edited by ABest2
                #7

                @imahgin
                Are you able to get the QML plugins installed in your distribution? More specifically, if you run the following what output do you receive:

                gst-inspect-1.0 | grep qml*

                I 1 Reply Last reply
                0
                • A ABest2

                  @imahgin
                  Are you able to get the QML plugins installed in your distribution? More specifically, if you run the following what output do you receive:

                  gst-inspect-1.0 | grep qml*

                  I Offline
                  I Offline
                  imahgin
                  wrote on last edited by imahgin
                  #8

                  @ABest2 Nope, that's the problem.
                  I'm not able to get any QML pluggin installed on Yocto.
                  I don't have much time right now, but maybe this can help us -although it's a Qt5 related issue-

                  I just tried the following:

                  PACKAGECONFIG:append:pn-gstreamer1.0-plugins-good = " qmlglsink"
                  PACKAGECONFIG:append:pn-gstreamer1.0-plugins-good = " qmlglsrc"
                  PACKAGECONFIG:append:pn-qtmultimedia = " gstreamer qml"
                  

                  But it didn't work at all. Still no QML plugin available.

                  1 Reply Last reply
                  0
                  • A ABest2

                    @JoeCFD
                    While that information will be useful eventually. For now I am stuck trying to get the plugin included with the Yocto created Linux distribution.

                    I have the following in gstreamer1.0-plugins-good_%.bbappend:

                    QTWAYLANDDEPENDS = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "qtwayland", "", d)}"
                    PACKAGECONFIG[qt6] = "-Dqt6=enabled,-Dqt6=disabled,qtbase qtdeclarative qtbase-native qttools-native ${QTWAYLANDDEPENDS}"
                    PACKAGECONFIG:append = "qt6"

                    But I get the following error:

                    | ../git/ext/qt6/meson.build:37:4: ERROR: Problem encountered: qt6 qmlglsink plugin is enabled, but qt specific tools were not found

                    This may be related to the following:

                    https://patchwork.yoctoproject.org/project/oe-core/patch/20231004160911.3030063-1-cordlandwehr@kde.org/#13852

                    I'm working on implementing their suggestion.

                    I Offline
                    I Offline
                    imahgin
                    wrote on last edited by imahgin
                    #9

                    @ABest2 said in qml6glsink:

                    I'm working on implementing their suggestion.

                    Did you managed to fix the error?
                    I've applied the patch directly in gstreamer1.0-plugins-good_1.22.0.imx.bb and got compiled without errors but with 2 warnings:

                    WARNING: gstreamer1.0-plugins-good-1.22.0.imx-r0 do_configure: QA Issue: gstreamer1.0-plugins-good: invalid PACKAGECONFIG: qmlglsink [invalid-packageconfig]
                    
                    WARNING: gstreamer1.0-plugins-good-1.22.0.imx-r0 do_configure: QA Issue: gstreamer1.0-plugins-good: invalid PACKAGECONFIG: qmlglsrc [invalid-packageconfig]
                    

                    Still no qml plugins found on Yocto :-(

                    A 1 Reply Last reply
                    0
                    • I imahgin

                      @ABest2 said in qml6glsink:

                      I'm working on implementing their suggestion.

                      Did you managed to fix the error?
                      I've applied the patch directly in gstreamer1.0-plugins-good_1.22.0.imx.bb and got compiled without errors but with 2 warnings:

                      WARNING: gstreamer1.0-plugins-good-1.22.0.imx-r0 do_configure: QA Issue: gstreamer1.0-plugins-good: invalid PACKAGECONFIG: qmlglsink [invalid-packageconfig]
                      
                      WARNING: gstreamer1.0-plugins-good-1.22.0.imx-r0 do_configure: QA Issue: gstreamer1.0-plugins-good: invalid PACKAGECONFIG: qmlglsrc [invalid-packageconfig]
                      

                      Still no qml plugins found on Yocto :-(

                      A Offline
                      A Offline
                      ABest2
                      wrote on last edited by
                      #10

                      @imahgin

                      I also tried modifying the build based on:

                      Qt6 qmlgl patch

                      I was able to get Yocto to build successfully but never had it include the plugins unfortunately.

                      1 Reply Last reply
                      1
                      • N Offline
                        N Offline
                        nben386
                        wrote on last edited by
                        #11

                        @ABest2 @imahgin , we are facing the same issue here.
                        Were you able to get it working on i.MX93 device?
                        Thanks.

                        A I 2 Replies Last reply
                        0
                        • N nben386

                          @ABest2 @imahgin , we are facing the same issue here.
                          Were you able to get it working on i.MX93 device?
                          Thanks.

                          A Offline
                          A Offline
                          ABest2
                          wrote on last edited by
                          #12

                          @nben386

                          We are using the i.MX8M Plus. We have not been successful getting the Qt6 QML gstreamer plugins built into a Yocto distribution.

                          N 1 Reply Last reply
                          0
                          • A ABest2

                            @nben386

                            We are using the i.MX8M Plus. We have not been successful getting the Qt6 QML gstreamer plugins built into a Yocto distribution.

                            N Offline
                            N Offline
                            nben386
                            wrote on last edited by
                            #13

                            @ABest2 Ok, thanks for the info. I'll keep you posted if I make any progress.
                            Thanks.

                            1 Reply Last reply
                            0
                            • N nben386

                              @ABest2 @imahgin , we are facing the same issue here.
                              Were you able to get it working on i.MX93 device?
                              Thanks.

                              I Offline
                              I Offline
                              imahgin
                              wrote on last edited by
                              #14

                              @nben386 Still not able to get gstreamer working with QML.
                              I'm considering using another approach and creating my own video sink class.
                              If your Qt version is 6, there is a QVideoSink class that could help us, but I don't have enough time and it'll take some time to implement it and check if it works

                              JoeCFDJ malikcisM 2 Replies Last reply
                              0
                              • I imahgin

                                @nben386 Still not able to get gstreamer working with QML.
                                I'm considering using another approach and creating my own video sink class.
                                If your Qt version is 6, there is a QVideoSink class that could help us, but I don't have enough time and it'll take some time to implement it and check if it works

                                JoeCFDJ Offline
                                JoeCFDJ Offline
                                JoeCFD
                                wrote on last edited by JoeCFD
                                #15

                                @imahgin Maybe try to post your issue to gstreamer forum
                                https://discourse.gstreamer.org/

                                I tried to build gstreamer 1.22.7 + Qt 6.6 from the source. Because Qt 6.6 is installed under /opt, the include path of Qt is not set properly in gstreamer build script and the build of examples in plugin-good failed. Also tried to disable examples build in plugin-good and could not do it.

                                It seems that qml6 sink build is not enabled automatically. I enabled it manually and the build of gstreamer did include qml6 sink. I guess the build script of gstreamer still has some issues with Qt. It is likely that qml6 sink build may work with the Qt6 within the distribution of Linux. Have not tried it yet.

                                I 1 Reply Last reply
                                0
                                • JoeCFDJ JoeCFD

                                  @imahgin Maybe try to post your issue to gstreamer forum
                                  https://discourse.gstreamer.org/

                                  I tried to build gstreamer 1.22.7 + Qt 6.6 from the source. Because Qt 6.6 is installed under /opt, the include path of Qt is not set properly in gstreamer build script and the build of examples in plugin-good failed. Also tried to disable examples build in plugin-good and could not do it.

                                  It seems that qml6 sink build is not enabled automatically. I enabled it manually and the build of gstreamer did include qml6 sink. I guess the build script of gstreamer still has some issues with Qt. It is likely that qml6 sink build may work with the Qt6 within the distribution of Linux. Have not tried it yet.

                                  I Offline
                                  I Offline
                                  imahgin
                                  wrote on last edited by
                                  #16

                                  @JoeCFD Thks Joe. I'll report to gstreamer forum just in case they can help us to get this library working on Yocto + QML Qt6

                                  1 Reply Last reply
                                  0
                                  • A ABest2

                                    We're moving to Qt6 as we migrate to Yocto Mickledore. We are using i.MX8M Plus devices. Has anyone managed to get the qml6glsink gstreamer plugin built into a Yocto project for i.MX8M Plus devices?

                                    Thanks

                                    D Offline
                                    D Offline
                                    Dure1966
                                    wrote on last edited by
                                    #17

                                    @ABest2 said in qml6glsink basketball random:

                                    We're moving to Qt6 as we migrate to Yocto Mickledore. We are using i.MX8M Plus devices. Has anyone managed to get the qml6glsink gstreamer plugin built into a Yocto project for i.MX8M Plus devices?

                                    I'm also in the process of migrating to Qt6 and Yocto Mickledore, and I'm also interested in integrating the qml6glsink GStreamer plugin into my Yocto project for i.MX8M Plus devices. If anyone in the community has insights, tips, or successful experience building the qml6glsink plugin for i.MX8M Plus in the Yocto project, I would greatly appreciate any guidance.

                                    JoeCFDJ 1 Reply Last reply
                                    0
                                    • D Dure1966

                                      @ABest2 said in qml6glsink basketball random:

                                      We're moving to Qt6 as we migrate to Yocto Mickledore. We are using i.MX8M Plus devices. Has anyone managed to get the qml6glsink gstreamer plugin built into a Yocto project for i.MX8M Plus devices?

                                      I'm also in the process of migrating to Qt6 and Yocto Mickledore, and I'm also interested in integrating the qml6glsink GStreamer plugin into my Yocto project for i.MX8M Plus devices. If anyone in the community has insights, tips, or successful experience building the qml6glsink plugin for i.MX8M Plus in the Yocto project, I would greatly appreciate any guidance.

                                      JoeCFDJ Offline
                                      JoeCFDJ Offline
                                      JoeCFD
                                      wrote on last edited by JoeCFD
                                      #18

                                      @Dure1966 A very simple way to do this is to build it from the source. The source code is under gstreamer/subprojects/gst-plugins-good/ext/qt6 if you download gstreamer source code from here:
                                      https://gitlab.freedesktop.org/gstreamer/gstreamer.git

                                      Try to build it with Qt 6 and your app. Then you can use it in your app. Sure you will have license issue. Better to build it into a plugin and put it at the right spot. Check where qml5glsink is located.

                                      Take a look at qgroundcontrol project and it uses qml5sink source code for Android build.

                                      If you build gstreamer and link it to your app, it can be messy. Better to use the one from distribution unless that gstreamer version is too old. It is the case for me. But I am still sticking to Qt5 for gstreamer and not keen to upgrade to Qt6.

                                      JoeCFDJ 1 Reply Last reply
                                      0
                                      • I imahgin

                                        @nben386 Still not able to get gstreamer working with QML.
                                        I'm considering using another approach and creating my own video sink class.
                                        If your Qt version is 6, there is a QVideoSink class that could help us, but I don't have enough time and it'll take some time to implement it and check if it works

                                        malikcisM Offline
                                        malikcisM Offline
                                        malikcis
                                        wrote on last edited by
                                        #19

                                        Hi @imahgin,
                                        >>I'm considering using another approach and creating my own video sink class.

                                        I did exactly that using QVideoSink and it works well. There is only one issue:
                                        At some point I need to copy my image buffer to QVideoSink using "memcpy" which appears to cost high amount of CPU.
                                        I am willing to share the code in exchange of hints on how to optimize CPU usage.

                                        1 Reply Last reply
                                        0
                                        • JoeCFDJ JoeCFD

                                          @Dure1966 A very simple way to do this is to build it from the source. The source code is under gstreamer/subprojects/gst-plugins-good/ext/qt6 if you download gstreamer source code from here:
                                          https://gitlab.freedesktop.org/gstreamer/gstreamer.git

                                          Try to build it with Qt 6 and your app. Then you can use it in your app. Sure you will have license issue. Better to build it into a plugin and put it at the right spot. Check where qml5glsink is located.

                                          Take a look at qgroundcontrol project and it uses qml5sink source code for Android build.

                                          If you build gstreamer and link it to your app, it can be messy. Better to use the one from distribution unless that gstreamer version is too old. It is the case for me. But I am still sticking to Qt5 for gstreamer and not keen to upgrade to Qt6.

                                          JoeCFDJ Offline
                                          JoeCFDJ Offline
                                          JoeCFD
                                          wrote on last edited by JoeCFD
                                          #20

                                          @JoeCFD Installed Qt 6.6.1 and gstreamer 1.22.8. The prefix in all Qt pkg pc files is wrong. Wrote a script to replace all of them. It seems gstreamer meson build mainly uses pkg files to find Qt5/6. Anyway, my build of gstreamer with qml6 sink seems fine while I got the following files:
                                          libgstqml6.so
                                          in gstreamer/builddir/subprojects/gst-plugins-good/ext/qt6 and

                                          gstplugin.cc.o
                                          gstqsg6glnode.cc.o
                                          gstqt6glutility.cc.o
                                          meson-generated_moc_qt6glitem.cpp.o
                                          moc_qt6glitem.cpp
                                          gstqml6glsink.cc.o
                                          gstqt6element.cc.o
                                          meson-generated_moc_gstqsg6glnode.cpp.o
                                          moc_gstqsg6glnode.cpp
                                          qt6glitem.cc.o

                                          in gstreamer/builddir/subprojects/gst-plugins-good/ext/qt6/libgstqml6.so.p

                                          libgstqml6.so is installed at the right place as well. A strange thing is gst-inspect-1.0 does not show gstqml6glsink. Need to try an example with gstqml6glsink.

                                          JoeCFDJ 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