summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update dependencies on '6.5.0' in qt/qtmultimediav6.5.06.5.0Qt Submodule Update Bot2023-03-281-2/+2
| | | | | Change-Id: I0e716e3fd674bd104c81d427b57429821cbf7a34 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5.0' in qt/qtmultimediaQt Submodule Update Bot2023-03-261-4/+4
| | | | | Change-Id: Ida52e6b731c2baceeb95365e263e2a1be5cec3a3 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5.0' in qt/qtmultimediaQt Submodule Update Bot2023-03-251-4/+4
| | | | | Change-Id: If3c133edbe073b4fb3b707ac0a003d1759aab42a Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5.0' in qt/qtmultimediaQt Submodule Update Bot2023-03-221-4/+4
| | | | | Change-Id: I1f65af381a6e2b4680347058502fcb767f157034 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5.0' in qt/qtmultimediav6.5.0-rc1Qt Submodule Update Bot2023-03-141-4/+4
| | | | | Change-Id: Idd94ded711495f081b2eb5a9bb9bcbf431a5a17a Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5.0' in qt/qtmultimediaQt Submodule Update Bot2023-03-131-4/+4
| | | | | Change-Id: Ib22b031d457d190a18dd7f2b1f765ee9c1d1b647 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5.0' in qt/qtmultimediaQt Submodule Update Bot2023-03-111-4/+4
| | | | | Change-Id: I37cc3382fbb0cd51e78de40b70fb9f0547c01273 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fix setting pixel format to AVFVideoSinkDoris Verria2023-03-1011-45/+175
| | | | | | | | | | | | | | | | | | | | | | - When lazy loading the video, the output settings dictionary was invalid. Properly initialize and release m_outputSettings to fix. - Unify and refactor code to set the output settings and pixel format - Set the pixel format only once rhi is set on the sink so we know the rhi backend. This is because the openGL backend accepts only RGBA pixel format. - Fix the incorrect assigning of a QVideoFrameFormat::PixelFormat to avPixelFormat when the rhi was openGL. Fixes: QTBUG-110868 Fixes: QTBUG-110812 Change-Id: I98de219bcc94dad04c4db9ea22aeb852dc2a193b Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 2e43d29e1d5d50b44b8f6d4f000968e3933c279a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Disable flaky tst_qcamera testArtem Dyomin2023-03-091-0/+4
| | | | | | | | | | | | The previous attempt to fix it failed, the best option now is to turn it of and fix under a separate ticket. Ticket-number: QTBUG-111812 Change-Id: Ia1d86ae758f22143ed589f54312836c66bbf3070 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 0f4e33e347142fe4ae9b497f2aa6428e5217b20d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Implement looping for ffmpeg mediaplayer backendArtem Dyomin2023-03-098-74/+224
| | | | | | | | | | | - Looping of ffmpeg mediaplayer has been added with auto tests - Minor code cleanup (that left from previous implmntations) Task-number: QTBUG-111209 Change-Id: I3839ee866bc2dc571919e41a18b093fb15165293 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 46394944487b189962c1ceef8a236b328e8e7736)
* Update dependencies on '6.5.0' in qt/qtmultimediaQt Submodule Update Bot2023-03-081-4/+4
| | | | | Change-Id: I107cde6963de23cdcc062e7de1c39aa179832e98 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.5.0' in qt/qtmultimediaQt Submodule Update Bot2023-03-061-4/+4
| | | | | Change-Id: I6aa514fc7ec872c2eceb24a0071f742dafd319ae Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update the documentation regarding the default media backendArtem Dyomin2023-03-051-5/+7
| | | | | | | | | | | | | | | | | | We have restrict the list of platforms with default ffmpeg: - on iOS the ffmpeg backend hasn't been tested for a long time and we don't have any CI build QtMM + ffmpeg. - for Linux Yocto builds the gstreamer backend has been set default due to hw acceleration issues. Currently, the documentation says about some hw acceleration issues with ffmpeg on linux, I'm going to add a separate description of this later. Change-Id: I8eb1f04f06fb5edc22dbd455d3ea1a83cefa2ede Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 65465baf906cbb7ad4492e363e643ad7724ff178) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix audiosink issues on darwinArtem Dyomin2023-03-054-45/+171
| | | | | | | | | | | | | | | | | | Fixed problems: - Fix sound stucks on multiple resets/starts of QAudioSink. It was possible to reproduce on playback position change in mediaplayer. - Improve audiosink stop (reduce waiting time). The optimization is based on the fact that it's possible to call AudioOutputUnitStop from the thread where it was started. - add some auto test + imrove errors logging in tests. Tests work fine locally but still need some tune on CI Task-number: QTBUG-111567 Change-Id: I0eb5c32af4c12dfc0694ee8f5967b4960a0b4ab2 Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit 919b3d308b711c0b267808c783327f2c95233428) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: Prevent possible crashSamuel Mira2023-03-011-2/+4
| | | | | | | | | | | Should not happen but it is possible to get an AVFrame without data to release on Android. If already released the frame->data[3] will be NULL. Change-Id: I7d8af55f9c3ed9a03cd1dd4b3a38c332b8f06dc0 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit f0baa64df4453c61b24f3974dfddff31940dbbe0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix access to multi front/back cameras on Android devices for ffmpegSamuel Mira2023-03-011-2/+2
| | | | | | | | | | | | Fix 633597b00423adf8359763bc14d185e3ca91efbe applied to ffmpeg backend on android. Task-number: QTBUG-59726 Change-Id: Id6db8154861d5ad7fcc1501db2a33cdd59d13a1c Reviewed-by: Lars Knoll <lars@knoll.priv.no> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 863106a56f303dfd23e35dd8c4db4a61ea4ab106) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: Fix stretched camera view in portrait modeBartlomiej Moskal2023-03-012-7/+14
| | | | | | | | | | | | | | | | | | | | | The camera view in portrait mode was displayed as landscape. After 579a0423b8b3c62c582a706d338a9eb1bcd788a3 commit, the resolution is not transposed if it is not in supported preview sizes. That is the expected way for camera preview size, but video output resolution need to be transposed anyway. This commit rotates the resolution of the video output in portrait mode, even if the camera resolution is not rotated due to unsupported size. Fixes: QTBUG-110975 Fixes: QTBUG-111266 Fixes: QTBUG-111421 Fixes: QTBUG-107173 Change-Id: I773fb8d0df1b616c6af8db9a8d7ad785da8295ee Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit 8d5683e85c0d85e31b6ea6d4caf1769737e558b8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtmultimediaQt Submodule Update Bot2023-03-011-4/+4
| | | | | Change-Id: I85a36d24293fca238f538a0fe8e30c78596ccc5c Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* QWindowsAudioSink: don't access deleted this objectVolker Hilsheimer2023-02-271-0/+4
| | | | | | | | | | | | | | If a slot connected to stateChanged deletes the sink (ie. because the sink went idle and the source has no more data), then we must not access the errorState member anymore. Fixes a crash seen occasionally in the Qt TextToSpeech test. Change-Id: I5f348844d73100ad4ca5f6e15b3493707f33746e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit 7ae01fd8b637b59d0c1a0664e27ffd120c1f2deb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* wasm: add support for QAudioOutputLorn Potter2023-02-247-40/+462
| | | | | | | | | | This allows QMediaPlayer to play audio Fixes: QTBUG-98373 Change-Id: If6c831081f5e6c4216775d7d7672b8a8e2f85208 Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io> (cherry picked from commit 6607b3ee062e12dee458b211ddba474c999a0156) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtmultimediaQt Submodule Update Bot2023-02-231-4/+4
| | | | | Change-Id: I86be1d5ebed262ae366288f5f6f074a0d6473c67 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Add cmake var for explicit setting of default media backendArtem Dyomin2023-02-222-0/+11
| | | | | | | | | | | | | | | | Embedded team needs a possibility to customize the default media backend on compile-time; gstreamer backend is likely to be used for their aims. The most flexible solution is adding cmake env var as it's hard to match required embedded platforms to gstreamer in QtMM. QT_DEFAULT_MEDIA_BACKEND has been added. If it's not set, the logic is the same as before the change. Change-Id: Id81b0e2b82edd6195c310bc8f2ad40555c6b1a2d Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 8c2d8219ddda4dd28443af8e85a9a3eaf9f95972) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add missing QT_BEGIN_NAMESPACEAllan Sandfeld Jensen2023-02-201-0/+2
| | | | | | | | | | Fixes namespaced builds with enabling VA-API Fixes: QTBUG-111269 Change-Id: I032b7c25c8395b8ab54d42bb77a55af1766a2992 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit b0102de8eaefb6e02413b3317cdc68a949c3033d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix ffmpeg encoding issuesArtem Dyomin2023-02-1714-43/+180
| | | | | | | | | | | | | | Fixed a bunch of problems: - wrong frame intervals in macos camera and screen capturing - missing frame rate in screen capturing format - wrong scaling in encoder Also, some recording tests have been added Task-number: QTBUG-103226 Change-Id: Id775f31e01d75d5c9f3c4ec20c33074acab1ab20 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 68430756ac8f477bf91f9691d39f1605829f9500)
* Update dependencies on '6.5' in qt/qtmultimediav6.5.0-beta3Qt Submodule Update Bot2023-02-171-4/+4
| | | | | Change-Id: I3e8fcfcf5f0fe5b80ebe02bd617a7e3ed9ebb818 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Ensure thread-safe qInitConvertFuncsAsmArtem Dyomin2023-02-171-5/+5
| | | | | | | Change-Id: Ibce8162ff461a5798ecd5720e41f60077ad19ab4 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 6f6a501567f7c1557f53b5ca9e29d597e0764741) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Minor cleanup of duplicated codeArtem Dyomin2023-02-173-37/+21
| | | | | | | | | | Remove duplicated deleters; use a template instead Change-Id: I79d4ae2866199583fec0d3dd357274a81f40b7fa Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 5c7fe35edbca4f6eee5b4126727d3a9f95c7697f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* AudioSource example: Add .plist file with microphone permissionsDoris Verria2023-02-162-0/+45
| | | | | | | | Fixes: QTBUG-104849 Change-Id: I82afd862722dc212800d8f69f1a4110c11810a38 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 5677aa3337a8925304c52e0c750c8c91f16f8f8c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* AVFMediaEncoder: Set channel layout configuration when recordingDoris Verria2023-02-152-14/+33
| | | | | | | | | | | | | | | | | | | When recording audio, we are setting the audio channel count to the one specified in the encoder settings. If this is not set, we were setting it to 2 channels by default. However, this was causing sometimes problems as the internal AudioConverter could not always convert from the audio capture device's actual format to one with 2 channels. To avoid this, we should default to setting the channel layout configuration settings based on the channel layout of the audio device. This is safer and avoids unnecessary format conversions. Fixes: QTBUG-110844 Change-Id: I3d78ec8b37d6780c7d96147f81ce15bd6425b448 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit a40b9fed50ef75504cec128d4acfb1062e90df98) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add some exclusions for CMake Unity (Jumbo) buildsFriedemann Kleint2023-02-152-0/+6
| | | | | | | | | Task-number: QTBUG-109394 Change-Id: I60a6ae76db8e9d2a217075af26cc4de7de908f57 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 75352dddfef34ead3cd4d19ed9f958a22ef75ca1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* android-backend: Route audio from input to output deviceBartlomiej Moskal2023-02-155-1/+116
| | | | | | | | | | | | | | | CaptureSession has a functionality of route audio to an output device by assigning an AudioOutput object to the audioOutput property. It was missing in android-backend. This commit add implementation for streaming audio from chosen input device to chosen output device. Fixes: QTBUG-109659 Change-Id: I07dfe2188dd9e98a740ccaa6188daaf8e34ca0df Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit b5e0c68b965bd9e6ea99e1c20994d33194324220) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Windows: Move some audio helpers to QWindowsAudioUtilsFriedemann Kleint2023-02-154-44/+33
| | | | | | | | | | | They cause clashes in CMake Unity (Jumbo) builds. Task-number: QTBUG-109394 Change-Id: Ib9450337e301e5fca09bfce1c9e06530dc8e8660 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit a79a69a30398f262f2e0ea753927dcac471d5b2a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Disambiguate static constants, variables and functionsFriedemann Kleint2023-02-158-69/+69
| | | | | | | | | | | They cause clashes in CMake Unity (Jumbo) builds. Task-number: QTBUG-109394 Change-Id: I856ed6b5f511299845a49f989ccd74a3e5480e44 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit 75bc388bb936890e182e3bf13dd23d557467780f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QScreenCapture: Remove the window APIVolker Hilsheimer2023-02-144-123/+14
| | | | | | | | | | | | | | The implementation isn't ready on all platforms and too unstable, so remove it from Qt 6.5. This removes the public API and documents the respective error enum as internal. The adjustments to the implementations is as mininmal as possible to avoid conflicts with cherry-picking changes from dev into the 6.5 branch. Change-Id: I1a695a3d00c32d19a7805cb97fda6a5d525e43c8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Implement custom X11 screen capturingArtem Dyomin2023-02-126-3/+461
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation works on linux with run X11. It's disabled with wayland. Achivements - Fixed problem with performance. The standard implementation affected CPU too much. On my local release build the speedup in capturing of a single frame is 4-5 times. The explanation of such a huge difference is that opening of capturing contexts on X11 is an expensive action, whereas implemented single context allocation and transferring images through shared memory (Xshm) is pretty fast. Also, QScreen::grabWindow permorms additional pixels processings under the hood what is not needed for videoframes. - Improved errors handling - The patch allows to run screen capture backend UTs on linux CI with X11, namely, ubuntu, opensuse. Test results: https://testresults.qt.io/coin/integration/qt/qtmultimedia/tasks/web_qt_qtmultimedia_1675977558004 - Probably, fixed problem with windows overlaping, the matching tests became pass, it should be checked on different platforms. Also, the approach cannot capture windows out of the screen borders, we throw an error signal. Both windows issues are to be investigated deeper in 6.6. With the next commits I might move some common threading code for SC to a separate class. Task-number: QTBUG-103226 Change-Id: Ibd3600fdbc9714f14dc80c2a330aea5e0d064791 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit fc079734d34747d64fa26645bda36699b26c047e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtmultimediaQt Submodule Update Bot2023-02-101-4/+4
| | | | | Change-Id: I617acf6fa57543b6ab70fdf670f00fd3e18560dd Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* QScreenCapture: minor documentation fixesVolker Hilsheimer2023-02-081-6/+6
| | | | | | | Change-Id: I58b136078faa9f8d7846f647c5887392187bfc3c Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit f10828d0fe99a2dddd158c25a0a140d8af4e82eb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* wasm: add camera inputLorn Potter2023-02-0817-109/+1795
| | | | | | | | | | Also add image capture and video recorder Fixes: QTBUG-108459 Change-Id: I8c036142802c03cc19d968f8fc18e8a44a3640cf Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io> (cherry picked from commit e98bce0c5ff5afa609fdd8cde65a0405a77a4fa8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Rewrite screen capturing on macosArtem Dyomin2023-02-079-136/+650
| | | | | | | | | | | | | | | | | | | | | | | | | The previous generic implementation uses QScreen::grabWindow that is not stable for both cases, screens and windows capturing. In order to fix it, I've reimplemented it via native macos functionality. Some part of the functionality is shared with avfcamera. As a result, we got the following: - fix not capturing of some windows on the screen - enable hw acceleration for screens capturing (shared with camera functionality) - enable foreign app windows capturing (by CGWindowID as WId). We might need some additional api for getting the list of ids. Probably, the code is reusable for ios, to be investigated. Screen capturing tests work locally if permissions are granted; on CI some problems with giving the permissions. Task-number: QTBUG-103226 Change-Id: Iada34467e4b9074eb43a1fbbdc4409e663ea668a Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit a128d5ecf40d8d670d4d3aa8b9ddc860baa3cb5e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Proposition to be able to turn on ffmpeg debug logsArtem Dyomin2023-02-071-0/+3
| | | | | | | | | | | | It might be useful for developers and for asking users to provide more logs. If it's OK, we might document it. Change-Id: Ibe0937d1837d3cfd81f2ddb9998cf58168570844 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 75d9b447e4887448265313a3a1f94ce87e9cc026) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: Properly clean AndroidSurfaceTexture before deletingBartlomiej Moskal2023-02-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | After commit: d4e02d9efd6e8e41aa1a83c0f3d6534d138e7ae3, deadlock from QAndroidTextureVideoOutput was removed. Necessary cleanup for m_rhi member (which was created in thread of AndroidTextureThread) was also added. After that, during the clean up, we can still get a crash with log error: F libapptestVideo_arm64-v8a.so: Cannot make QOpenGLContext current in a different thread F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 28160 (qtMainLoopThrea), pid 28130 To avoid that, we need to be sure, that m_rhi was cleared before m_surfaceThread was stopped. That is why clearSurfaceTexture is called as BlockingQueuedConnection. Fixes: QTBUG-110797 Change-Id: I35aa72c8416a99c5372f93d455bc23963fa182e4 Reviewed-by: Samuel Mira <samuel.mira@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit d3f0b75e3c1e98988eec439bf51945e4047ff2af) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix behavior of QAudioSink::resume in push modeVolker Hilsheimer2023-02-0718-107/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up to now, a QAudioSink in push mode (ie. started without a QIODevice, but returning a QIODevice buffer that the client has to push data into) transitioned to IdleState when resuming after a suspend, even if there was still data in the buffer or device to play. This resulted in the sink playing audio even though it was in IdleState, and the client not getting notified when the audio data was actually drained (as the stateChanged signal did not get emitted again). Fix this by storing the state in which the sink gets suspended, and restore to that state when resuming. If the sink then runs into an underrun because not enough data is available in the push-buffer, then it will transition to IdleState with UnderrunError later. Implement this consistently in all platform implementations, adjust the test, which previously verified that a push-sink transitions to IdleState when resuming, and change the documentation accordingly. [ChangeLog][QtMutimedia][QAudioSink] Calling QAudioSink::resume() now returns the sink to the state it had when QAudioSink::suspend() was called, no matter whether the sink operates in pull or push mode. Change-Id: If0c7fe8629627de814276d629d825e469c998d2d Reviewed-by: Lars Knoll <lars@knoll.priv.no> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 0220951e712322e4e80253431a322317063e104a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Clean up and fix QAudioSink::pullResumeFromUnderrun testVolker Hilsheimer2023-02-051-35/+40
| | | | | | | | | | | | | | | | | | | | When the source is drained completely, then the sink should become idle with UnderrunError. Replace QVERIFY(actual == expected) with QCOMPARE, and move the source-class into the test function (without unneeded Q_OBJECT). Replace hardcoded constants with named variables and calculated values. This test function now passes with the Darwin audio sink. It still fails on Android as the sink doesn't correctly emit stateChanged. The test crashed on Windows before (and still crashes), and still fails with the PulseAudio backend (too many signal emissions at the beginning). Change-Id: I876e3b6b70caa90b8261bd1360b3790f2a7166c8 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit d954f82abcf8adddbf01de419bec8a5936767de5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix encoder UB if no audio inputsArtem Dyomin2023-02-031-2/+6
| | | | | | | | | | | | The case is reproduced if QAudioInput is set to QMediaCaptureSession but the platform doesn't have audio inputs. The case is to be unit tested after implementation of comprehensive mock of MediaDevices Change-Id: I372c8c1260cb3fa0d70ea48a31c315bd9580cb06 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit c56de3e60cd3c86524b1767277a69d6e02e1350d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Handle resolution change in QGstreamerImageCaptureAri Parkkila2023-02-022-3/+27
| | | | | | | | | | | | Add filter element in gstreamer queue and update size of captured image when image settings are changed. Task-number: QTBUG-98506 Change-Id: I87d8ed20cf5326f9f5db76626e476499a2e1d491 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit f27ba7f8759db070525ef4cbaae757a34d80a306) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtmultimediaQt Submodule Update Bot2023-02-021-4/+4
| | | | | Change-Id: If00ffbfeeddaa0a3266776635d8931b7807399e7 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Remove unneeded predeclarationKai Köhne2023-02-011-1/+0
| | | | | | | | | | The use of QVideoFrameTextures got removed in 8117f791a9. Change-Id: Ia801d6d8bd7e59473f9d79e45bba96194f95ebec Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 3534d4a7e49cbc1dc35629a92c9c91ef15847ab9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Add \since to new ScreenCapture APIKai Köhne2023-02-012-0/+3
| | | | | | | | Change-Id: I7bee3d7939023a9d852e355154ec7bf9f043e006 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 5bc3f2c25cc4fe6d75daa8363d15e2fbeff90e07) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Document new playing propertyKai Köhne2023-02-011-14/+27
| | | | | | | | | | | This also invalidates the need to document the accessor or signal separately. Change-Id: Ib2798a3a93fcdeb95994e75ba00dcc34b8bcab77 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit eec9e86965b6d4e7501e030876064cbdc10757b8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.5' in qt/qtmultimediaQt Submodule Update Bot2023-02-011-4/+4
| | | | | Change-Id: Idbc11a9e84ad1ed5ce7961be694f3f3f4ffd99e8 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>