summaryrefslogtreecommitdiff
path: root/src/multimedia/audio
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into 5.105.10Liang Qi2018-02-021-1/+2
|\ | | | | | | Change-Id: I0564f22f9001d373ad03426dd6d9f584fbab7115
| * PulseAudio: Prevent crash when a sound device cannot be createdAndy Shaw2018-01-241-1/+2
| | | | | | | | | | Change-Id: I74436b9e8903dd3d38926497594ee195f31c81e6 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-061-1/+4
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I3d6e69f3f99b2f0a0e2c29ffdd02176e1f22304e
| * Fix memory leak in QSoundEffectVaL Doroshchuk2017-12-141-1/+4
| | | | | | | | | | | | | | | | | | If qthread is being exited all objects that belong to it also should be cleaned up. Task-number: QTBUG-64407 Change-Id: Ida09fcfac7e1ee2741c6e1b76a672a7a5775addc Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | PulseAudio: Fix deadlock for QSoundEffect in setMuted, setVolumeVaL Doroshchuk2017-12-192-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | The deadlock would happen when one of the protected functions were reentered, as the lock used was not recursive. Since reading and writing to the volume and muted properties don't happen that often, the rw-mutex was replaced by a normal non-recursive mutex, which is now unlocked before the property changed signal is emitted. Task-number: QTBUG-65220 Change-Id: I1a224e9ff03f14593a854a7c1049c8a0445e29e6 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | PulseAudio: Support 24 bit framesVaL Doroshchuk2017-09-261-13/+16
| | | | | | | | | | | | | | | | | | Applied 24 bits frames support and also stronger restrictions for supported formats: https://freedesktop.org/software/pulseaudio/doxygen/sample.html Task-number: QTBUG-63427 Change-Id: If5372217cbf16c1152db55748adcfbd61263403d Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | PulseAudio: allow to disable the pulseaudio autospawn featureBartosz Golaszewski2017-07-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | By default pa_context_connect() tries to spawn a new pulseaudio instance if it the connection fails. This is not always desirable. Add a new environment variable: QT_PULSE_NOAUTOSPAWN which - when set - will make QSoundEffect pass the PA_CONTEXT_NOAUTOSPAWN flag to pa_context_connect() thus disabling the autospawn feature. Change-Id: I623639fd5a262c8fefbd683fa9481916e79bdf0e Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | PulseAudio: allow to specify the pulseaudio server stringBartosz Golaszewski2017-07-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently we call pa_context_connect() with an empty server string. This works fine if we only want to connect to the default pulseaudio server, but we may want to specify the server string on systems with custom configuration. Add a new environment variable: QT_PULSE_SERVER_STRING which allows to specify the server string passed to pa_context_connect(). Change-Id: I6805ff5e941d13bc91d306e5df3ab5d04a8a90af Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devChristian Strømme2017-07-072-3/+3
|\ \ | |/ | | | | Change-Id: Ifda1f02b8458a4fbe85d8bc27e61d4646147d82c
| * Doc: Fix wrong slashRainer Keller2017-07-071-1/+1
| | | | | | | | | | Change-Id: I979c7d8d01b00689269a7969b628864ca5eab991 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * PulseAudio: fix a pthread_mutex crash in error pathBartosz Golaszewski2017-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSoundEffect (pulseaudio) uses a workaround for stability issues: although the pulseaudio mainloop mutex is recursive, it utilizes a separate lock counting. This is not the best solution, but it is a part of a larger set of changes which improved the stability in CI under heavy load. QSoundEffect always calls pa_threaded_mainloop_lock/unlock() from the same thread so the additional lock counting works in normal situation even though it doesn't use atomic types. However if pa_context_connect() fails, pa_threaded_mainloop_unlock() is called without regard to current lock count. This leads to random double-unlock aborts if pa_context_connect() fails more than once (e.g. after the reconnect scheduled from onContextFailed()). Fix this by always using the PulseDaemon wrappers around pa_threaded_mainloop_lock/unlock(). Task-number: QTBUG-61725 Change-Id: I41eb9a76892a6646fd5620ef8f686473b339464f Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | io-audio based audio management for QNX 7.0.0James McDonnell2017-03-272-8/+16
|/ | | | | | | | | | | | | | | | | | | | Add code to setup and handle io-audio based audio management notifications. Add InterruptedState to QAudio::State. Indicates that this stream is in a suspended state because another higher priority stream currently has control of the audio device. Playback cannot resume until the higher priority stream relinquishes control of the audio device. Adjust the documentation for QAudio::State SuspendedState to reflect the fact that audio management events can also put the stream into this state. Add InterruptedState handling to the spectrum example. Change-Id: Ie8616af03ae4c503de1d0571a222e5853035cc0e Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-102-6/+4
|\ | | | | | | | | | | | | Conflicts: src/plugins/gstreamer/camerabin/camerabincontainer.h Change-Id: I4942d41d69112335fe0c994002f1b32ef3aad051
| * Use QT_CONFIG macro to check for featuresLars Knoll2017-02-272-5/+3
| | | | | | | | | | | | | | And remove many custom defines. Change-Id: I658cc8430d1d99ed3c0aafe03a77adce76621a29 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
| * Make pulseaudio dependency privateAlexander Volkov2017-02-031-1/+1
| | | | | | | | | | | | | | | | Otherwise projects that depend on multimedia module fail to build. Change-Id: I44a614fd3b2bea934149f8bf55eaeb17069258d5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Make QAudioSystemPlugin doc visible.Yoann Lopes2017-01-272-4/+0
| | | | | | | | | | Change-Id: I0384fd6069349f321e60ffedd03834f1c46f634b Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devYoann Lopes2017-01-261-16/+94
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/multimediawidgets/videographicsitem/videoplayer.h src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp Change-Id: Id5ce05ffe2cd25657232157b162680b2e24a35ba
| * PulseAudio: make sound effect implementation more robustYoann Lopes2016-12-121-16/+94
| | | | | | | | | | | | | | | | | | | | | | | | - Always lock the pulse thread when modifying variables that are also used in callbacks (prevents concurrent access). - Improved handling of repeated calls to setSource(). - Don't try to write to the device when there is nothing to write. - Stop the Pulse thread when there are no sound effects in use anymore. Task-number: QTBUG-55735 Change-Id: I5e1c6beab89fdbb98707f5fcbb539dddea9a333f Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Add missing override and remove redundant virtualAlexander Volkov2016-12-126-67/+67
|/ | | | | Change-Id: Ifd439abf21877adff57080489324bea729ee5279 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Add proper global headers for QtMultimediaLars Knoll2016-11-2313-13/+13
| | | | | | | And deprecate the old qtmultimediadefs.h Change-Id: I2d4164f3a51d8e5d1813413b4f6691a721386fdf Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Cleanup all maemo/meego specific codeLars Knoll2016-11-143-76/+0
| | | | | Change-Id: I6c6f28084c6b030928eebc53c5d0009b168ede6a Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Move qtmultimedia over to the new config systemLars Knoll2016-11-141-13/+6
| | | | | | | | | | | | Use the new configuration system to define external libraries, configure tests and features. Don't use pkg-config outside of the configuration step. And move all command line options over from qtbase, so that we can remove them from there in a second step. Change-Id: I1aa4b557a6aee17eeceb00602005a2d28b426a26 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Yoann Lopes2016-10-113-7/+5
|\ | | | | | | Change-Id: I8cfa9cb233675bb7ff842118d96ec8ac0b97964f
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-043-7/+5
| |\ | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/integration/qaudiooutput/tst_qaudiooutput.cpp Change-Id: I4a30fc030c25e7b8da3eb9f386c4a5fa468df141
| | * Clamp out-of-range volume values in QAudioInput and QAudioOutputYoann Lopes2016-09-282-2/+4
| | | | | | | | | | | | | | | Change-Id: I6da76524533e16f6987fad6029b1f42960972383 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| | * Clamp volume in QMediaRecorder and QSoundEffectYoann Lopes2016-09-271-5/+1
| | | | | | | | | | | | | | | Change-Id: Ie61c33592873b7e5a2ed1b8ccf3386b20edb2cef Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Yoann Lopes2016-09-231-14/+47
|\ \ \ | |/ / | | | | | | Change-Id: I96aca24df935d51b40380c727b6c5002432a6be6
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Yoann Lopes2016-09-221-14/+47
| |\ \ | | |/ | | | | | | Change-Id: I5bce2843ac62bb97efc1ccaaa9c671c4adf10640
| | * PulseAudio: make code more robustYoann Lopes2016-09-211-14/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some asynchronous operations return a pa_operation pointer, which can be null if the operation fails. In some cases we were not checking that the returned object was non null, leading to some asserts being raised in pa_operation_unref. Change-Id: Iff1cc67b7f79b758fa81d79e658debb1d737b29f Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Yoann Lopes2016-09-013-11/+50
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/multimedia/audio/qaudiosystemplugin.cpp src/plugins/directshow/helpers/directshowobject.cpp src/plugins/directshow/player/directshowiosource.cpp src/plugins/directshow/player/directshowiosource.h Change-Id: I0e4632c7705128f81429ddbcb0d4abbc04858a8b
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-273-11/+50
| |\ \ | | |/ | | | | | | Change-Id: I639d42e78a2b85e939c9f8e9dd5da70cdc058857
| | * PulseAudio (QSoundEffect): don't write data to an unready streamYoann Lopes2016-08-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | The PulseAudio stream must be ready to write data to it, otherwise an assert is raised. Change-Id: Iaa108124a135b018aa84845a37665895a005f380 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| | * PulseAudio: flush stream before loading a new source in a sound effectYoann Lopes2016-08-152-10/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | When loading a new QSoundEffect source, the data in the stream must be flushed to avoid that the old source plays right before the new one. Task-number: QTBUG-48982 Change-Id: Iff14884edb2fb4851f93e67ff8191b77ebb16359 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| | * Doc: Change instances of 'OS X' to 'macOS'Topi Reinio2016-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change all occurrences where the platform is discussed to use the macro \macos (defined in the documentation configuration in qtbase). Change-Id: I1ba3b1e3c11870523516d3a13790d40dd0803aad Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Improve audio volume documentationYoann Lopes2016-08-223-6/+39
| | | | | | | | | | | | | | | | | | | | | | | | Added information about volume scales. Change-Id: Ica8367396147e3e1c814b3575faa5cf0503be031 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Add LogarithmicVolumeScale to VolumeScale enum.Yoann Lopes2016-06-142-12/+54
| | | | | | | | | | | | | | | Change-Id: I0b556b5f705825fc8c8135305bda4bc860ffbf14 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Fix out-of-date documentation for QAudioSystemPlugin.Yoann Lopes2016-06-031-16/+7
| | | | | | | | | | | | | | | Change-Id: I0c186ae42a6f1ad0d2fde38544341741d4e8df6a Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Add new volume conversion API.Yoann Lopes2016-06-032-0/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All Qt Multimedia volume APIs expect a linear volume factor. However, UI volume controls should typically use a logarithmic or cubic scale to match how the human ear perceives loudness. The new helper function (C++ and QML) provides a way to do the conversion from one scale to another. Change-Id: If7795426b728ab0e8fd6635988dbc9be795e3e5e Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Remove mentioning of -audio-backend command line optionLars Knoll2016-05-311-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The option has not done anything for quite some time, let's get rid of it. Change-Id: I8863ae81b74f1065d0eb0dd95b8ce192a6cd6a51 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | | Improve QAudioDeviceInfo::defaultDevice().Christian Stromme2016-05-206-35/+124
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation of QAudioDeviceInfo::defaultXDevice() would always report the first available device as the "default" one, making the order, in which devices were listed, a hidden requirement when implementing audio plugins. To make it easier and more reliable to retrieve the default device, all new plugins should implement the new QAudioSystemPluginExtension interface as well as the QAudioSystemPlugin. Devices will be chosen in the following order (first match wins): default plugin -> default device -> first available device plugins -> default device -> first available device Task-number: QTBUG-51292 Change-Id: I8ace78858976fe7c60a2c4a117ef15c4e1bb177f Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-212-170/+57
|\ \ | |/ | | | | Change-Id: Ieb1a3081907093e31e8c8b7f95993bb3b2173672
| * PulseAudio: change the way volume is applied.Yoann Lopes2016-03-162-170/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to change the PulseAudio sink input volume. Doing so had some potential unwanted side effects depending on the PulseAudio server configuration. When flat volumes were enabled, it would affect the global system volume. It could also affect the volume of other streams having the same audio role. Volumes in Qt Multimedia are supposed to be relative to the application volume and should not affect anything else than the object on which it was changed. To guarantee that, PulseAudio volume APIs are not used anymore. Instead, software-based volume attenuation is applied on the audio samples before being passed to PulseAudio. Applies to QSoundEffect, QAudioOutput and QAudioInput. Task-number: QTBUG-40823 Task-number: QTBUG-49461 Change-Id: I690716976bda8fe666969ca2cbdf6d8d0b419733 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-077-9/+9
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/avfoundation/mediaplayer/mediaplayer.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin1/mockserviceplugin1.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin2/mockserviceplugin2.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin3/mockserviceplugin3.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin4/mockserviceplugin4.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin5/mockserviceplugin5.pro Change-Id: I5742596230dc510ba2a09eba624429bb67179194
| * Add explicit and make public headers compile with ↵Marc Mutz2016-03-037-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -Wzero-as-null-pointer-constant ... or equivalent. QtBase 5.6 headers already compile that way, so let the other modules follow suit. Cleaned up placement of * and & in parameters as a drive-by. Added explicit where it was missing as a drive-by. This is not a source-incompatible change, because code that breaks by this is a bug. Let's not have this sitting around in an LTS. Task-number: QTBUG-45291 Change-Id: If81ed0c71393aee21d347f5ade4bf3fcc07cd82f Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-261-1/+2
|\ \ | |/ | | | | Change-Id: I2e4e9cca01d63ed0d1e7f71c7a58322390696036
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-191-1/+2
| |\ | | | | | | | | | Change-Id: I01940fe4f3d059fbb425492a1748e2b5d9b6804b
| | * Fix setting state to not playing when audio error occurredPasi Petäjäjärvi2016-01-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Even if QAudioOutput has finished playing audio state don't change to stopped because QSoundEffect checks only QAudio::IdleState as when to stop itself. Change-Id: Iea3a4926c87ea5a7b440e62d832bbc13bcdd3b6d Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | | Updated license headersAntti Kokko2016-01-1937-518/+740
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I324f65c61171f36641472964d095d72e452afb3a Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.6' into devChristian Strømme2016-01-152-0/+3
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/android/src/mediacapture/qandroidcamerasession.cpp src/plugins/wmf/mftvideo.cpp Change-Id: I78868b416ea4baec89ca3e2dc9eb4712db16d5fc
| * | Merge remote-tracking branch 'origin/5.5' into 5.6Christian Strømme2016-01-121-0/+2
| |\ \ | | |/ | | | | | | Change-Id: Ia563cf734178b821c2aadda8b79b1f09b17de7cd