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. QT 4.6.2 and QMediaPlayer
Forum Update on Monday, May 27th 2025

QT 4.6.2 and QMediaPlayer

Scheduled Pinned Locked Moved Mobile and Embedded
qmediaplayer li
7 Posts 2 Posters 1.9k 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.
  • A Offline
    A Offline
    aabfm
    wrote on last edited by
    #1

    Hi,
    My setup is this for the development machine:

    • Ubuntu 10.04 LTS
    • QT 4.6.2
    • QMake: Qt-arm-X11
      and for the embedded computer:
    • Anders DX4 with CM-T3730 (ARMv7a based)
    • Linux distro: Angstrom

    I've been struggling to put a simple window playing an mp4 video. As simple as this: just playing a video!
    After a few months trying everything, from simple to complex solutions, I just don't know where to turn to. I need help!
    I don't have neither qmediaplayer libraries nor phonon ones installed.
    Is there out there a kind soul that can help me install, for instance, qmediaplayer which I find to be easier to play with so I can play the video?
    If there is a quick solution please can you guide me on how to achieve it?
    Thanks in advance.

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

      Hi,

      Are you really locked to that pretty old version of 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
      • A Offline
        A Offline
        aabfm
        wrote on last edited by
        #3

        Hi,
        Sorry for this late response.
        You don't want to know the headache this stuff have been for during the last months.
        Anyway, I'm stuck with this, on one hand because I don't know enough about Qt (basically this is my first app) and on the other hand because the module that I have (that Anders DX4 thing) is not that popular in a way that basically there isn't a single soul besides me that uses it. Adding to that the support from the manufacturer/assembler is not that good also.
        Anyway, I've manage to use mplayer calling it from the main app using this slot:

        void MainWindow::on_pushbutton_video_clicked()
        {
        FILE* pipe;
        int i;
        QMainWindow::showMinimized();
        pipe=popen("mplayer -fs 'teste_video.mp4'", "w");
        pclose(pipe);
        QMainWindow::showFullScreen();
        }

        This sorts out the problem, however, I add to use that 'showMinimized' function otherwise the video was played behind the main window.
        Now this is the problem: after the video finishes, the video window closes and it stays like that! I tried the last line of code to put the main app back but nothing happens...
        Any ideas?
        Thanks

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

          Go rather with QProcess and the fact that you can control mplayer using std in. So you can stop / start it gracefully from Qt.

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

          A 1 Reply Last reply
          0
          • SGaistS SGaist

            Go rather with QProcess and the fact that you can control mplayer using std in. So you can stop / start it gracefully from Qt.

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

            Can you help me with that?
            I'm so sorry but I'm used to low microcontrollers/microprocessors programming and this is all new to me...
            Any thing like add x and y lines to z file and so on... I'd me much thankful for that.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              aabfm
              wrote on last edited by
              #6

              Sorted it!
              I did this, it might not be the most orthodox approach but it works:

              FILE* pipe;
              
              pipe=popen("mplayer -slave -fs 'teste_video.mp4'", "w");
              QMainWindow::lower();
              
              pclose(pipe);
              
              QMainWindow::activateWindow();
              QMainWindow::show();
              QMainWindow::raise();
              

              Thanks anyway.

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

                QProcess details is worth reading anyway.

                You can more easily integrate it within your application if you need more control about mplayer

                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