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

QMediaPlayer fails to open audio stream

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.3.0
    • 5.0.1
    • Multimedia
    • None
    • Kubuntu 13.04 32bits
    • 7451906b71e7271238ecf9446b7960ab2c647cc9

    Description

      Opening a video stream works fine with QMediaPlayer, however the following fails when it's an audio stream:

      QMediaPlayer *player = new QMediaPlayer(this);
      QUrl url("/path/to/file.mp3");
      QFile *file = new QFile(url);
      file->open(QFile::ReadOnly);
      player->setMedia(url, file);
      player->play();

      When it's a mp3 the console output is:
      GStreamer: Could not determine the type of the stream
      If it's an ogg:
      Error: "Could not demultiplex stream."

      I find it odd because if I do the same with AVI or MP4, video files in general it works, I took a look at Qt sources but I clueless.

      And it works if I don't pass the file pointer, as it isn't
      loaded as a stream, but of course that isn't an option for me
      as I have a custom QIODevice to read encrypted files and I
      also plan to have another custom to play from dlna streams.

      Thanks.

      Attachments

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

        Activity

          People

            ylopes Yoann Lopes
            dantti Daniel Nicoletti
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes