summaryrefslogtreecommitdiffstats
path: root/src/plugins/pulseaudio
Commit message (Collapse)AuthorAgeFilesLines
* PulseAudio: change the way volume is applied.Yoann Lopes2016-03-164-137/+56
| | | | | | | | | | | | | | | | | | | | 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>
* PulseAudio: remove debug warning of UnderrunDyami Caliri2016-03-011-1/+0
| | | | | | | | The QAudio::UnderrunError is a normal error and is already reported to the user. Change-Id: I0ee5d827666fb08b5eb199255b3b3c5610f743c2 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* PulseAudio: fix playback for short streams in pull modeDyami Caliri2016-02-261-6/+32
| | | | | | | | | If the provided stream's length is shorter than the stream prebuf attribute, the stream will never play. We adjust the prebuf attribute in this case. Change-Id: Ia397ac967ad2fa357a7aba137fbb78de272440ed Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-251-4/+4
| | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: I8e1554b648327ea2fb342b882ce8e439bd6f271d Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-211-1/+1
|\ | | | | | | Change-Id: I6d88b17f44479a522d181374023648dd007112bd
| * PulseAudio: fix QAudioOutput state after resume().Yoann Lopes2016-01-191-1/+1
| | | | | | | | | | | | | | | | | | In push mode, the state must be IdleState after resume(), and only change to ActiveState once it receives some data. Change-Id: I8caff011f517e91629abf45af51580f24136bcea Task-number: QTBUG-50390 Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Yoann Lopes2015-11-202-1/+5
|\| | | | | | | Change-Id: I8e0f222f110cc23b426f2d68416f5cc3982e30f2
| * Don't initialize volume on pulse audio input by default.Morten Minde Neergaard2015-11-192-1/+5
| | | | | | | | | | | | Task-number: QTBUG-49461 Change-Id: I32b707e19091ab8344175b2dc0cdd1747f1186b3 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | pulseaudio: Remove unused static member variableSergio Martins2015-06-011-2/+0
|/ | | | | Change-Id: I79f8ce318d4fb72ddbd9d4e5c030df01c36084fa Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Update copyright headersAntti Kokko2015-02-1212-84/+84
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I1c6faa4f59f8eca54f01ef20941fa60161dd7872 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devYoann Lopes2015-01-194-18/+18
|\ | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/gstreamer/camerabin/camerabinsession.cpp Change-Id: I66a6f3efc5391013934b6b321073c31f25e1de26
| * Fix: static linking on Linux with both PulseAudio and Alsa pluginsGabriel Hege2014-12-224-18/+18
| | | | | | | | | | | | | | | | | | | | | | Fixed multiply defined symbols when linking statically with both PulseAudio and Alsa plugins enabled: The private classes In/OutputPrivate had identical names and have been renamed. Change-Id: I9415beeeed9fb0e14ead3f0ab906f343b3934341 Task-number: QTBUG-43514 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Add missing includes for QDataStream/QIODevice.Friedemann Kleint2015-01-072-0/+2
|/ | | | | | | | After qtbase/90e7cc172a7521396bb2d49720ee4ceb9a9390b3, QStringList no longer includes QDataStream. Change-Id: Ibe3e1e6542e1b592adaabe3f8ffd3268efaf289b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Sergio Ahumada2014-09-262-2/+2
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Iad73368a22c6d4662188e6f357a265d0c26756d0
| * Fix integer overflow in several audio plugins.Yoann Lopes2014-09-092-2/+2
| | | | | | | | | | | | Task-number: QTBUG-40804 Change-Id: If006cb7db319bb6fda4ce7eb4f907e897b5d9efa Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* | Update license headers and add new license filesAntti Kokko2014-08-2412-222/+126
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: Ied06887225df341064c12bcc14c259ae74116f2e Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* | Only call pa_cvolme set on stream creation if volume explicitly set.Robin Burchell2014-08-042-7/+22
|/ | | | | | | | | | | Streams without a custom volume set use suitable volume selected by the PulseAudio server. This is usually the correct choice, since then stream-restore module can apply old volume to the stream. Also with Sailfish explicitly setting the volume to streams breaks system volume. Change-Id: I75f5bf4e7aaafb4bd55510f5ac4ddf03767d494b Done-with: Juho Hämäläinen <juho.hamalainen@tieto.com> Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* PulseAudio: make plugin more robust.Yoann Lopes2014-07-106-253/+347
| | | | | | | | | | | | | Handle more thoroughly error cases, such as when the PulseAudio daemon does not respond or terminates while QAudioInput/QAudioOutput is active, in which cases it used to crash or hang. We now correctly emit the error signal and change the state when errors occur. Task-number: QTBUG-29742 Change-Id: I173d35aece60d96e578785e1522cf78b24dcb8b8 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* QAudioOutput: Don't guess media role if one has not been provided in ↵Robin Burchell2014-02-071-10/+2
| | | | | | | | | | | | | setCategory. Trying to heuristically guess this kind of thing is almost always a bad idea. Expect the creator of the output to explicitly tell us the category instead of guessing. This fixes QAudioOutput not respecting system volume on Sailfish. Change-Id: If1d05192f513eb54fdfbd1df217286f329b2bfe8 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* PulseaudioInput: Remove unused membersTobias Hunger2013-09-021-2/+0
| | | | | | | Clang warns about them. Change-Id: I8fb2e9bc30f35ec9540b09a34bf23bf9eb671b9c Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Fix warnings in qtmultimediaThiago Macieira2013-04-031-0/+1
| | | | | | | | | /camerabinresourcepolicy.cpp:100:42: error: unused variable 'oldSet' [-Werror=unused-variable] camerabincontrol.cpp:167:54: error: 'resourceSet' may be used uninitialized in this function [-Werror=maybe-uninitialized] qaudiooutput_pulse.cpp:416:20: error: unused variable 'bytesWritten' [-Werror=unused-variable] Change-Id: Idafd85b7985673f1f22d868b5f1b1e46a60ada4a Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1012-12/+12
| | | | | | Change-Id: Ia8c1c38aba1544603fada8c414cc856f365fd15b Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Add PLUGIN_CLASS_NAME to qtmultimedia pluginsMiikka Heikkinen2012-12-101-0/+1
| | | | | | | | Needed for automating static plugin loading. Task-number: QTBUG-28131 Change-Id: Ia392b112fc46dedd34c9ffdbd6e874dbbfeaef83 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* adjust to qt_plugin.prf changesOswald Buddenhagen2012-11-051-5/+1
| | | | | | | | | | DESTDIR and INSTALLS+=target are set up automatically now. note that in the qmediaserviceprovider test we must override that. also, TARGET munging is done automatically. Change-Id: Ida5d5601e22b099134d1ec07ace713e0d0986bd6 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2412-288/+288
| | | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Id77334cfb15de096941c88e32d04ca07b4eb4709 Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* centralize load(qt_build_config)s in .qmake.confOswald Buddenhagen2012-09-121-2/+0
| | | | | Change-Id: Ie07a32729ec8679f799613f8f6ccdd9c1b6bf7c9 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fixed qaudioinput unit test with pulseaudio backendKurt Korbatits2012-07-111-0/+6
| | | | | | | | - notify signal wasn't being emitted enough. - range checking on processedUSecs extended. Change-Id: Icfa1f3b364a7e0f9d3f37abd8dc5ed0c1e22f923 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Delete obsolete class methods and update related codeMithra Pattison2012-07-102-6/+6
| | | | | | | | Delete obsolete methods from QAudioFormat and QAudioDeviceInfo and update code that relied on the obsolete methods. Change-Id: I007e36375a45399b1d5a289341bc5d5a05dc68cc Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Read actual period size after initializing a stream.Lev Zelenskiy2012-06-281-3/+9
| | | | | | | QTBUG-23833 Change-Id: I2bd352cf34d12e1be22f640c47fc2388dc3a7f8a Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* build system cleanupsOswald Buddenhagen2012-06-251-1/+1
| | | | | | | | | | | | | | | | | - load(qt_module) => load(qt_build_config) - remove: - CONFIG+=module (obsolete) - code relating to module version headers (automated now) - %mastercontent assignment (automated now) - QT_BUILD_*_LIB defines (automated now) - pointless QPRO_PWD assignments - pointless DEFINES+=QT_MAKEDLL - pointless and commented out include and depend paths - qmake -project boilerplate Change-Id: I8f4586403848fe8f2dff4e889b389956ffcdea59 Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com> Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* QAudioOutput: low-latency related changes.Lev Zelenskiy2012-05-142-15/+40
| | | | | | | | | | - Decrease timer period to 10ms; - Set PulseAudio buffer size if specified by the user; - Set PulseAudio buffer size to 40ms if not specified; - Always request 1 chunk of data at a time in pull mode; Change-Id: If95c097c67c3342f733bde9e699518741d7ef991 Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* Change uses of {to,from}Ascii to {to,from}Latin1Thiago Macieira2012-05-041-1/+1
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: Ic591779a3431999c007fb0ff362c7e25ce54097e Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com>
* Expose the audio category information for streams.Michael Goddard2012-04-162-1/+34
| | | | | | | | | | | QAudioOutput and QSoundEffect now have a category property so that system volume mixing or processing can be applied. Initially just pulseaudio supports this but Windows Vista etc should also work. Change-Id: I6855b08367e5a055ac7dfcffd644c98bfd7c5a4e Reviewed-by: Ling Hu <ling.hu@nokia.com>
* add #include <unistd.h> to classes which use ::getpidThomas Senyk2012-04-133-0/+6
| | | | | | | | | | | | I got "error: ‘::getpid’ has not been declared" and solved it with adding #include <unistd.h> Updated version of change 23032. Now including <sys/types.h> as well. Change-Id: I969845e1c4d5b72a223f6f4e0050b2fb342b8f17 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Updated IID, services, and controls to use qt-project URLJonas Rabbe2012-03-201-1/+1
| | | | | | | | | Instead of com.nokia.qt we should use org.qt-project.qt. All the identifiers have also been updated to use pure lowercase, and where used the version numbers have been updated to 5.0. Change-Id: Ib209327f5205f5a086a5932394504a8a52e1f712 Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* Updated plugins to use new plugin architectureJonas Rabbe2012-03-204-8/+8
| | | | | | | | | | | | | | | | | | | Changed QMediaPluginLoader to use QFactoryLoader instead of QPluginLoader and used metadata to get keys. Removed QAudioPluginLoader and changed audio classes to use instead use QMediaPluginLoader. The plugins must include the Q_PLUGIN_METADATA macro, and no longer use the Q_PLUGIN_EXPORT/Q_PLUGIN_EXPORT2 macros. A json file has been added for each plugin which can contain metadata which is available to the plugin loader before the plugin is actually loaded, and is used to read the keys for the plugin, e.g. supported services. QFactoryInterface will be deprecated and has been removed from all plugins. Change-Id: I035b82f9c9c65717bebf704d560ea8f891df21da Reviewed-by: Michael Goddard <michael.goddard@nokia.com> Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* clean up qmake-generated projectsOswald Buddenhagen2012-02-221-1/+0
| | | | | | | | remove assignmets which are defaults or bogus Change-Id: I7130f22a66b294f92b0ed03749895136d0890a64 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Fix some compiler warnings.Michael Goddard2012-02-141-2/+2
| | | | | | | | | As it turns out, we had an overloaded virtual from an earlier era, with the extra parameter never used. So cleaning that up was a bonus to remove the compiler warning. Change-Id: I780287f8a5d2b0a1ec84ec62c88ba50e051f372b Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3012-12/+12
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I20e5215108c6ebd5f8474fed5c3665118e4791e6 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add a volume (gain) property to QAudioInput.Michael Goddard2012-01-252-0/+110
| | | | | | | | Only implemented for PulseAudio so far, but the API does explain that it's optional. Change-Id: I4543a1c81d810fe92bb08f1ed13f3a3534a371e4 Reviewed-by: Ling Hu <ling.hu@nokia.com>
* Fix some static analysis defects.Michael Goddard2012-01-251-0/+3
| | | | | | | | | A few silly errors, a few unlikely errors, a few changes that should not have resulted in a problem but makes the code clearer. Change-Id: Id2c82e9317d53822e4da13c94dec9595ea33b07a Reviewed-by: Ling Hu <ling.hu@nokia.com> Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-2312-12/+12
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: Ie8cd560b6d9a2c6e552b6be1ad8bc96c80a6535c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update year in Nokia copyright headers.Jason McDonald2012-01-1212-12/+12
| | | | | | | Update headers from before 2011 that were missed in the previous commit. Change-Id: Ib0fd91a39ffc57117fe01280e34519c3f914fac0 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fixed QtMultimedia core namespace compilation.Toby Tomkins2011-11-251-1/+1
| | | | | Change-Id: Ie276a7766bd26f3e49b2bc9c1a28ec96f1e3e4b0 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* If we fail to connect to pulse, don't enumerate sinks or sources.Michael Goddard2011-11-241-3/+5
| | | | | | | | Otherwise the pulse client library dislikes having methods called with a null context. Change-Id: I96629065b7a0e36e0d10402526cb167e65458e27 Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
* Add cap on internal read/write buffer for QAudioOuput(PA)Ling Hu2011-11-151-1/+1
| | | | | | | cap set to no more than 5x period size Change-Id: If3ae244993a8929832f6724c386dac6f12ef0f03 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Add additional protection on the write size in QAudioOuput(pulseaudio)Ling Hu2011-11-141-0/+5
| | | | | | | | | Check and cap the write size in pull mode to handle the case where user returned an invalid write size through QIODevice Change-Id: Ie0610a63f1d5400fba87f32a99bdc38479e0e7e8 Reviewed-by: Michael Goddard <michael.goddard@nokia.com> Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
* Fix pullmode data lost problem in QAudioOutput(pulseaudio)Ling Hu2011-11-092-42/+36
| | | | | | | | | | | At each userFeed, m_bytesAvailable is not updated properly in pullmode, so the pull data size become irrelevent to the size we can actually write. This problem is fixed by checking the actual writable size each time before pulling the data and limit the size of the pulled and written data. Change-Id: I6f53e6348693ddf4e3c79e90d3c3d0c1ffc713aa Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com> Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Rename QtMultimediaKit to QtMultimedia.Michael Goddard2011-10-071-2/+2
| | | | | | | | | | There are a few legacy bits left in place so it passes CI, and then qt5.git etc can be updated. Change-Id: I6b082e50e6958c72fdabc2974992e16d90dafa3a Reviewed-on: http://codereview.qt-project.org/5368 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
* Add QAudioOutput volume API and pulseaudio backend implementation.hawcroft2011-09-282-1/+56
| | | | | | | Change-Id: I70784e8d17522a23f6467713d58384b30557694b Reviewed-on: http://codereview.qt-project.org/5663 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: derick hawcroft <derick.hawcroft@nokia.com>