summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update dependencies on '6.6.2' in qt/qtmultimediav6.6.26.6.2Qt Submodule Update Bot2024-02-101-4/+4
| | | | | Change-Id: I81a9d5fe85f9eb20684b0915a3433acdc67a96e7 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.6.2' in qt/qtmultimediaQt Submodule Update Bot2024-01-311-4/+4
| | | | | Change-Id: I418781ddafec7250b3adc5be96c4603ea693536f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.6.2' in qt/qtmultimediaQt Submodule Update Bot2024-01-301-4/+4
| | | | | Change-Id: I41b88eac505bc32b146b45c96c373676d4cee1c8 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.6.2' in qt/qtmultimediaQt Submodule Update Bot2024-01-271-4/+4
| | | | | Change-Id: I7179fdc34d78784e3cbdabc53dedec41ec6f0acd Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.6.2' in qt/qtmultimediaQt Submodule Update Bot2024-01-251-4/+4
| | | | | Change-Id: Ie9f98c04d57ebe643e3668315278dd29de02e5fb Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.6.2' in qt/qtmultimediaQt Submodule Update Bot2024-01-241-4/+4
| | | | | Change-Id: I3e31355f611585c4dc7de6ec7d26909b960f044b Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fix build with ffmpeg swrresample version < 4.9.100Artem Dyomin2024-01-242-2/+11
| | | | | | | | | | swr_alloc_set_opts2 takes 'const AVChannelLayout*' from LIBSWRESAMPLE_VERSION 4.9.100 Fixes: QTBUG-121455 Change-Id: I06812f9efedd53e12152fb3cf1574ad8c7c61d27 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit b0cffad4411a0c8d6469a892bcf98cf4384ae6f5)
* Tests: get correct file path for Android in tst_qaudiodecoderbackendBartlomiej Moskal2024-01-222-4/+22
| | | | | | | | | | | | | | | | | | | | | | | After refactoring done in 8268f5007ed4cdf13ec9dc3250f1acffc56c65ac commit, path for m_wavFile is not correctly calculated for Android. QFINDTESTDATA returns this in qrc (":/testdata/test.wav") that is not the one we are looking for. Same issue was already some time ago and fixed in 238678e4dd0a45ea13cddbc11dde640a898a1042 commit. For Android we used temporary file to get correct path. This patch contains same way of handling the problem for m_wavFile file in mediafileselector Pick-to: 6.5 Task-number: QTBUG-118572 Change-Id: I05faac8da0a24d77ac026f82f0b4d204a32c8660 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 29859cdbec9d025fe0b88683840c4032e87b59e8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b731772d7f7ab46f30da491c500c08ced1ce2d93)
* Fix abrupt termination during static destruction in QtMultimediaJøger Hansegård2024-01-222-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Breaking change: After this change, QtMultimedia requires a QCoreApplication to access or enumerate media devices (microphone, speakers, and camera). During destruction, a Windows application using QtMultimedia could exit with success return code without having called all static destructors. The root cause of the issue was that the internal QWindowsMediaDevices singleton was making outgoing COM-calls during static destruction. This is not handled well by the COM runtime, and resulted in NtTerminateProcess being called from within the implementation of Microsoft IMMDeviceEnumerator::UnregisterEndpointNotificationCallback. After this point, destructors were never called even if the application returned 0, indicating success. This patch fixes this issue by ensuring that the QWindowMediaDevices instance are deleted when the QCoreApplication is terminated, instead of waiting until static destruction. If no QCoreApplication exists, a warning is emitted, and destruction is executed as before, with possible interruption of static destructors. Fixes: QTBUG-120198 Pick-to: 6.5 Change-Id: I52a2b355052d61333fbff382dc4d4cd059d99d52 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 44f1e17d2843851d00c546f944582ab3fb409a45) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 073e0114241a8f6cf747290ec641c9332251f3ba)
* EVRCustomPresenter: skip samples that came too lateVladimir Belyavsky2024-01-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | In some cases, the mixer may produce output samples that are already stale, i.e. their presentation + duration extends beyond the current clock time. This occurs when the video file's native sample rate exceeds the actual video frame rendering rate. This is especially true when HW acceleration is not used, so we spent more time presenting each video frame. The current implementation simply schedules _all_ video samples for presentation, which can lead to problems when the video plays at a slower speed and reaches the end later than expected. So, to solve this, just check if the sample time is already passed, and if yes - discard, i.e. return it to the pool immediately. Fixes: QTBUG-118587 Pick-to: 6.5 Change-Id: I449e4ea7ef7b74a843e12ce7f488bc10c5087f76 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> (cherry picked from commit ecf836403022d766b4c38b9f413d551939cfb059) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 4f9b1a1173e936827a4bd2190f42f866ef4fdc6f)
* Fix regression causing asserts with FFmpeg media playerJøger Hansegård2024-01-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | While fixing bumpy video playback on Windows with FFmpeg, we introduced two regressions that cause application to assert in debug (3363496a7f0a0690bc3a2e50172cf6563f198701). These bugs were not discovered because I was testing with a WARP device, not a proper GPU. The first issue is that the shared texture between FFmpeg and RHI was created with 0 mip levels. This causes validation error in the D3D debug layer, and causes assert when playing the first frame. The fix is to set 1 as MipLevels. The second issue is that when opening a second file in media player, we did not close the shared handle before recreating it. This causes an assert. The fix is to close the handle first. Task-number: QTBUG-111815 Task-number: QTBUG-115308 Task-number: QTBUG-111459 Task-number: QTBUG-109213 Pick-to: 6.5 Change-Id: Ifd621b174fc68ef50e40cb3ad2d1c4bd410cf15e Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 10ba74ebc89c8134f6bbb126aae7667a92b45742) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit a25b5eafc1dbf047c9c9c6556cd45f8c21beea9d)
* Update dependencies on '6.6' in qt/qtmultimediaQt Submodule Update Bot2024-01-221-4/+4
| | | | | Change-Id: I83b650085710f13662a68ee8790ccbe4bc3e011a Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Implement lazy initialization of CapturableWindowsArtem Dyomin2024-01-225-18/+36
| | | | | | | | | | | | | The patch initializes CapturableWindows lazily as its instance is needed only in specific cases. Change-Id: Ib80dc92b44127a908f47ec893235bece6ec2ef40 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> (cherry picked from commit 4a341efa63036ded55a753c6d723a66afcdaf1c8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 3b03b0ec58efcf86063e9fb400b07aebe26f423a)
* Implement lazy initialization of VideoDevicesArtem Dyomin2024-01-2216-36/+83
| | | | | | | | | | | | | | | | As we extend the usage of QPlatformMediaIntegration, adding it in QSoundEffect, we should make the initialization of not necessary things lazy. VideoDevices might run their own cameras tracking pipeline, so we fix video devices firstly. Pick-to: 6.5 Change-Id: I8e447452b4b02247c0708569539d7f9c35b47799 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 2d19467fba0f2ad72d033cfd9b7230cc78d65b7a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b4a22952e1ffc0da9335586e162d654f1567279e)
* Fix style issues in qffmpeghwaccel_d3d11Jøger Hansegård2024-01-212-25/+17
| | | | | | | | | | | | | | | This patch auto-formats the files and fixes minor style issues in the code, including use of c++ casts instead of C-style casts and prefer anon namespace over static variables. Also, include order is improved, and a member function is made const. Pick-to: 6.5 Change-Id: Id9bc1bcab773fdf550341623b37a11e13c339290 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io> (cherry picked from commit b2b1d2b1784cb0af37e0d9b9b128f6d44bdbf30e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 82dd0ed9e3ee721ac5c20b98fc1db1607c6fc13f)
* Fix bumpy video playback on Windows with FFmpeg using synced texturesJøger Hansegård2024-01-202-69/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | We have been facing issues with bumpy video playback when attempting to keep the decoded textures on the GPU to avoid copying decoded textures to the CPU. This is seen as stuttering in the video playback, and it looks like we are switching between new and old frames during playback. A root cause for this can be that we used texture sharing without properly synchronizing access to it. This patch fixes this issue by using synchronized surface sharing as recommended by Microsoft documentation. This patch also reduces the number of per-frame texture allocations. This way we get flicker free rendering during video playback. Task-number: QTBUG-111815 Task-number: QTBUG-115308 Task-number: QTBUG-111459 Task-number: QTBUG-109213 Pick-to: 6.5 Change-Id: I6ed34051f138fc845d60b4208fdbef2ae7d68189 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 3363496a7f0a0690bc3a2e50172cf6563f198701) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit a3bf450b212625d1626bbd549b3681fc8ef60a37)
* Move creation of ffmpeg audio resampler to utilsArtem Dyomin2024-01-193-41/+91
| | | | | | | | | | | | | The refactoring is needed for the implementation of QPlatformAudioResampler in the next commits. Pick-to: 6.5 Task-number: QTBUG-118099 Change-Id: I6372dcba41011717c78bd586adf6c38dba8466d9 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit c2f4dae915b8d341a316739a12c0be81abfb836d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d4a863bc813e80b753c7e566646863ad489dc20d)
* Minor cleanup in QSoundEffectArtem Dyomin2024-01-191-41/+57
| | | | | | | | | | | | | * rename m_audioOutput -> m_audioSink in order not to mix it up with QAudioOutput * use unique_ptr Pick-to: 6.5 Change-Id: I2d23e6fb36ba6691c4d5c6fd030f2eb3ec193717 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 61f2d81206ca08361fab2c0c3fc3441e764cc84a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 1dd2c014ad433b3d9b221e27150972fc1f0af1c3)
* Update dependencies on '6.6' in qt/qtmultimediaQt Submodule Update Bot2024-01-181-4/+4
| | | | | Change-Id: Ie5182e8260007849169a88c616ad9374bb52db31 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Android: Fix thread race in audio sink for bufferAvailableBartlomiej Moskal2024-01-182-4/+8
| | | | | | | | | | | | | | | | | | | | | | | tst_qaudiosink was flaky on Android. There reason was possible thread race when calling bufferAvailable method in QAndroidAudioSink implementation. While one call of bufferAvailable was invoke from QT source on QAndroidAudioSink thread, other call could come from OpenSL ES engine on different thread. That coused the thread race. To fix the problem, bufferAvailable will be called always from QAndroidAudioSink thread. Additionally turned of testdata with Sample Rate 44,1 MHz for tst_QAudioSink for 23 API (because of crash on emulator x86 API 23) Pick-to: 6.5 Fixes: QTBUG-118572 Change-Id: I8b23c871031d4b243e4c39771db83bd5a02260e3 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit c60c9c9abfb42d99b257a73198f6bb66ace76a2a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 675efa36c87b5a88b27a7ba014bc5c4b7b6dac26)
* QVideoWindow: Recreate swapchain if it was previously destroyedDoris Verria2024-01-171-1/+1
| | | | | | | | | | | | | | | We release and destroy the swapChain on a PlatformSurface event. If the window is render()-ed again after this, we need to recreate the swapChain using QRhiSwapChain::createOrResize(). Fixes: QTBUG-113498 Pick-to: 6.5 Change-Id: Ibc8b369c41b9e2e49be4465d6e50e3a5a366e434 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 0fecc9e95244745c88b82964ecda65bbaa53a575) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2acdb75acbb1fb521859b4e859404bc9f716bc9e)
* QVideoWindow: Immediately render window on an Expose eventDoris Verria2024-01-171-1/+1
| | | | | | | | | | | | | | | | | | | QWindow::requestUpdate() is used to signal that the window needs to be redrawn (typically because something changed), but the actual drawing will not happen until the next event loop iteration. On an Expose event, we need to immediately draw the window to avoid any delay. Replace the call to requestUpdate() on an Expose event with a direct call to render(), ensuring a prompt window rendering. Pick-to: 6.5 Change-Id: Ib74c1ca9706fdc6d92ae8ce659a4fc345edc77d5 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 7318eefeab392d102b9092d649e3f1f3ad12456b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 4ee2444b77fc8a000b21b106bc8f1b0ba706b14d)
* Doc: Update parameter names in QML ImageCapture's signalsBartlomiej Moskal2024-01-171-12/+11
| | | | | | | | | | | | | The ImageCapture QML type contains invalid signal parameter names in the documentation. They should be changed so that they do not mislead users. Pick-to: 6.5 Fixes: QTBUG-118593 Change-Id: Icb4e46e1081a0b1bfc3eab1362a006eabeab5f7e Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> (cherry picked from commit dd3701e6c8497947d73ac588c59726a049f50ca0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 53eafd93b0a028be45adb2c440a7b4da207ca7f2)
* Update dependencies on '6.6' in qt/qtmultimediaQt Submodule Update Bot2024-01-171-4/+4
| | | | | Change-Id: I082b37fbc6f542eaf38c1464681157056f91fb75 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Name flush operation pointerMikko Hallamaa2024-01-161-1/+1
| | | | | | | | | | | | | | | | PulseAudio flush operation pointer was unnamed which was flagged by CodeChecker. Now operation is named so it will be deleted at the end of scope instead of immediately, but that should be fine. Pick-to: 6.5 Change-Id: Iedae2b24253bb1fb515efae61dfb74be11a241ab Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> (cherry picked from commit bda4b38c4dc78c9f97ffa12997e74dfa3121672f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 74e51fff171de33f5b831413a506e216db08477c)
* Doc: Create separate 'Graphics', 'Multimedia' example categoriesJaishree Vyas2024-01-1615-15/+15
| | | | | | | | | Fixes: QTBUG-117884 Change-Id: Id718b09af348c042faa9fa72cf6295f731b7573d Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 120647bfba216201950bdcc4c39173c8e128b0eb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2ce6d1f0e5d02d17162d1fc519e00559fa632743)
* Fix conversion of premultiplied rgb formats to ffmpeg formatsArtem Dyomin2024-01-121-2/+4
| | | | | | | | | | | | | | | | | FFmpeg doesn't have premultiplied rgb formats, it has 0RGB formats, were alpha component is undefined. In premultiplied components r/g/b components are ready to use, alpha component is supposed to be multiplied with the background. In the light of the above, QtMM premultiplied formats match better 0RGB ffmpeg formats (at least, color components are proper) Pick-to: 6.5 Change-Id: I6b2810117c7b9d002d7032f905be57962b29e6c5 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 1708bfc413e968683ae2e1d532562ee4e6f29a1b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ce71734b05be582f91e90fa459e81f92f4539a39)
* Fix build warning on linux regarding qffmpegmediadataholder.cppLars Sutterud2024-01-101-1/+2
| | | | | | | | | | | | | | | Fixes a warning introduced by change number 529146 Error message: comparison of integer expressions of different signedness: ‘const int’ and ‘const long unsigned int’ [-Werror=sign-compare] Pick-to: 6.5 Change-Id: Id91effb01a3abff27d355f605e315ac47b759d47 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit e3817d444d13c0a4c147e50e5a66ff74cabb82d7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d24853e091f904739e89c7025dc3c8594142c07c)
* Fix CodeChecker warning in qvideotexturehelperJøger Hansegård2024-01-101-2/+2
| | | | | | | | | | | | | | | | | | | | CodeChecker reported warning in qvideotexturehelper.cpp line:638 after commit 70c4bf4c565c3ace547f5cbd0398953fcd1ff4f3 Passing result of std::move() as a const reference argument; no move will actually happen in file:src/multimedia/video/qvideotexturehelper.cpp line:638 col:32 subresDesc.setData(std::move(underlyingByteArray)); This patch fixes this issue by not calling std::move. Pick-to: 6.5 Change-Id: I04b1fcb4a3e0ce3436f184f4db6ed4b6b512f459 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 4f6251cc3f20bf95c6727ea0907a4f7f34dae914) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 3a855e93821a9ded3cf00db4e93f2b3443e31ae4)
* Fix finding ffmpeg if cached libs have been deletedArtem Dyomin2024-01-091-5/+15
| | | | | | | | | | | | | | | | | | | | The fix is useful after implementation of copying ffmpeg libs to lib folder. In this case the following development flow is possible: - build QtMM in with QT_DEPLOY_FFMPEG (ffmpeg is copied to libs) - clean only QtMM build + cmake cache, run cmake and build it again. (now ffmpeg libs may be found in qtbase/libs dir). - clean qtbase/libs dir without cleaning cmake cache and build agian. (cached ffmpeg libs paths have become invalid). The patch fixes the corner case above. Pick-to: 6.5 Change-Id: Ifee6b249f1d2fb459c5fe88f676f7c96e0c04588 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit d4d3af139e90d99280651ff5527fd9da1df5c69d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit f32ae321f6f6a6676acd5dce997c4f40cebabd76)
* Doc: Fix typosPaul Wicking2024-01-091-2/+4
| | | | | | | | | | | | | | | - Use correct signature in inline code example. - Rephrase the sentence while at it. - Wrap the text at 80 columns (documentation style). - Fix nearby spelling mistake: 'setup' is 'set up' when used as a verb. Fixes: QTBUG-120449 Change-Id: I7c89bd69d1b4dc7af2535dee9d90f6a2f95650b8 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 24ec99c5f13e90aecb950ae79a42889440e402dd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit f6724fd47e7adb48068af443c95d5185567228ab)
* Update dependencies on '6.6' in qt/qtmultimediaQt Submodule Update Bot2024-01-081-4/+4
| | | | | Change-Id: I9f62d1750726a1ddd1a72fe7e5d14cf0badc1d43 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Add a default PulseAudio buffer lengthMikko Hallamaa2024-01-081-3/+17
| | | | | | | | | | | | | | | | | | | | | The target buffer length set by PulseAudio by default is quite long, which causes playback issues in pull mode until the buffer length is adjusted by PulseAudio in subsequent plays to be shorter. This patch sets a default target length if buffer size is not set using setBufferSize(), instead of using the buffer size decided by PulseAudio. This also allows us to conform better to the documented QAudioSink::bufferSize() behavior where it's supposed to return a platform default value if called before start(). Task-number: QTBUG-111045 Pick-to: 6.5 Change-Id: I67ad7c83cb0f7c34da82a7da7d2f5757f54bdbe5 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> (cherry picked from commit 6ec73a0b6471f311be1092fcff8f97f3b1c9f6c2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit aed05293fb7ae7e099b03f6eac21865eebb314f3)
* Fully drain PulseAudio stream when stopping the sinkMikko Hallamaa2024-01-081-9/+30
| | | | | | | | | | | | | | | | | | | Currently when a PulseAudio stream is closed, pa_stream_drain is called and the stream is disconnected and deleted, which causes the draining operation to fail. This patch moves stream drain to be handled synchronously when calling stop(), after which close() is called which handles stream disconnect. The stream is flushed in close() so it can be called for sink destruction and reset where draining is not wanted. Task-number: QTBUG-111045 Pick-to: 6.5 Change-Id: I7a6daf38a410518e98974b807e8f9c8ed9802293 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 9262a8abde7aa2aa5629bc8c382eda2ab91d8e96) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 80abf2be0b3549c1e8ae92fce80205a36e66b845)
* Add unit tests for basic video buffersArtem Dyomin2024-01-063-0/+234
| | | | | | | | | | | | | | The patch adds unit tests for QImageVideoBuffer and QMemoryVideoBuffer. As those behave the same in most cases, the added test suite contains parametric test cases for both. Pick-to: 6.5 Change-Id: I51cbbf9bcc5f3ad06cfee7777c439791579bcf34 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 716c094fb40641b23bc0c006f639e68019551fd8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 6b6ea0d42704db8f5fd5910dbe0e5959ec0c09e4)
* Implement zero copy rendering of QMemoryVideoBufferArtem Dyomin2024-01-064-2/+29
| | | | | | | | | | | | | | | We use QRhiTextureUploadEntry to create textures from memory. QRhiTextureUploadEntry takes QByteArray, let's pass there the array from QMemoryVideoBuffer to get round extra copying. Some of the added functionality is unit-tested in the next CR. Pick-to: 6.5 Change-Id: Iaa16cbceb189b38713e427eb76f72396ad0d759d Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 70c4bf4c565c3ace547f5cbd0398953fcd1ff4f3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 16fd75b0cd39451d7317eb231a50d88e81e3120a)
* Remove not need component avdevice from ffmpeg componentsArtem Dyomin2024-01-061-1/+1
| | | | | | | | | | | | | | The component is not used by the ffmpeg plugin and other components don't depend on it. Pick-to: 6.5 Change-Id: Ia8f66b611c78e70034cb00ac3ca5cb55a1769de9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars@knoll.priv.no> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> (cherry picked from commit 2fe8338056c51647e1333fc0f351431ff2a3b876) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit bf6549f1521fc182ff8a2e3871fceb99d4c58fd8)
* Prettify QMemoryVideoBufferArtem Dyomin2024-01-062-12/+12
| | | | | | | | | | | | Minor cleanup in QMemoryVideoBuffer. Pick-to: 6.5 Change-Id: I52a63519bc226bd70322c8e0b2071962bd5e023b Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 4c37eb3e481eb8cc70ced61e8d1497317183aab0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit f61c751d4ed3a041fe4e43b1958d0402009abd78)
* Add implementation to EGLFS screen captureMikko Hallamaa2023-12-302-6/+53
| | | | | | | | | | | | | | | Implementation for EGLFS screen capture added in change codereview.qt-project.org/c/qt/qtmultimedia/+/527432. This allows for optimizations as well as handling platform-specific conditions. Task-number: QTBUG-117746 Pick-to: 6.5 Change-Id: Iadffba1c93bd3bc62c267a096d4ac23f1fedf4fd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 0fd782d27e7732040c755a1bf22cc56198d64cac) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit afb03fdf7b8c1f0bc63de9921bf99c6bbddf819e)
* Add an opportunity to select screen capture impl by env variableArtem Dyomin2023-12-281-1/+34
| | | | | | | | | | | | | | | | | | | We need this feature for testing screen capturing on the user's side. The same we have for window capturing. In most cases, we will ask users to fall back to 'grabwindow' backend. Specifically, EglfsScreenCapture implementation may have some corner cases that we cannot consider now, so this feature might help us and users. Pick-to: 6.5 Change-Id: I76717a750c54fb931cca15a2bbaec56f9ab9fc3c Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 4a269b22a36817b3b5cd4b192f03411d95882978) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 657af45e2e03d00716e73bf0b7db2c78fe391624)
* Move QImageVideoBuffer to a separate fileArtem Dyomin2023-12-284-36/+83
| | | | | | | | | | | | The class is to be resued in eglfs screen capture. Pick-to: 6.5 Change-Id: I3161757ce7590e4299f9f017d4be4d50a2560db0 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io> (cherry picked from commit 9b737c463cf391928e33addc7320ecd490a21675) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit e5039f5344fe3bb28c243d924bc4f39b12d9a7f4)
* Add empty eglfs screen captureArtem Dyomin2023-12-284-0/+120
| | | | | | | | | | | | | | | | | We need custom eglfs screen capture implementation as common QScreen::grabWindow implementation has valuable overhead. The patch adds matching classes and methods, implementation is supposed to go in next commits. Pick-to: 6.5 Change-Id: I40a605f3bd3651de51c75732041ffe28e385db91 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 8c814014c4131ca1193c443714e2d2756e4f7e58) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 7220147c1be55a40c5f8ff1b7bb1d0a0984ef829)
* Fix build with ffmpeg 6.1Artem Dyomin2023-12-283-6/+25
| | | | | | | | | | | | | | | | In ffmpeg 6.1 stream side data is deprecated, codec params side data is supposed to be used instead. The patch applies changes of ffmpeg 6.1 and ensures compatibility with prev versions on the build step. Pick-to: 6.5 Change-Id: I65a6e21ac6500269db7866b1e8937b6c4decc90a Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 7715bc59e11f23cfcd1e38ba8a83c560f8bf8eee) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 474962490ba59a9f27530423ae557edc474004d0)
* Update dependencies on '6.6' in qt/qtmultimediaQt Submodule Update Bot2023-12-251-4/+4
| | | | | Change-Id: I979ce2b57f42d5a835b51437ad20d558868ad688 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* QFFmpegMediaPlayer: Fix stop() not resetting position if EndOfMediaLars Sutterud2023-12-222-0/+23
| | | | | | | | | | | | | | | | | | | | | | If QFFmpegMediaPlayer::stop() was called after playing a media file all the way to the end, the playback position of the would not be reset. In that scenario, a subsequent call to play() would just reset the position to 0 instead of starting playback from the beginning as expected. Solution: - Call m_playbackEngine->seek(0) in stop() - Write new test that covers the above scenario Fixes: QTBUG-118127 Pick-to: 6.5 Change-Id: Ibcb313721099c3e53fd6b1b1d52aad712a0c8eb0 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> (cherry picked from commit ad783bb7099fbbc98cf1a27ea8a5910604fc7596) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit c36e6fec8e177761a62b850ba368a35ce68d95fd)
* Implement shipping of dynamic ffmpeg together with the ffmpeg pluginArtem Dyomin2023-12-223-78/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first patch that implements ffmpeg shipping for both cases, building and installation. * deploy ffmpeg to plugins/multimedia/ffmpeg, as it should go together with the ffmpeg plugin. * ffmpeg deployment should be explicitly enquired via the option: -DQT_DEPLOY_FFMPEG=TRUE. The idea is to turn it on only when we or users need it, as users might have other compilation environments (e.g. it's so with boot2qt). Setting the flag for static qt builds is to be implemented later on. * Tested on Windows, Linux, macOS, some platform-specific details - On Unix platforms, ffmpeg libs might be put to plugins/multimedia/ffmpeg, closer to the ffmpeg plugin. However, on the current step, it was decided to deploy to the library directory. - On Windows, ffmpeg shared libs are linked through auxiliary static ones, it's handled in cmake scripts in the patch. - On Linux and Android, we will compile openssl and maybe vaapi stub shared libs and deploy the together with ffmpeg. - For Unix platforms, we will need to implement fixing of rpaths e.g. set 'ORIGIN' and hardcoded dylib deps (macOS). It will be done on the level of ffmpeg building on CI (install-ffmpeg.sh). Pick-to: 6.5 Change-Id: Ib7ce480b5412302f5d7ae9b247d5a5e87406a806 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 545ffc25a7d8b544c6257892c24fe4f433c1e5cf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 6290ad911e4eafd255b86606d2edd6de2fa2846d)
* Reset RHI state on application suspendVolker Krause2023-12-221-0/+20
| | | | | | | | | | | | | | | This fixes a crash on Android when mapping a QVideoFrame from the camera after the application has been resumed from suspension. Pick-to: 6.5 Fixes: QTBUG-113616 Change-Id: If107c7e8b9595f638034ea0bb05995ce5f096c0d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Bartlomiej Moskal <bartlomiej.moskal@qt.io> (cherry picked from commit c1e2f1e0dcac6d553fbef5a8abe7a652b9b3b70e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 24a43429e215a7bfc9c6cecf8f236fdec945dccf)
* Fix PulseAudio sink intermittent hanging and glitching in pull modeMikko Hallamaa2023-12-211-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | | PulseAudio sink in pull mode asks the sound server for the amount of bytes it wants the client to write on the playback stream. Data was written from source in chunks of 20 milliseconds, without going over the requested amount. This however sometimes lead to a state where the server asks for less bytes than the sink considers as one chunk, which caused audio hang-ups. Now the PulseAudio sink will completely write the amount requested by the sound server. Additionally the audio source is reset when closing the sink to avoid glitches when playing audio from the same source later. The timing of chunk writes is adjusted according to the buffer target length in order to to lower the chance having to write a chunk in two parts. Fixes: QTBUG-116519 Pick-to: 6.5 Change-Id: I97816c0b7c3c98f3ff6a9d5b1329c616a0f00aa8 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> (cherry picked from commit 853d36bd80887bb3ba7503c162701b60841a06e2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 20ecf1a9b9170f7cc0157cd94f71131d15cea4f0)
* Move audiodecoder example to manual testsJøger Hansegård2023-12-217-4/+0
| | | | | | | | | | | | | | | The audiodecoder example is already covered well enough through existing snippets, for example in the QtMultimedia Audio Overview section and in the documentation for QAudioDevice. We therefore don't need a separate example for this. Task-number: QTBUG-119117 Pick-to: 6.5 Change-Id: I5bcaf3c02f86e29362e62e9d511dfdf6c83fb328 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit e4d16f342b2efe464238e74a5110b860edb0cb4d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 0da755b0b9b78b3733da90dbdd374350e11472dd)
* Tests: Update reason for skipping tst_qscreencapturebackend on AndroidBartlomiej Moskal2023-12-201-1/+1
| | | | | | | | | | | | | | | | | It seems that after some refactoring screen->grabWindow is not working any more. Default implementation of QPlatformScreen returns null QPixmap. That is the reason why this test set currently cannot be run on Android. There is already Bug for missing behavior on Android: QTBUG-118849 Pick-to: 6.5 Fixes: QTBUG-118573 Change-Id: Ib80149f97cb4785f632b37145c564d6565a745bf Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 3307e17a948035016e935d24e980c2e1ca8d25b8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit acdd194197bb9882c3ca74db541a17adfad8d207)