Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [Solved] Missing gstreamer mediaservices in Qt5.2.1

[Solved] Missing gstreamer mediaservices in Qt5.2.1

Scheduled Pinned Locked Moved Mobile and Embedded
19 Posts 3 Posters 13.4k Views
  • 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.
  • N Offline
    N Offline
    Neuer_User
    wrote on last edited by
    #1

    Hi

    I am building Qt5 in Yocto using the meta-qt5 layer. Building Qt5.1.2 (in dora) works perfectly and builds also the gstreamer mediaservice plugins.

    However, Qt5.1.2 is pretty inefficient in some operations and not usable for me. So, I tried building Qt5.2.1 (branch master-next). The build works perfectly. Qt5.2.1 is also working nicely (and much more efficient than 5.1.2), but it misses all gstreamer multimedia service plugins.

    I have no idea, why. I only switched the meta-qt5 branch to master-next. Everything else remained the same. But I only have

    libqtmedia_audioengine.so

    in /usr/lib/qt5/plugins/mediaservices.

    Whereas with Qt5.1.2:

    libgstaudiodecoder.so libgstcamerabin.so libgstmediacapture.so libgstmediaplayer.so

    What am I doing wrong?

    Thanks

    Michael

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

      Hi and welcome to devnet,

      Did you check the output of the configure step of Qt ? The gstreamer libraries might not be found

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

      1 Reply Last reply
      0
      • N Offline
        N Offline
        Neuer_User
        wrote on last edited by
        #3

        Hi and thanks for answering :-)

        I was suspecting something like this, although I am still wondered why it work for Qt5.1.

        I am still very new to the yocto environment. I have to admit, I haven't even found out how to find the logs...

        Will search more through the tutorials and then post again the configure logs.

        Michael

        1 Reply Last reply
        0
        • N Offline
          N Offline
          Neuer_User
          wrote on last edited by
          #4

          OK, now found the logs and compared them between 5.1.1 and 5.2.1. The interesting part seems to be this:

          qtmultimedia/5.1.1-r0/temp/log.do_configure:
          @Checking for alsa... yes
          Checking for pulseaudio... yes
          Checking for gstreamer... yes
          Checking for gstreamer_photography... yes
          Checking for gstreamer_encodingprofiles... yes
          Checking for gstreamer_appsrc... yes
          Checking for resourcepolicy... no
          Checking for xvideo... yes
          @

          Whereas in qtmultimedia/5.2.1-r0/temp/log.do_configure:
          @Checking for alsa... yes
          Checking for pulseaudio... yes
          Checking for resourcepolicy... no
          @

          So, I guess now we need to find out, why it doesn't even check for gstreamer?

          1 Reply Last reply
          0
          • N Offline
            N Offline
            Neuer_User
            wrote on last edited by
            #5

            Hmm, found more log data in
            qtmultimedia/5.2.1-r0/build/config.log
            and
            qtmultimedia/5.1.1-r0/build/config.log
            respectively,

            It is absolutely clear that the configure did not at all check for gstreamer in 5.2.1 (whereas it does that in 5.1.1).

            There are also a folder config.tests in each release directory. The 5.1.1 includes the following tests:
            @alsa/
            gstreamer_appsrc/
            gstreamer_photography/
            resourcepolicy/
            gstreamer/
            gstreamer_encodingprofiles/
            pulseaudio/
            xvideo/ @

            Whereas 5.2.1 contains:
            @alsa/
            pulseaudio/
            resourcepolicy/@

            Now, the question is why?

            1 Reply Last reply
            0
            • N Offline
              N Offline
              Neuer_User
              wrote on last edited by
              #6

              Hmm, found something, digging through the meta-qt5 sources:

              in qtmultimedia.inc (from 5.1.1):
              @require qt5.inc

              DEPENDS += "qtdeclarative gstreamer gst-plugins-base alsa-lib "

              PACKAGECONFIG ??= ""
              PACKAGECONFIG[openal] = ",,openal-soft"

              do_configure_prepend() {
              # disable openal test if it isn't enabled by PACKAGECONFIG
              sed -i 's/^qtCompileTest(openal)/OE_OPENAL_ENABLED:qtCompileTest(openal)/g' ${S}/qtmultimedia.pro
              }

              EXTRA_QMAKEVARS_PRE += "${@base_contains('PACKAGECONFIG', 'openal', 'CONFIG+=OE_OPENAL_ENABLED', '', d)}"
              @

              In 5.2.1:
              @require qt5.inc

              DEPENDS += "qtdeclarative alsa-lib"

              PACKAGECONFIG ??= ""
              PACKAGECONFIG[openal] = ",,openal-soft"
              PACKAGECONFIG[gstreamer010] = ",,gstreamer gst-plugins-base"

              do_configure_prepend() {
              # disable openal test if it isn't enabled by PACKAGECONFIG
              sed -i 's/^qtCompileTest(openal)/OE_OPENAL_ENABLED:qtCompileTest(openal)/g' ${S}/qtmultimedia.pro
              # disable gstreamer-0.10 test if it isn't enabled by PACKAGECONFIG
              sed -i 's/^( *)qtCompileTest(gstreamer) {/\1OE_GSTREAMER010_ENABLED:qtCompileTest(gstreamer) {/g' ${S}/qtmultimedia.pro
              }

              EXTRA_QMAKEVARS_PRE += "${@base_contains('PACKAGECONFIG', 'openal', 'CONFIG+=OE_OPENAL_ENABLED', '', d)}"
              EXTRA_QMAKEVARS_PRE += "${@base_contains('PACKAGECONFIG', 'gstreamer010', 'CONFIG+=OE_GSTREAMER010_ENABLED', '', d)}"
              @

              Now, this looks to me as if gstreamer is deliberately disabled, but depending on some "PACKAGECONFIG". No idea, what exactly this is in yocto.

              Can anybody comment on this?

              Thanks

              Michael

              P.S.: I will change the qtmultimedia recipe and remove the disabling. Will be interesting to see if I get a working qtmultimedia then...

              1 Reply Last reply
              0
              • N Offline
                N Offline
                Neuer_User
                wrote on last edited by
                #7

                If anybody is interested, here is the corresponding commit:

                https://github.com/meta-qt5/meta-qt5/commit/faad8d1df1aee67f9d1a7e9ea3c13f92d04baf8e

                I try now to build with

                @PACKAGECONFIG_append_pn-qtmultimedia = " gstreamer010"@

                in my local.conf. Let's see if that works.

                1 Reply Last reply
                0
                • N Offline
                  N Offline
                  Neuer_User
                  wrote on last edited by
                  #8

                  Ok, this works. Mediaservices for gstreamer are now built. So far, so good.

                  Unfortunately, while Qt5.2.1 does indeed better than Qt5.1.1 on some operations, multimedia is not better at all.

                  Result on a quad-core imx6 device:

                  Playing an HD video stream using gstreamer: CPU < 10% usage
                  In Qt5: 100% of one core (QSGRender)

                  Playing a FHD video stream using gstreamer: CPU < 15 usage
                  in Qt5: 100% CPU usage, unplayable, very low fps, lots of dropped frames

                  Playing a 640x480 rtsp stream with gstreamer: CPU < 5% usage, nearly no frame drops
                  in Qt5: CPU <5-10% usage, but unplayable, very low fps, lots of dropped frames (>90%)

                  The integration of imx6 in Qt5 multimedia still seems to be very much lacking. I should probably consider moving to a baytrail system, hoping that the integration is better there.

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

                    Glad you succeeded building Qt 5.2.1

                    For the performance problem, you should bring it to the interest mailing list you'll find there Qt's developers/maintainers

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

                    1 Reply Last reply
                    0
                    • N Offline
                      N Offline
                      Neuer_User
                      wrote on last edited by
                      #10

                      Thanks, sounds like a good idea. Any idea which group / mailing list? You mean those under the "groups" link, right? Should I use the Linux group or is there a special group for imx6?

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

                        You're welcome !

                        Nop, I mean this "mailing list":http://lists.qt-project.org/mailman/listinfo/interest

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

                        1 Reply Last reply
                        0
                        • N Offline
                          N Offline
                          Neuer_User
                          wrote on last edited by
                          #12

                          Done that. Let's see what comes out of this. Otherwise, I would need to lok at a different platform (bay trail?), although I really like the imx6 products available today (seen the cubox-i? really cude :-) ).

                          1 Reply Last reply
                          0
                          • N Offline
                            N Offline
                            Neuer_User
                            wrote on last edited by
                            #13

                            Interesting answer on the interest list. As it seems in Qt5.3 there is a new commit, which should help very much with the performance problem:

                            https://codereview.qt-project.org/#change,76764

                            Now, I need to find out, how to get Qt5.3. I'm using Yocto and the meta-qt5 branch. Either I am lucky and it's already there, or I need to find out, howto compile it without Yocto.

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

                              Or you could check how meta-qt5 is prepared and create yours

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

                              1 Reply Last reply
                              0
                              • N Offline
                                N Offline
                                Neuer_User
                                wrote on last edited by
                                #15

                                I was in contact with Martin Jensa. He does have a 5.3 branch. I was able to compile and deploy it, but gstreamer (in Qt) hangs when trying to play a video. I need to find out, why.

                                1 Reply Last reply
                                0
                                • N Offline
                                  N Offline
                                  Neuer_User
                                  wrote on last edited by
                                  #16

                                  Good news (and some bad news)!!!!

                                  Video play in Qt5.3 on imx6 is really much, much better!!!!

                                  However, either something in QT5.3 has changed versus Qt5.2 or theer is somewhere a bug in Qt5.3. My app is no longer working. It just doesn't start the video. (Actually it DOES start video playback but then it hangs. No idea, why, so far... It worked perfectly with 5.2.1.

                                  1 Reply Last reply
                                  0
                                  • N Offline
                                    N Offline
                                    Neuer_User
                                    wrote on last edited by
                                    #17

                                    Solved the problem. Some behaviour changed in Qt5.3. Easy to fix.

                                    Here are my notes on compiling Qt5.3 on Yocto, if anybody is interested: https://community.freescale.com/docs/DOC-100419

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

                                      Nice !

                                      Thanks for sharing the guide

                                      Since you have it working, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

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

                                      1 Reply Last reply
                                      0
                                      • B Offline
                                        B Offline
                                        ben80
                                        wrote on last edited by
                                        #19

                                        bq. I try now to build with PACKAGECONFIG_append_pn-qtmultimedia = " gstreamer010" in my local.conf. Let’s see if that works.

                                        Can you tell me which file "local.conf" you used? I am trying to do the same, and i am stuck at the same point. This solutions seems to be the most promising one on the web

                                        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