summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudiodecoder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QAudioDecoder: fix unit tests for GStreamerTim Blechmann2024-04-171-35/+62
| | | | | | | | | | | | | | | When setting a QUrl with an empty scheme, we need to set the file:// pattern for uridecodebin. This has been done for QMediaPlayer in the past, but not for QAudioDecoder. Compare: 8a3806f6263f56b5be5b557e321b9b13d1913d5f To keep consistency with QMediaPlayer, we introduce a QAudioDecoderPrivate class. Pick-to: 6.5 6.7 Task-number: QTBUG-96985 Change-Id: If954a04a003aecb0f862a7e5041ead43e4c9d259 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* docs: update warning note about QAudioDecoder::setAudioFormat()Nicholas Bennett2023-05-171-1/+2
| | | | | | | Fixes: QTBUG-100514 Pick-to: 6.5 Change-Id: Ib6ccfd13e80e2bc3f6166b3782148a55954f605d Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Doc: Fix qdoc warnings for undocumented members in QAudio*Venugopal Shivashankar2022-09-291-3/+5
| | | | | | | | | In addition, fixed a few clang-format warnings. Pick-to: 6.4 Change-Id: I9d97f1e7e2454e524229d5621ee9461558049830 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Enable error reporting when failed to initialize backend elementPiotr Srebrny2022-09-261-37/+21
| | | | | | | | | | | | | | | This patch adds an option to report error message when a backend component cannot be instantiated. This error message is then displayed in the console with qWarning and in some cases reported to the app user with error signals. We need further improvements on the error reporting side. Additionally, this patch cleans up the code in the .cpp API classes. Pick-to: 6.4 Change-Id: Id39865cc8f1e9b52804bf5b9d9b15e738508f860 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Use SPDX license identifiersLucie Gérard2022-06-241-38/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: Ida08dfe6c84778656e942178c3d39042c9ef1ed2 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QAudioDecoder: Re-add API for setting desired audio formatDoris Verria2021-08-251-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | Re-add API for setting/getting desired format for the decoded audio samples. Readd support on all backends with the exception of Android. - Add a warning in the docs for lack of support on Android. - Make the behavior of audioFormat() consistent on all platforms. It will return an invalid format if no format is set. Change Windows implementation to do so. - Fix the documentation for audioFormat(). The format returned is the one set to the decoder, and the decoded buffers may not have this format, in the case when it was set to an invalid one. - Some small fixes on darwin and Windows. Partly reverts af1182b5e29afa0cd69f929d54da224019707214. Fixes: QTBUG-95766 Pick-to: 6.2 Change-Id: Id1d6b33a6b9d916e272d3b9d9cee78b6f63609f3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Part 1 Fix Qt Multimedia documentation issuesTopi Reinio2021-07-091-44/+6
| | | | | | | | | | | | | TODO: * src/multimedia/audio/qaudiobuffer.cpp:333: (qdoc) warning: Cannot find 'QAudioBuffer::StereoFrame' * multimediaquick/camerafocus.qdoc content refers to now-removed classes * multimediawidgets module doc needs CMake build instructions/snippet * Lots of undocumented parameters, enum values, other minor things Pick-to: 6.2 Change-Id: I4861aa0edf2904e5e43783f5167c5d2ba575b91b Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix the QAudioDecoder APILars Knoll2021-06-171-46/+10
| | | | | | | | | | | | | | | | Adjust API after code review. Remove the audioFormat property. QAudioDecoder will now always decode to the native format used in the encoded file. QAudioBuffer will have the correct format set, and it's up to the app to handle this correctly. Remove state() and replace by isDecoding(). Change-Id: I6f2ac375d98b2d7c36aebaa729599f78699b1c7b Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Cleanup the audio decoder architectureLars Knoll2021-05-171-119/+38
| | | | | | | | | | | | | | | QPlatformAudioDecoder should not be a QObject, instead just have a pointer back to the front-end class. The backend is now also properly owned by the frontend. Get rid of QAudioDecoderPrivate, we don't need it anymore. Fix the audiodecoderbackend autotest and the audiodecoder example. Change-Id: Id9a3368788b5398f37b77be819e8f12947ba045f Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Some API and doc fixes for QAudioDecoderLars Knoll2021-05-071-14/+22
| | | | | Change-Id: I0f839896c9f813939b99b01242b54a00796731a8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix qaudiobuffer and qaudiodecoder autotestsLars Knoll2021-04-231-3/+3
| | | | | | | | Fix one enum value in the public API to better reflect the error that is happening. Change-Id: I4a71d64c79d443eb6fa9068defb90f3b436ec194 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Rename backend classes as a next step in consistent class namingDoris Verria2021-03-051-2/+2
| | | | | | | | Remove the Control* naming convention of the backend classes and rename to QPlatformFoo. Make headers private. Change-Id: Ic7310c7a22cfcf247d823eb984c09e8a9378c9a9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Next steps in consistent class namingLars Knoll2021-03-021-2/+2
| | | | | | | | | | All platform interfaces should be named QPlatformMediaFoo. This is consistent with QPA in qtbase, where the backend for QFoo is called QPlatformFoo. Change-Id: I40e7b035638eb27e670210e149f6f8b717e21a63 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* And finally kill QMediaServiceLars Knoll2021-02-171-1/+0
| | | | | | | | | This removes the past piece of the old service architecture from Qt Multimedia. Change-Id: I607f82a546b2a2e29024b987fed3ba6e3645ae48 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Kill QMediaSource and QMediaSinkLars Knoll2021-02-171-9/+7
| | | | | | | | Those aren't used anymore, get rid of them. Change-Id: I5a17f18a3c87c2c13a9009b1f99ef9e708f7636a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QMediaSource dependency from QAudioDecoderLars Knoll2021-02-171-3/+6
| | | | | | | | Nothing needs this here. Change-Id: I66d5a7f22495dd24d2fdebd780f1c0ad574b55de Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* 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-291-37/+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>
* 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>
* 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>
* 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>
* Make bind/unbind() not virtualLars Knoll2021-01-221-18/+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-221-5/+5
| | | | | | | | 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-211-2/+2
| | | | | | | | 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-211-11/+4
| | | | | | | | | 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>
* 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>
* multimedia: modernize by using nullptrJochen Seemann2019-01-041-9/+9
| | | | | | Change-Id: Id1084fec084b972aaa1d2389ee56ee831a821172 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Updated license headersAntti Kokko2016-01-191-14/+20
| | | | | | | | | | | 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>
* Update copyright headersAntti Kokko2015-02-121-7/+7
| | | | | | | | | 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>
* Update license headers and add new license filesAntti Kokko2014-08-241-19/+11
| | | | | | | | | - 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>
* Use Q_CONSTRUCTOR_FUNCTION macro to register multimedia meta types.Yoann Lopes2014-05-301-10/+5
| | | | | | Task-number: QTBUG-39131 Change-Id: I2493c9e3e6f0065d0441a74ff240d7d91fbe059c Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: Ia8c1c38aba1544603fada8c414cc856f365fd15b Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Rename namespace QtMultimedia -> QMultimediaSze Howe Koh2012-11-061-1/+1
| | | | | | | | | | | | | | | | Main code, examples, tests and docs updated. Method: 1. Mass find+replace "QtMultimedia::" -> "QMultimedia::" 2. Hand-modified declaration in qtmedianamespace.h/cpp For consistency (with minimal disruption), namespaces with a "Qt" prefix will be renamed. Part of the Header Consistency Project (http://lists.qt-project.org/pipermail/development/2012-October/007570.html) Change-Id: I1fbc43a1aa91d996aa61869fcd8d05186bf7cf6d Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-241-24/+24
| | | | | | | | | 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>
* Fix a number of other qdoc issues.Michael Goddard2012-06-151-2/+5
| | | | | | | | | | | | | | * Several places needed the forward class declaration hack * Missing/wrong minor version numbers on imports * A few typos * Any number of attempts to work around qdoc * A few missing docs * Tweaked soundeffect docs Change-Id: I3c2ab998a11cbb0956712e0423e01fdb70f5bfff Reviewed-by: Peter Yard <peter.yard@nokia.com> Reviewed-by: Angus Cummings <angus.cummings@nokia.com> Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com>
* Clarify documentation about QAudioDecoder::read and blocking.Michael Goddard2012-06-131-5/+10
| | | | | | | | | It doesn't block - not safe to implement in all cases. Applications can implement blocking semantics based on their usage of event loops or threads. Change-Id: If9a6b1ae7014df63a43989c4940524bc5eaae383 Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* Very minor C++ doc changesAngus Cummings2012-05-161-1/+1
| | | | | | | | | Reordering some enum's so values are listed ascending Replace 'The' with 'the' in some briefs Change-Id: Ibc5042389687598ddaaf11e72acaa688b85fd4cf Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com> Reviewed-by: Ling Hu <ling.hu@nokia.com>
* expanding unit test for QAudioDecoderAngus Cummings2012-04-141-3/+5
| | | | | | | | | | | | Looking for feedback concerning: implementation of the change desired functionality of QAudioDecoder Changed the behaviour of QAudioDecoder for more sane error output Change-Id: I82193a94b6fe1ef4202a4ac7bd95c607e0bee9c6 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Move QAudioDecoder to public.Michael Goddard2012-04-111-0/+547
To get better feedback between alpha & beta. Change-Id: I3620825fb9c2bb9de69951cf1d583b191d62cb0d Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>