summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio
Commit message (Collapse)AuthorAgeFilesLines
...
* Completely remove the old plugin infrastructureLars Knoll2021-01-291-1/+0
| | | | | | | | | Now that nothing relies on QMediaServiceProvider* anymore, get rid of those classes. Change-Id: I30d4e878598b7af63f9a5b8cc3cf7cf3daa37f6a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move QAudioDecoder over to use the new platform infrastructureLars Knoll2021-01-292-39/+2
| | | | | | | | | | | And remove the hasSupport() method for now as with QMediaPlayer and QMediaRecorder. Also adjust the auto test to use the new mock infrastructure. Change-Id: I84a8587f273525d1ee1ed26ded6822bb92448e01 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cleanup mock backend and tests using it.Lars Knoll2021-01-291-1/+1
| | | | | | Change-Id: I2a77c06ba544c918785fb1d60a54f36a320250f9 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove some dead codeLars Knoll2021-01-291-1/+0
| | | | | | Change-Id: I9871d37bb9c1963026bd9e8e05c7222f7e6a21fc Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the static methods from QAudioDeviceInfoLars Knoll2021-01-223-37/+3
| | | | | | | | QMediaDeviceManager now has the information. Change-Id: Iadba41d14c2a8d02d3e8eb3024e30a525ea0e14c Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QAudioInputSelectorControlLars Knoll2021-01-222-11/+1
| | | | | | | | | Use the new QMediaDeviceManager to get the list of available audio inputs instead. Simplify the API in QMediaRecorder. Change-Id: I0faf89a083b6778d0e172851fc8fb3f0d7569f54 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add a QMediaDeviceInfo class to enumerate input/output devicesLars Knoll2021-01-2211-440/+93
| | | | | | | | | | | | | | | | | Use this as the starting point for a new QPA like backend infrastructure. Refactor places that use the device information to use the new infrastructure. Cleanup the audio subsystem part and port it over to the new infrastructure. Android and QNX are not ported yet. Change-Id: I99c459c998f1f05e1c40ad30c700011e41cef533 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of plugins for MM backendsLars Knoll2021-01-221-27/+46
| | | | | | | | | | There's no need for having those in plugins and we can further remove abstractions and simplify our code if the code is directly compiled into Qt Multimedia. Change-Id: I5267a6a776375d99be8f0de4207f0288d963e620 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Create a common platform subdirectory in src/multimediaLars Knoll2021-01-2281-18295/+0
| | | | | | | | | Collect all platform dependent code under this subdirectory. The existing plugins will get moved here in the follow-up commits. Change-Id: I03f9ef386cf96dc7ebbb60c4698c84bdc8ee19b7 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Provide a proper descriptive name for audio devicesLars Knoll2021-01-2212-1/+30
| | | | | | | | deviceName() should probably go and be renamed to id(). Change-Id: I9e04f9194d21036adf21108e3206e77d608cc991 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove playlist support from QMediaPlayerLars Knoll2021-01-221-2/+2
| | | | | | | | | | Playlists can be trivially supported on top of QMediaPlayer, as the modified player example shows. There's no need to have all this complexity in QMediaPlayer itself. Change-Id: Iacdd58f7736809606669d150b1ba6046813b2207 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Simplify reading data from QSoundEffectLars Knoll2021-01-221-70/+29
| | | | | | | | | | Just deliver as much data as being asked by the audio output. There's no point in artificially limiting how much we write, as the output should know best what it can handle. Change-Id: I673f602f4989bb89f69f6db6d1936f0c921c79c6 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* audio/pcm is not a valid mimetypeLars Knoll2021-01-2213-26/+26
| | | | | | | | Use audio/x-raw instead, in line with gstreamer. Change-Id: Ib6c27fec7e227d1086750b24f91b4b69ecc870a9 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use gstreamer for audioLars Knoll2021-01-2213-2/+1763
| | | | | | | | | | | | | | This is a basic implementation of the audio classes using gstreamer. The code still has bugs and needs further work, but this is good enough for now. With this change, we can remove the alsa/pulseaudio code paths and start getting rid of the plugin architecture as a whole. Change-Id: I5469d13991071ef28d35f63aa3c15539334db15e Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Smaller cleanupLars Knoll2021-01-224-35/+18
| | | | | | Change-Id: Ib1c2f5dafaf4ec201f8e2d93915dda5818023769 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up the QSoundEffect implementationLars Knoll2021-01-224-650/+344
| | | | | | Change-Id: I2d1bb41575d0516492e7e9225fb022fbd62cdb0a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make bind/unbind() not virtualLars Knoll2021-01-222-22/+0
| | | | | | | | | They are never reimplemented and should go in the longer term. Change-Id: Ib0f6010fd14e74981750fb70f9e5988e65bebcf6 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rename QMediaObject to QMediaSourceLars Knoll2021-01-224-13/+13
| | | | | | | | That actually describes what those classes are. Change-Id: I9ce01707bb260ff6452359e211f2c22b5740e61b Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Coding style cleanupsLars Knoll2021-01-213-15/+7
| | | | | | | | Do some coding style fixes proposed by clang-tidy. Change-Id: I62584767fd7af2f98ac02653c1105d64188f5554 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Modernize code baseLars Knoll2021-01-219-106/+93
| | | | | | | | | Run clang-tidy over the code base with some code modernization options. Change-Id: I9e74d1225bce333e74224e3b92c02c7e9884d8f5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Remove the pulse specific backend for QSoundEffectLars Knoll2021-01-214-1385/+3
| | | | | | | | | | | | It'll still go through pulseaudio to play back the sound through the more generic code path. This avoids some code duplication and should simplify work on multimedia going forward. Change-Id: Idb9d58243f82b3e2bddb46f38988ab34285599b2 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Cleanup the QMediaPluginLoaderLars Knoll2021-01-211-1/+0
| | | | | | | | We expect only one plugin per service type, later on this will get reduced to one plugin per platform. Change-Id: I01383427efa7021f4c33299c551108982a8bc67a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix a bunch of compiler warningsLars Knoll2021-01-205-11/+13
| | | | | | Change-Id: I137b07f0909195019d136f1ce8926afd4bbb5e5f Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Unexport internal methods and classesLars Knoll2021-01-202-4/+4
| | | | | | | | | Now that we don't have audio plugins anymore, there's no need to export those internal methods/classes anymore. Change-Id: I5af030ccd46d8ecd6ba5f291ca7c2cd5f3b0abc9 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move the qnx audio plugin into QtMultimediaLars Knoll2021-01-2013-2/+1884
| | | | | | Change-Id: I09825e7d6f1ed724e7238bd167537fcd72b0aeba Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move the android audio code into QtMultimediaLars Knoll2021-01-2013-1/+2431
| | | | | | Change-Id: I879641ae2dfc8d171afb3cc6db8bad27120dcf7c Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move Windows audio code over into Qt MultimediaLars Knoll2021-01-2013-2/+2697
| | | | | | Change-Id: Ib4f652b49a2d0805a5a44e9f2114b24ab366cdb5 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move coreaudio code into Qt MultimediaLars Knoll2021-01-2015-2/+3776
| | | | | | Change-Id: I8662d63fb9e17ae2c50ca3095f1baba4d626f293 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Shuffle some code aroundLars Knoll2021-01-2017-230/+135
| | | | | | | | | Move the QAudioSystemInterface class into the qaudiosystem.h header file and make that one private. Change-Id: Ib83dceaafcdf418f27264bfa6dbec8a1dafef13b Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the plugin infrastructure for audio pluginsLars Knoll2021-01-2030-148/+5827
| | | | | | | | | Move the PulseAudio and ALSA code directly into Qt Multimedia. The other plugins will follow in the next commits. Change-Id: I59471fa65639ccc746e6fa182d34373f6f901199 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* get rid of the QAudioSystemPluginExtension classLars Knoll2021-01-205-105/+12
| | | | | | | | Merge it into the regular plugin interface. Change-Id: I5a6f06c506f48780f20f16cd44375958a73d3127 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of the unused resource policy and availability controlLars Knoll2021-01-202-32/+0
| | | | | | | | | The only implementation of this was using some Nokia specific library, that hasn't existed since 2012 anymore. Change-Id: Ieaec2176ad8e4fc170bb5254944fffc41edccefa Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Kill QSoundLars Knoll2021-01-203-331/+0
| | | | | | | | | The class has been deprecated since Qt 4 and has a replacement with QSoundEffect. Change-Id: Id8cf389f539c23494e85c130ffada2dc211953fd Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-06-281-2/+2
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I5466906d759a7cc046d77a21e2c647a4b938d070 Reviewed-by: Val Doroshchuk <valentyn.doroshchuk@qt.io>
* QNetworkReply: Fix use of deprecated error signalMårten Nordheim2020-03-251-1/+1
| | | | | | | | | Update it to use the new errorOccurred Task-number: QTBUG-82605 Change-Id: Ia7f4f51917ac4694e54e47318cb477aa05c2929e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* PulseAudio: Discard buffer with outdated volume in QSoundEffectVaL Doroshchuk2020-03-131-0/+17
| | | | | | | | | | | | | When the sample is ready, the volume is applied to it and written back to pulse's buffer. When the volume is changed again, need to discard buffer with outdated volume, and rewrite. Change-Id: I51a6ab3ee1a5c799643a43c5628439c2d659f9fc Fixes: QTBUG-79687 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-211-12/+1
|\ | | | | | | Change-Id: I2ba97d82a57172656f6549f368ee51f718f9cdf8
| * Extract QAudioProbe code snippetMariana Meireles2019-09-111-12/+1
| | | | | | | | | | | | | | Adding the code to a snippet file Change-Id: Iee3a24a1d2f28bc8863cf321b0b55c0459708995 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-121-1/+1
|\| | | | | | | | | | | | | | | Conflicts: src/gsttools/qgstvideorenderersink.cpp src/gsttools/qgstvideorenderersink_p.h Change-Id: I7fe29161d568fa3f7688abfd2f993d1b16ac3fb9
| * Include moc files after QT_END_NAMESPACEVal Doroshchuk2019-09-091-1/+1
| | | | | | | | | | | | Fixes: QTBUG-76574 Change-Id: I69ef47bbd01967c3d7a0c5d1554fcdd29619ebfa Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | Port from QMutex::Recursive to QRecursiveMutexMarc Mutz2019-08-012-9/+11
| | | | | | | | | | | | | | | | Also port from QMutexLocker to std::lock_guard or std::unique_lock, as the former will not support QRecursiveMutex going forward. Change-Id: I1ed1a129e2b9b77aa0a729e8cab03c673566a345 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Make QAudioDeviceInfo::realm() publicVal Doroshchuk2019-07-192-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Since there could be multiple audio plugins, sometimes it is useful to filter devices per a plugin or avoid duplicates if any. QAudioDeviceInfo::realm() returns a key of the audio plugin that was used to retrieve the device info. Change-Id: Ie786c2c0f5bf181f08ee9be544f20eb41a264e26 Fixes: QTBUG-75781 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-161-4/+8
|\| | | | | | | Change-Id: I7ca7fb6143ec296c16a37a7be236470dbd1742a7
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-111-4/+8
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ic700bdddc5b4ae663af0daae54feb2420c8a1730
| | * Fix crash when app is destroyed before QSample::load is finishedVaL Doroshchuk2019-07-051-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSample objects live and handled in loading thread (which uses QNetworkAccessManager). When the app is finished and going to be destroyed, all static objects are destroying as well. In case if static QNetworkConfigurationManagerPrivate (which is used by QNetworkAccessManager) is destroyed before static QSampleCache, and loading of the resource is not finished yet (still executing QNetworkAccessManager::get()), this produces a crash. Since the loading thread is started only when loading of new QSample is requested, (and all events are also handled by this thread) proposing a fix to wait before loading thread is finished when a sample is requested to be released. This postpones deleting of the QSample either when new sample is requested to load or when QSampleCache is destroyed. This makes sure that no loading thread exists when all QSoundEffects objects and afterwards QNetworkConfigurationManagerPrivate are already deleted. Change-Id: I55669ea4c2796a48cae4f0465f7f74d89e393675 Fixes: QTBUG-76090 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | | Eradicate Java-style iterators and mark the module free of themMarc Mutz2019-07-041-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Java-style iterators are scheduled to be deprecated, or at the very least banned from use in Qt's own implementation. Ditto for QLinkedList. Change-Id: I5471c293a7a050b92db47f7aeac15dd05bd46650 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | | Port towards load/storeRelaxed atomicsFriedemann Kleint2019-06-251-3/+3
|/ / | | | | | | | | | | | | | | Plain load() / store() have been deprecated, so port away to their straight replacements. Change-Id: Id5d0cfc97336618e444126278630decf581f3b6c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Doc: Fix multiple documentation issuesv5.13.0-beta3Topi Reinio2019-04-161-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - GstTools has some (internal) documentation, but was causing a number of warnings with QDoc's clang parser - exclude it from the documentation build. - Remove direct links from example documentation to individual example files; they no longer work. - Fix navigation for QML types; The main QML types pages did not list types for QtAudioEngiine. - Use \QtMinorVersion macro to make the documented import versions follow the minor Qt version. - Fix \since usage to be consistent throughout. - Fix linking issues for QML properties/methods - Minor language fixes Change-Id: I735cd13fa6dedd6bf06d6b6ef50ce2e0d69a545b Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-272-2/+2
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ie0a7534d518cd5758119edc77d8275ac3da2037c
| * Add source url to 'decoding error' warningRoland Rossgotterer2019-03-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | Previously, QSoundEffect logged a warning if the source could not be decoded, but without mentioning the source it tried to decode. When using multiple QSoundEffects in one application, adding the source to the warning will help to find the one causing the decode error. Change-Id: I4c6bbdfe4a62f650b64ab951bcc637febedae98e Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>