The test case is functional now with the newer Qt.

** Changed in: qtmultimedia-opensource-src (Ubuntu)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to qtmultimedia-opensource-
src in Ubuntu.
https://bugs.launchpad.net/bugs/1219656

Title:
  qtmultimedia5-dev needs depend on libpulse-dev

Status in “qtmultimedia-opensource-src” package in Ubuntu:
  Fix Released

Bug description:
  A simple audio file player like below need qtmultimedia5-dev. And as
  linking, it has "-lpulse" needs libpulse-dev.

  === main.cc
  #include <QCoreApplication>
  #include <QTimer>
  #include <QDebug>

  #include <QtMultimedia/QMediaPlayer>

  int main(int argc, char *argv[])
  {
      QCoreApplication app(argc, argv);
      QMediaPlayer *player;

      if (argc != 2) {
          qDebug() << "usage: " << argv[0] << " audiofile";
          return 0;
      }

      player = new QMediaPlayer(0, 0);

      player->setMedia(QUrl::fromLocalFile(argv[1]));
      player->setVolume(50);
      // player->setPlaybackRate(1.2);
      player->play();

      QObject::connect(player, SIGNAL(stateChanged(QMediaPlayer::State)),&app, 
SLOT(quit())); // as state change, quit app.
  //  QTimer::singleShot(1000, &app, SLOT(quit())); //stop after 5 seconds

      return app.exec();
  }

  === playaudio.pro
  QT       += core
  QT       += multimedia
  QT       -= gui

  TARGET = playaudio
  CONFIG   += console
  CONFIG   -= app_bundle

  TEMPLATE = app

  SOURCES += main.cpp

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtmultimedia-opensource-src/+bug/1219656/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to