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. SIGSEGV on gst_element_set_state when trying to run any of QMediaPlayer examples - Ubuntu 20.10
Forum Updated to NodeBB v4.3 + New Features

SIGSEGV on gst_element_set_state when trying to run any of QMediaPlayer examples - Ubuntu 20.10

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 2 Posters 761 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.
  • V Offline
    V Offline
    VictoriaR
    wrote on last edited by
    #1

    Hello Qt forum,
    After about a month ago I updated my OS to 20.10, and I believe, after this update I am not able to run any of the Qt examples that rely on QMediaPlayer.
    I tried versions of Qt: 5.15.0 and 5.15.2 and it is the same on both.
    I ran the videowidget example in the Debug mode, and was able to see the line of code where it fails:
    GstStateChangeReturn ret = gst_element_set_state(element, GST_STATE_READY); from the file qgstreamvideooverlay.cpp.
    I checked and I believe I have the GStreamer installed, but now started to wonder if I need to update any packages, or what could be the source of this behavior? Any tips?

    Here is the screenshot of the debug window, in case if it may be helpful:

    db0a27d6-4569-4b7b-9d63-d2c6923f754a-image.png

    Thank you!

    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 try to build your application with the distribution provided Qt ?

      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
      • V Offline
        V Offline
        VictoriaR
        wrote on last edited by
        #3

        @SGaist said in SIGSEGV on gst_element_set_state when trying to run any of QMediaPlayer examples - Ubuntu 20.10:

        y to build your application with the distribution provided Qt

        Hello, not sure if I understood correctly, but I didn't build the Qt from source, my Qt is installed using Qt Maintenance Tool for Linux. Would you advise to build the necessary Qt libraries from source to try to solve this problem?

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

          Not at all, my suggestion is to use your distribution's package manager to install the development packages for Qt as they provide it.

          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
          • V Offline
            V Offline
            VictoriaR
            wrote on last edited by
            #5

            Thank you for the suggestion, I had just installed Qt using the apt-get. It installed the latest version 5.14.2. I added the multimedia package. Unfortunately, I'm still experiencing the same issue (SIGSEGV) with this kit as well.

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

              Can you test if you can play that media file directly with GStreamer ?

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

              V 1 Reply Last reply
              0
              • V Offline
                V Offline
                VictoriaR
                wrote on last edited by
                #7
                This post is deleted!
                1 Reply Last reply
                0
                • SGaistS SGaist

                  Can you test if you can play that media file directly with GStreamer ?

                  V Offline
                  V Offline
                  VictoriaR
                  wrote on last edited by
                  #8

                  Yes, I am able to open my mp4 file as well as run the test file.
                  I use the following command to open up the mp4 video file: gst-launch-1.0 filesrc location=myfile.mp4 ! qtdemux ! avdec_h264 ! queue ! videoconvert ! autovideosink

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

                    Just to be sure everything is done correctly, does the player get the full path the file ? It should not trigger a segfault though.

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

                    V 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      Just to be sure everything is done correctly, does the player get the full path the file ? It should not trigger a segfault though.

                      V Offline
                      V Offline
                      VictoriaR
                      wrote on last edited by
                      #10

                      does the player get the full path the file

                      The SIGSEGV happens on this line: m_mediaPlayer = new QMediaPlayer(this, QMediaPlayer::VideoSurface);. So, I cannot call the constructor of the class.
                      I feel like it may be a problem with Qt not finding the GStream library path correctly, or something within those lines. Unfortunately, I do not have much understanding beyond that.

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

                        Which packages of GStreamer did you install ?
                        Do you also have that in a dummy project with just the video player ?

                        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

                        • Login

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