diff options
author | Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com> | 2010-03-29 06:22:52 (GMT) |
---|---|---|
committer | Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com> | 2010-03-29 06:22:52 (GMT) |
commit | 8cbc9ff40c6b98a8ed488d5c6b86c58e90be6726 (patch) | |
tree | 38aa6ef7a4f15af3fdcffd8663a07ddca8132e9b | |
parent | 60039ad6f100c10c4e95a0caeeb46e3038272319 (diff) | |
parent | 0c2f6d17b3eecf88feb3e7720f9654601d75033a (diff) | |
download | Qt-8cbc9ff40c6b98a8ed488d5c6b86c58e90be6726.zip Qt-8cbc9ff40c6b98a8ed488d5c6b86c58e90be6726.tar.gz Qt-8cbc9ff40c6b98a8ed488d5c6b86c58e90be6726.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging into 4.7
-rw-r--r-- | config.tests/unix/pulseaudio/pulseaudio.cpp (renamed from config.tests/unix/pulseaudio/pulseaudiotest.cpp) | 19 | ||||
-rw-r--r-- | config.tests/unix/pulseaudio/pulseaudio.pro | 7 | ||||
-rwxr-xr-x | configure | 33 | ||||
-rw-r--r-- | src/multimedia/effects/effects.pri | 3 | ||||
-rw-r--r-- | src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.cpp | 9 | ||||
-rw-r--r-- | src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.cpp | 2 | ||||
-rw-r--r-- | src/plugins/phonon/ds9/ds9.pro | 2 |
7 files changed, 54 insertions, 21 deletions
diff --git a/config.tests/unix/pulseaudio/pulseaudiotest.cpp b/config.tests/unix/pulseaudio/pulseaudio.cpp index eed88da..ba5405b 100644 --- a/config.tests/unix/pulseaudio/pulseaudiotest.cpp +++ b/config.tests/unix/pulseaudio/pulseaudio.cpp @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the documentation of the Qt Toolkit. +** This file is part of the config.tests of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -40,10 +40,19 @@ ****************************************************************************/ #include <pulse/pulseaudio.h> +#include <pulse/glib-mainloop.h> -int main(int ,char **) +#if !defined(PA_API_VERSION) || PA_API_VERSION-0 != 12 +# error "Incompatible PulseAudio API version" +#endif +#if !PA_CHECK_VERSION(0,9,0) +# error "PulseAudio version too old" +#endif + +int main(int, char **) { - pa_threaded_mainloop *mainloop = pa_threaded_mainloop_new(); - return 0; + const char *headers = pa_get_headers_version(); + const char *library = pa_get_library_version(); + pa_glib_mainloop_new(0); + return (headers - library) * 0; } - diff --git a/config.tests/unix/pulseaudio/pulseaudio.pro b/config.tests/unix/pulseaudio/pulseaudio.pro index 698a35f..d75b16f 100644 --- a/config.tests/unix/pulseaudio/pulseaudio.pro +++ b/config.tests/unix/pulseaudio/pulseaudio.pro @@ -1,4 +1,3 @@ -SOURCES = pulseaudiotest.cpp -LIBS+=-lpulse -CONFIG -= qt dylib -mac:CONFIG -= app_bundle +SOURCES = pulseaudio.cpp +CONFIG -= qt +LIBS += @@ -5213,6 +5213,29 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then elif [ "$CFG_GLIB" = "no" ]; then CFG_ICD=no fi + + # Auto-detect PulseAudio support + if [ "$CFG_PULSEAUDIO" != "no" ]; then + if [ -n "$PKG_CONFIG" ]; then + QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null` + QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null` + fi + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pulseaudio "PulseAudio" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_PULSEAUDIO $QT_LIBS_PULSEAUDIO $X11TESTS_FLAGS; then + CFG_PULSEAUDIO=yes + QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO" + QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO" + else + if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then + echo "PulseAudio support cannot be enabled due to functionality tests!" + echo " Turn on verbose messaging (-v) to $0 to see the final report." + echo " If you believe this message is in error you may use the continue" + echo " switch (-continue) to $0 to continue." + exit 101 + else + CFG_PULSEAUDIO=no + fi + fi + fi fi # X11/QWS # x11 @@ -6036,14 +6059,6 @@ if [ "$CFG_ALSA" = "auto" ]; then fi fi -if [ "$CFG_PULSEAUDIO" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pulseaudio "pulseaudio" $L_FLAGS $I_FLAGS $l_FLAGS; then - CFG_PULSEAUDIO=yes - else - CFG_PULSEAUDIO=no - fi -fi - if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then if [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]; then "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS @@ -7700,6 +7715,7 @@ echo "CUPS support ........... $CFG_CUPS" echo "Iconv support .......... $CFG_ICONV" echo "Glib support ........... $CFG_GLIB" echo "GStreamer support ...... $CFG_GSTREAMER" +echo "PulseAudio support ..... $CFG_PULSEAUDIO" echo "Large File support ..... $CFG_LARGEFILE" echo "GIF support ............ $CFG_GIF" if [ "$CFG_TIFF" = "no" ]; then @@ -7807,7 +7823,6 @@ elif [ "$CFG_OPENSSL" = "linked" ]; then fi echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE" echo "Alsa support ........... $CFG_ALSA" -echo "Pulse Audio support .... $CFG_PULSEAUDIO" if [ "$PLATFORM_MAC" = "yes" ]; then echo "CoreWlan support ....... $CFG_COREWLAN" fi diff --git a/src/multimedia/effects/effects.pri b/src/multimedia/effects/effects.pri index be2b696..6307255 100644 --- a/src/multimedia/effects/effects.pri +++ b/src/multimedia/effects/effects.pri @@ -5,7 +5,8 @@ unix:!mac { DEFINES += QT_MULTIMEDIA_PULSEAUDIO HEADERS += $$PWD/qsoundeffect_pulse_p.h SOURCES += $$PWD/qsoundeffect_pulse_p.cpp - LIBS += -lpulse + QMAKE_CXXFLAGS += $$QT_CFLAGS_PULSEAUDIO + LIBS += $$QT_LIBS_PULSEAUDIO } else { DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER HEADERS += $$PWD/qsoundeffect_qmedia_p.h diff --git a/src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.cpp b/src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.cpp index 589d2b5..98068ac 100644 --- a/src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.cpp +++ b/src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.cpp @@ -52,9 +52,9 @@ #ifdef QMEDIA_GSTREAMER_CAPTURE #include "qgstreamercaptureservice.h" #endif - #include <QtMultimedia/qmediaserviceprovider.h> +#ifdef QMEDIA_GSTREAMER_CAPTURE #include <linux/types.h> #include <sys/time.h> #include <sys/ioctl.h> @@ -66,6 +66,7 @@ #include <stdlib.h> #include <sys/mman.h> #include <linux/videodev2.h> +#endif QT_BEGIN_NAMESPACE @@ -109,18 +110,21 @@ void QGstreamerServicePlugin::release(QMediaService *service) QList<QByteArray> QGstreamerServicePlugin::devices(const QByteArray &service) const { +#ifdef QMEDIA_GSTREAMER_CAPTURE if (service == Q_MEDIASERVICE_CAMERA) { if (m_cameraDevices.isEmpty()) updateDevices(); return m_cameraDevices; } +#endif return QList<QByteArray>(); } QString QGstreamerServicePlugin::deviceDescription(const QByteArray &service, const QByteArray &device) { +#ifdef QMEDIA_GSTREAMER_CAPTURE if (service == Q_MEDIASERVICE_CAMERA) { if (m_cameraDevices.isEmpty()) updateDevices(); @@ -129,12 +133,14 @@ QString QGstreamerServicePlugin::deviceDescription(const QByteArray &service, co if (m_cameraDevices[i] == device) return m_cameraDescriptions[i]; } +#endif return QString(); } void QGstreamerServicePlugin::updateDevices() const { +#ifdef QMEDIA_GSTREAMER_CAPTURE m_cameraDevices.clear(); m_cameraDescriptions.clear(); @@ -178,6 +184,7 @@ void QGstreamerServicePlugin::updateDevices() const } ::close(fd); } +#endif } Q_EXPORT_PLUGIN2(gstengine, QGstreamerServicePlugin); diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.cpp b/src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.cpp index 406cefe11..4ecf10b 100644 --- a/src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.cpp +++ b/src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.cpp @@ -117,6 +117,7 @@ void QGstreamerVideoInputDeviceControl::update() m_names.clear(); m_descriptions.clear(); +#ifdef QMEDIA_GSTREAMER_CAPTURE QDir devDir("/dev"); devDir.setFilter(QDir::System); @@ -157,6 +158,7 @@ void QGstreamerVideoInputDeviceControl::update() } ::close(fd); } +#endif } QT_END_NAMESPACE diff --git a/src/plugins/phonon/ds9/ds9.pro b/src/plugins/phonon/ds9/ds9.pro index de7efbe..e77c50d 100644 --- a/src/plugins/phonon/ds9/ds9.pro +++ b/src/plugins/phonon/ds9/ds9.pro @@ -7,7 +7,7 @@ LIBS += -lstrmiids -ldmoguids -luuid -lmsdmo -lole32 -loleaut32 TARGET = phonon_ds9 DEFINES += PHONON_MAKE_QT_ONLY_BACKEND -PHONON_DS9_DI
= $$QT_SOURCE_TREE/src/3rdparty/phonon/ds9 +PHONON_DS9_DIR = $$QT_SOURCE_TREE/src/3rdparty/phonon/ds9 # Input HEADERS += \ |