Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56132 - in trunk/tools/build/v2: test/qt4 tools
From: juergen.hunold_at_[hidden]
Date: 2009-09-10 06:14:47


Author: jhunold
Date: 2009-09-10 06:14:46 EDT (Thu, 10 Sep 2009)
New Revision: 56132
URL: http://svn.boost.org/trac/boost/changeset/56132

Log:
Add support for QtMultimedia framework in upcoming Qt-4.6.

Added:
   trunk/tools/build/v2/test/qt4/qtmultimedia.cpp
      - copied, changed from r55857, /trunk/tools/build/v2/test/qt4/phonon.cpp
Text files modified:
   trunk/tools/build/v2/test/qt4/jamroot.jam | 1 +
   trunk/tools/build/v2/test/qt4/phonon.cpp | 2 +-
   trunk/tools/build/v2/test/qt4/qtmultimedia.cpp | 16 +++++++++-------
   trunk/tools/build/v2/tools/qt4.jam | 3 +++
   4 files changed, 14 insertions(+), 8 deletions(-)

Modified: trunk/tools/build/v2/test/qt4/jamroot.jam
==============================================================================
--- trunk/tools/build/v2/test/qt4/jamroot.jam (original)
+++ trunk/tools/build/v2/test/qt4/jamroot.jam 2009-09-10 06:14:46 EDT (Thu, 10 Sep 2009)
@@ -37,6 +37,7 @@
       # Multimedia toolkits.
       [ link qtwebkit.cpp /qt//QtWebKit ]
       [ link phonon.cpp /qt//phonon ]
+ [ link qtmultimedia.cpp /qt//QtMultimedia ]
 
       # Help systems.
       [ link qthelp.cpp /qt//QtHelp ]

Modified: trunk/tools/build/v2/test/qt4/phonon.cpp
==============================================================================
--- trunk/tools/build/v2/test/qt4/phonon.cpp (original)
+++ trunk/tools/build/v2/test/qt4/phonon.cpp 2009-09-10 06:14:46 EDT (Thu, 10 Sep 2009)
@@ -5,7 +5,7 @@
 
 #define BOOST_TEST_MODULE QtPhonon
 
-#include <phonon>
+#include <Phonon/MediaObject>
 
 #include <boost/test/unit_test.hpp>
 

Copied: trunk/tools/build/v2/test/qt4/qtmultimedia.cpp (from r55857, /trunk/tools/build/v2/test/qt4/phonon.cpp)
==============================================================================
--- /trunk/tools/build/v2/test/qt4/phonon.cpp (original)
+++ trunk/tools/build/v2/test/qt4/qtmultimedia.cpp 2009-09-10 06:14:46 EDT (Thu, 10 Sep 2009)
@@ -1,11 +1,11 @@
-// (c) Copyright Juergen Hunold 2008
+// (c) Copyright Juergen Hunold 2009
 // Use, modification and distribution is subject to the Boost Software
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#define BOOST_TEST_MODULE QtPhonon
+#define BOOST_TEST_MODULE QtMultimedia
 
-#include <phonon>
+#include <QAudioDeviceInfo>
 
 #include <boost/test/unit_test.hpp>
 
@@ -13,11 +13,13 @@
 {
     BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
     BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
- BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_XML_LIB), true);
- BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_PHONON_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_MULTIMEDIA_LIB), true);
 }
 
-BOOST_AUTO_TEST_CASE( phonon_object)
+BOOST_AUTO_TEST_CASE( audiodevices)
 {
- Phonon::MediaObject player;
+ QList<QAudioDeviceId> devices = QAudioDeviceInfo::deviceList(QAudio::AudioOutput);
+ for(int i = 0; i < devices.size(); ++i) {
+ BOOST_TEST_MESSAGE(QAudioDeviceInfo(devices.at(i)).deviceName().constData());
+ }
 }

Modified: trunk/tools/build/v2/tools/qt4.jam
==============================================================================
--- trunk/tools/build/v2/tools/qt4.jam (original)
+++ trunk/tools/build/v2/tools/qt4.jam 2009-09-10 06:14:46 EDT (Thu, 10 Sep 2009)
@@ -434,6 +434,9 @@
     # Phonon Multimedia (Qt 4.4)
     add-shared-library phonon : QtGui QtXml : QT_PHONON_LIB : $(target-requirements) ;
 
+ # Multimedia engine (Qt 4.6)
+ add-shared-library QtMultimedia : QtGui : QT_MULTIMEDIA_LIB : $(target-requirements) ;
+
     # XmlPatterns-Engine (Qt 4.4)
     add-shared-library QtXmlPatterns : QtNetwork : QT_XMLPATTERNS_LIB : $(target-requirements) ;
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk