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

QMediaPlayer does not fetch the currently playing track from live stream

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.1.0 , 5.2.0
    • Fix Version/s: 5.3.0 RC1
    • Component/s: Multimedia
    • Labels:
      None
    • Environment:
      Ubuntu 13.10
      SailfishOS
    • Commits:
      464ed66119ba065a8604ceed9963b2626a9ca586

      Description

      I try to get the metadata from this stream: http://sites.89.0rtl.de/streams/mp3_128k.pls (Other streams did not work either)
      VLC-Player is able to fetch the current playing song.

      Example code used to get metadata:

       
      this->player = new QMediaPlayer(this);
      connect(this->player, SIGNAL(metaDataChanged(QString,QVariant)), this, SLOT(metaDataChanged(QString,QVariant)));
      
      // ...
      
      void Player::metaDataChanged(QString key, QVariant value)
      {
          qDebug() << "Metdadata changed:" << key + ":" << value.toString();
      }
      

      After loading the stream, I get the following metdadata:

      Metdadata changed: "Genre:" "Top 40" 
      Metdadata changed: "Publisher:" "89.0 RTL" 
      Metdadata changed: "location:" "http://www.89.0rtl.de" 
      Metdadata changed: "AudioCodec:" "MPEG 1 Audio, Layer 3 (MP3)" 
      Metdadata changed: "nominal-bitrate:" "128000" 
      Metdadata changed: "channel-mode:" "joint-stereo" 
      Metdadata changed: "has-crc:" "0" 
      Metdadata changed: "AudioBitRate:" "128000" 
      Metdadata changed: "maximum-bitrate:" "128012" 
      Metdadata changed: "minimum-bitrate:" "128012"
      

      Even after 10 seconds, using a QTimer, I get the same available metadata from QMediaPlayer::availableMetaData():

       
      void Player::timerTimeout()
      {
          QStringList available = this->player->availableMetaData();
      
          for (int i=0; i<available.count(); i++) {
              qDebug() << "Available:" << available[i];
          }
      }
      

      Output:

      Available: "AudioBitRate" 
      Available: "AudioCodec" 
      Available: "Genre" 
      Available: "Publisher" 
      Available: "channel-mode" 
      Available: "has-crc" 
      Available: "location" 
      Available: "maximum-bitrate" 
      Available: "minimum-bitrate" 
      Available: "nominal-bitrate" 
      

        Attachments

        For Gerrit Dashboard: QTBUG-37640
        # Subject Branch Project Status CR V

          Activity

            People

            • Assignee:
              ylopes Yoann Lopes
              Reporter:
              ejjoman Michael Neufing
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes