summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update dependencies on 'dev' in qt/qtmultimediaHEADdevQt Submodule Update Bot2023-05-171-4/+4
| | | | | Change-Id: I62bfe91d42e56cc649cc7c167a9f340433ca067d Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* 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>
* Fix QAudioSink on Windows and make the auto tests passArtem Dyomin2023-05-162-6/+16
| | | | | | | | | | | | | | | | | Windows tests became working, but on CI they are still not available since there're no audio devices on Win CI. - use QPointer for IO device (a corner case for close() in the destructor) - fix the method reset(), it should close the sink and change the state - There's a bunch of futher improvements to be done, namely, stop() should be improved for having more accurate behavior. Pick-to: 6.5 Change-Id: I575a1d97d6d07564164c8b2de91166315d8f28d7 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Improve getting ffmpeg frame durationArtem Dyomin2023-05-162-5/+19
| | | | | | | | | | | | | FFmpeg doc says that AVFrame.duration represents the duration except cases if it's 0 (unknown). It's appeared in only 6.0 so we use a helper to get it. So let's apply the rule to our AVFrame wrapper. Pick-to: 6.5 Change-Id: I9596364561f88929796c0097381bfc26bf1d4565 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Rename file qwindowsiuptr_p.h to qcomptr_p.hJøger Hansegård2023-05-1516-18/+18
| | | | | | | | | | | | For consistency, rename the file that now contains the QComPtr class. We also rename the include guard accordingly. This is a follow-up change after renaming the QWindowsIUPtr class to QComPtr to ensure consistent naming. Task-number: QTBUG-113460 Pick-to: 6.5 Change-Id: I5f234a20faabbe65840a32e93fa039ad48cf06ef Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Rename QWindowsIUPointer template class to QComPtrJøger Hansegård2023-05-1526-135/+135
| | | | | | | | | | | | | | The name QWindowsIUPointer feels clunky and does not add clarity. On the Windows platform, the term ComPtr, CComPtr or com_ptr is well established and understood. By renaming the QWindowsIUPointer to QComPtr we get code that is easier to read, particularly when the pointer is used in template classes such as std::vector<QComPtr> or QMaybe<QComPtr>. Task-number: QTBUG-113460 Pick-to: 6.5 Change-Id: Ia3ef06c4a1c0e45503ba5204a4d2fd6197114b15 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Docs: Add note about YUV420P format with FFMPEG backend on AndroidNicholas Bennett2023-05-151-2/+17
| | | | | | | | | | | Being a generic format, we can receive either a fully planar 4:2:0 - YUV420P or a semiplanar NV12/NV21. That will depend on the codec implemented in the device, so device-dependent. Fixes: QTBUG-112454 Pick-to: 6.5 6.5.1 Change-Id: Iebebca8d3d2bb5b540f92ec87b536dcb49ec7e4f Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
* Update dependencies on 'dev' in qt/qtmultimediaQt Submodule Update Bot2023-05-151-1/+1
| | | | | Change-Id: I94cf71749cd7d6985207e1f0ed804b36f4fcaf16 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Android-backend: Fix for Captured Image rotationBartlomiej Moskal2023-05-122-70/+16
| | | | | | | | | | | | | | | | | | | | | | | | | When using android-camera backend, the result photo was not correctly rotated for landscape orientation. Preview rotation is handled by [0]setDisplayOrientation method, but it does not affect taking pictures and recording. Recording is handled by [1]setOrientationHint. Both mentioned methods use QAndroidCameraSession::currentCameraRotation for rotate correction. It is reasonable to handle photo rotation in the same way. This commit removes a special rotation handling from onPictureTaken java method and move it to QAndroidCameraSession. That allows to handle photo rotation in the same way as preview rotation and recording rotation. https://developer.android.com/reference/android/hardware/Camera#setDisplayOrientation(int) https://developer.android.com/reference/android/media/MediaRecorder#setOrientationHint(int) Fixes: QTBUG-113029 Pick-to: 6.5 6.2 Change-Id: I2d08fef43fbd78faeafc7e20e100329e75019679 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Update dependencies on 'dev' in qt/qtmultimediaQt Submodule Update Bot2023-05-111-4/+4
| | | | | Change-Id: Ia3fa99fc2d70150f156fa54eb4240ca8160c5a13 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Remove not actual resampler's settingArtem Dyomin2023-05-111-2/+0
| | | | | | | | | | | The "async" option was relevant for the old implementation, but now it just makes problems, namely, by making internal buffering too high, and the actual output size could be very different with the expected one, what can cause a weird behavior. Pick-to: 6.5 Change-Id: I4637d02e7f5e321fb3f674a386ef43667ed9cda9 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Implement QFFmpegScreenCaptureDxgi in terms of common FFMPeg base classJøger Hansegård2023-05-113-125/+67
| | | | | | | | | | | | | | | | | | | | | | | | The QtMultimedia FFMpeg screen capture plugins all share a common base class 'QFFMpegScreenCaptureBase' that implements the bulk of the screen capture functionality, including the grabber thread and its screen capture loop. The Windows screen capture class 'QFFMpegScreenCaptureDXGI' class is, on the other hand, having its own implementation which makes it look and behave differently from the other implementations. This change refactors the Windows DXGI screen capture class to share base class with the other platform implementations. This reduces code duplication, and makes the class easier to maintain because it follows the same pattern as the other screen capture implementations. No functionality is changed through this refactoring. Task-number: QTBUG-113460 Pick-to: 6.5 Change-Id: Idd157c96e1705a9fe6eb591920177f6afb88cd2a Reviewed-by: Lars Knoll <lars@knoll.priv.no> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Android-backend: fix for setting maximumZoomFactorBartlomiej Moskal2023-05-112-5/+2
| | | | | | | | | | | | | | | Before this commit, the maximum zoom factor was set locally in the QAndroidCamera class. It was not propagated to its base QPlatformCamera class. That cause the problem with wrong value returned by maxZoomFactor() method. This commit contains setting correctly m_maxZoom in QPlatformCamera and remove not needed m_maximumZoom member from QAndroidCamera. Fixes: QTBUG-105372 Pick-to: 6.5 6.2 Change-Id: Iaf167d03e42cb0e22ebe60862bb9dc24b1ef9173 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Update dependencies on 'dev' in qt/qtmultimediaQt Submodule Update Bot2023-05-101-4/+4
| | | | | Change-Id: I30d93ca2283f1e162a7bf5832db9c5a7f8126673 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Add the use of the qt_internal_project_setup functionAlexey Edelev2023-05-091-0/+1
| | | | | | | | | The function sets the required CMake variables and policies. Pick-to: 6.5 Task-number: QTBUG-112685 Change-Id: I2132bb22f24bd3a683f5168e2fc5f974680f1080 Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
* Remove screen capture dependency on DirectX debug layerJøger Hansegård2023-05-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a Direct3D 11 device, it is possible to enable additional debug logging from the Direct3D subsystem by passing the D3D11_CREATE_DEVICE_DEBUG flag to the D3D11CreateDevice function. This is useful for debugging, but requires the D3D11SDKLayers.dll debug layer to be installed on the target machine. If the debug layer is not installed, calls to D3D11CreateDevice fails with the DXGI_ERROR_SDK_COMPONENT_MISSING status code. The debug layer is not installed by default on Windows 10 or Windows 11, and we can therefore not expect that this layer is available on any Windows computer. We also see that some QtMultimedia tests fail on CI nodes because the debug layer is not present. This change fixes the problem by removing the D3D11_CREATE_DEVICE_DEBUG flag from calls to D3D11CreateDevice. This gives less diagnostics for developers, but full debug logging can still be enabled through the DirectX control panel, which can be used to forcefully enable the debug layer even if the flag is not present when creating the device. An alternative solution would be to first try to create the device with the debug layer enabled by passing the D3D11_CREATE_DEVICE_DEBUG flag, and then retry without this flag if creating the device failed. The drawback of this approach is that the performance of the screen capture feature may depend on if the debug layer is installed or not. Pick-to: 6.5 Change-Id: Icad2965b61de953e3f93c8aeb902f37e5b31c10a Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* wasm: use javascripts VideoFrame for video processingLorn Potter2023-05-063-13/+174
| | | | | | | | | | | | | | This does not require any canvas context, so it should work for either 2d or webgl canvas Of course, not supported on Firefox yet This makes video playing use less memory on Safari and Chrome and less processor on Chrome. Change-Id: I4f3f320c12e3aa49d7d4e3a742fbd69900b539fc Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
* Reduce choppy sound on audio playback if audio sink is almost emptyArtem Dyomin2023-05-056-7/+84
| | | | | | | | | | | | | | If audio sink buffer is almost empty, that happens on pause/play, the sound pretty often has little gaps. The solution is using some little samples compensation (slows down the playback on 1% for 1-2sec what allows to increase buffer loadig from 0-10% to 20%). In other words, the patch implements slight "soft" audio samples compensation in order to avoid having empty adio sink buffer. Pick-to: 6.5 Change-Id: I6b963996eab8f8b8f610fcd4a566405aec3d13cf Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* pffft: Fix invalid format in qt_attribution.jsonTopi Reinio2023-05-051-1/+1
| | | | | Change-Id: Ieb948fd0eff8f10af10aab20268961e9b41de18c Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* wasm: add manual camera testLorn Potter2023-05-057-0/+555
| | | | | | | | this also tests local video playback Pick-to: 6.5 Change-Id: I82fff701d82f61ed06aa150d357fdede712ae6c0 Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
* wasm: fix local video file playingLorn Potter2023-05-052-27/+41
| | | | | | Pick-to: 6.5 Change-Id: I8edd18d78815795262a5bca5523fe82587dd469f Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
* QMediaPlayer: emit errorChanged signal whenever the error has changedVladimir Belyavsky2023-05-043-9/+12
| | | | | | | | | | | | | | | | | There was a problem that error/errorString properties were not properly notified when reseted on start playing. So now we use private setError() method whenever 'error' should be changed. Also as a drive-by there are several improvements: - errorChanged signal will be emitted now only when the property's value was actually changed. - errorOccured signal is now emitted only when there is a real error, i.e. it will never be emitted with NoError. Fixes: QTBUG-113386 Pick-to: 6.5 Change-Id: I16e26710941ed6b8429f39c201572092f2714c74 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Upgrade pffft to the latest versionLars Knoll2023-05-042-4/+3
| | | | | | | | Pick-to: 6.5 6.5.1 Fixes: QTBUG-113355 Change-Id: Ib7f7c45fe89f6516d136406eb068ea740cff11fe Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix tst_QScreenCaptureIntegration::captureSecondaryScreen()Lars Sutterud2023-05-041-7/+4
| | | | | | | | | | | | | | | widgetOnSecondaryScreen is now positioned on the correct screen, avoiding a bug where screencapture would record with frameRate equal to the primary screen's refresh rate. Solution: - Creating the TestWidget with geometry corresponding to secondary screen, using screens.back()->geometry().topLeft().x(); - Sending correct screen size to capture(). Change-Id: I16c19bdfcb0cb713bfc4b7feab92eb3b1c04e716 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Add test for non-ASCII characters in file namePavel Dubsky2023-05-041-0/+27
| | | | | | | | | | | The test is supposed to check whether media file can be opened and played if its name contains non-ASCII characters. Task-number: QTBUG-112707 Pick-to: 6.5 Change-Id: I9703869039cfdb9c5f994d5403f1bbfd0d23118e Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Update dependencies on 'dev' in qt/qtmultimediaQt Submodule Update Bot2023-05-021-4/+4
| | | | | Change-Id: I58f0ff8a05a287d610dc2b1a36abb26b1ca4bd99 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Android: Use QFile for content urlSamuel Mira2023-05-021-14/+5
| | | | | | | | | | | | | Following Scoped Storage feature implementation, the java APIs to obtain a filedescriptor from a content scheme were removed. QFile now supports content url, so it was changed to use that. The QFile still needs to be used as a stream. Fixes: QTBUG-112973 Pick-to: 6.5 6.2 Change-Id: I0b023be6adab81a591ce0e8a81128e4ca00ba213 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* AVFVideoSink: Set pixel format even when rhi is not setVladimir Belyavsky2023-05-011-24/+22
| | | | | | | | | | | | QVideoSink::setRhi() is new and not documented. One may still use default constructed QVideoSink as an output for QMediaPlayer. In this case we still need be able produce valid video frames into the sink. Amends 2e43d29e1d5d50b44b8f6d4f000968e3933c279a. Fixes: QTBUG-113286 Pick-to: 6.5 Change-Id: Ib4632e66e8df78af44178af611604aac5e797b53 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Docs: Fix "Can't link to" example warningsSafiyyah Moosa2023-04-282-4/+4
| | | | | | | Task-number: QTBUG-113160 Pick-to: 6.5 Change-Id: I0187a0f9ab419694b6e801d1f44cbb59394ec7c7 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Update dependencies on 'dev' in qt/qtmultimediaQt Submodule Update Bot2023-04-271-4/+4
| | | | | Change-Id: Ibfc70ee89754562f4e14c1f0b2d39e5bd26f5c53 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Add IMPORTED_LINK_INTERFACE_LANGUAGES to WMF::WMF targetAmir Masoud Abdol2023-04-261-1/+2
| | | | | | | | | | | | | To make sure that CMake sets and uses the `CMAKE_C_IMPLICIT_LINK_DIRECTORIES`, we need to specify the `IMPORTED_LINK_INTERFACE_LANGUAGES`, otherwise, if user projects don't enable C, CMake might not know where to look, as seen in the bug. Pick-to: 6.5 Fixes: QTBUG-112832 Change-Id: I5f26563cbbe4532b39933b4ffdec44bbccaf4062 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Android-example: add missing properties in AndroidManifest.xmlBartlomiej Moskal2023-04-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | After changing android target SDK version to 31, some missing values has to be defined in AndroidManifest.xml. AndroidManifest.xml template was updated in qtbase in: 56dee3de5e4ac1c4d37a2c5e27361e7ddbdea1a7 commit. In case when example uses its own AndroidManifest.xml file, it need to be updated separately. * android:exported="true": because the manifest sets an intent-filter, and it then has to explicitly to avoid the warning [1]. * android:allowBackup="true": this has to be explicitly set, we set it to the default value here [2]. * android:fullBackupOnly="false": SDK 23+ use this to deteremine to user auto backup or not, we set it to the default value here [3]. [1] https://developer.android.com/guide/topics/manifest/activity- element#exported [2] https://developer.android.com/guide/topics/manifest/application- element#allowbackup [3] https://developer.android.com/guide/topics/manifest/application- element#fullBackupOnly Fixes: QTBUG-113008 Pick-to: 6.5 6.2 5.15 Change-Id: I5199dd70641a51e7e4bcf0c2abe7ea60d4a0eca9 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Fix unused variable warnings with Android NDK 25Ville Voutilainen2023-04-263-4/+1
| | | | | | Pick-to: 6.5 Change-Id: I3393a873ac1a5bf5d2c289c54e5fa83941725fb8 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* AVFVideo: Set color range to video frame formatDoris Verria2023-04-261-0/+18
| | | | | | | | | | Set the color range based on the pixel format. This ensures the correct color matrix is chosen. Task-number: QTBUG-108083 Pick-to: 6.5 Change-Id: I6b599d702384f479d8efee0673fe3eadcf9c12c2 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Fix QMediaDevices::videoInputs returning an empty listPavel Dubsky2023-04-261-0/+4
| | | | | | | | | | | | | When QMediaDevices::videoInputs is called without prior call to QMediaDevices::audioOutputs the returned list is empty but if the latter call is present everything works as it should. The reason is a missing call to CoInitialize inside internal Windows-specific implementation. Task-number: QTBUG-112702 Pick-to: 6.5 Change-Id: I462d3cf15f65329415539eb1bdde6be65ab9a407 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* QVideoTextureHelper: Fix color matrix calculationDoris Verria2023-04-261-1/+1
| | | | | | | | | | | | | | | | | | | The color matrix for BT709 video (limited) range, had a small mistake. From calculations based on the BT709 standard and for video range (16 - 235) values, the conversion equations are: R = Y * 1.1644 + V * 1.7928 + (-248.100994) G = Y * 1.1644 + U * -0.2132 + V * -0.5329 + 76.878080 B = Y * 1.1644 + U * 2.1124 + (-289.017566) So there was a missplacement between two of the coeficients in the matrix. Fixes: QTBUG-108083 Pick-to: 6.5 6.2 Change-Id: If58c7df8a9ad4d975a2ac0c90cd3692232210995 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Fix compiler warnings from mixing int and size_tVolker Hilsheimer2023-04-252-6/+6
| | | | | | | | Since the internal datastructures in the tests use std::vector, we cannot compare their size() to int literals without upsetting MSVC. Change-Id: I4f657a8ca4081ac30da8a438c89b829e1856f914 Reviewed-by: Doris Verria <doris.verria@qt.io>
* Exclude files including EGL/egl.h from Unity BuildAmir Masoud Abdol2023-04-252-3/+7
| | | | | | | | | | It seems that when <EGL/egl.h> is included, we get conflicting symbols between QUrl, and X11 symbols. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ided106a6b07f4a2d8c85419f86a5220f4cb77a23 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Highlight third-party modules that are security criticalKai Köhne2023-04-253-0/+3
| | | | | | | | | | | | | | Mark any modules listed as 'processing untrusted content' in https://wiki.qt.io/Third_Party_Code_in_Qt also in the qt_attribution.json files. For reasoning, see also https://lists.qt-project.org/pipermail/development/2023-February/043667.html Pick-to: 6.5 Change-Id: Ibb81617addfc972c46bf2223c54fa18173c9af4f Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* qt_attribution.json format cleanupKai Köhne2023-04-253-45/+49
| | | | | | | | | | - Do no use JS array for only one entry - Add DownloadLocation field - Use shorter SHA's for the version number, which is displayed in the generated documentation. Pick-to: 6.5 Change-Id: Iaaf377432cc5189f42a87645c57308435edaf770 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Docs: Fix capturesession snippet in mediarecorder type documentationNicholas Bennett2023-04-251-0/+1
| | | | | | | | | | | Added "active: true". Task-number: QTBUG-112714 Pick-to: 6.2 6.5 Change-Id: Ic122efcd8a8e742d7edefc54fdf443c758259b19 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Bartlomiej Moskal <bartlomiej.moskal@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Update dependencies on 'dev' in qt/qtmultimediaQt Submodule Update Bot2023-04-251-4/+4
| | | | | Change-Id: I940539926fa0c78f68f91a0988d9287b8d9c4ebd Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Remove an unused private variableAmir Masoud Abdol2023-04-241-1/+0
| | | | | | | Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I9a2292d042315d997593c2521a008ece533d7e93 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Exclude a file from Unity BuildAmir Masoud Abdol2023-04-241-0/+6
| | | | | | | | | | | | | If not excluded, - `rwLock` will collide with `wrappers/jni/androidmediaplayer.cpp`, - and `notifyFrameAvailable` will be confused by the one defined in `wrappers/jni/androidsurfacetexture.cpp` Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I50a891449f4631caceb088a79e26c709df063931 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Doc: Remove mentioning of Spatial Audio being in tech previewAndreas Eliasson2023-04-241-3/+2
| | | | | | | | | Spatial audio is out of tech preview in 6.5. Fixes: QTBUG-112601 Pick-to: 6.5 Change-Id: Ia7a5158608ab5a8a5f1a597792dbb42aa0e50bde Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Fix crash with sequential QIODevice as media source on WindowsJoerg Bornemann2023-04-242-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sample in QTBUG-110005 uses a QNetworkReply as source for QMediaPlayer. This is a sequential QIODevice. As such, it doesn't have the concept of size. The sequence leading to the crash is - BeginCreateObjectFromByteStream() is called - MFStream::GetLength() return zero - that's why MFStream::BeginRead() is not called, and m_currentReadResult stays nullptr - QNetworkReply::readyRead() is emitted - MFStream::doRead() is called, because of the latter signal - MFStream::doRead() accesses m_currentReadResult, which is still nullptr (see above), and we witness the crash The desirable sequence is (as one can inspect by playing a video from a qrc:// URL): - BeginCreateObjectFromByteStream() is called - MFStream::GetLength() returns the video stream's size - MFStream::BeginRead() is called and initializes m_currentReadResult - MFStream::BeginRead() posts a custom event to the MFStream object - MFStream::doRead() is called when handling that custom event - MFStream::EndRead() tears down m_currentReadResult There is never a situation where QIODevice::readRead() should trigger a MFStream::doRead(). Calling doRead() outside of the BeginRead()/EndRead() pair cannot work. Therefore, this patch removes the handling of the stream's readyRead() signal. Note that this patch only fixes the crash in favor of an error code that's written to the program's console. Handling sequential QIODevice streams will require some more work. See further comments in the issue. Pick-to: 6.5 6.2 Fixes: QTBUG-110005 Change-Id: I2fc70f873a2e3a257e8e081d83862c53dabb6cac Reviewed-by: Lars Knoll <lars@knoll.priv.no> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Update dependencies on 'dev' in qt/qtmultimediaQt Submodule Update Bot2023-04-201-4/+4
| | | | | Change-Id: Idcb9352ef90de0f6ed5d97b91fd014dcf9c16ee5 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fix playing of video files with Chinese namesPavel Dubsky2023-04-201-1/+1
| | | | | | | | | | | | | | | The old implementation was using QUrl::toEncoded in order to retrieve a filename from a URL, but it uses toLatin1 internally which substitutes all non-ASCII characters with question marks that leads to ill formed path. The new implementation uses QUrl::toString with a subsequent call to QString::toUtf8 and it basically leads to the same results while preserving non-ASCII characters. Task-number: QTBUG-111951 Pick-to: 6.5 Change-Id: I0ad32143bc4afbdaec34511d7910ff106cb3cf45 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* wasm: fix crash when camera is not yet readyLorn Potter2023-04-204-38/+38
| | | | | | Pick-to: 6.5 Change-Id: I38b27c2295827f7319d9c45f7a12bd45c98bd7d6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Fix qmediaplayer tests flakyness with QSignalSpyArtem Dyomin2023-04-191-1/+5
| | | | | | | | | | | | QSignalSpy is not safe if signals are emitted from another thread, on windows the collision of removing QSignalSpy and receiving a new frame occurredpretty often (around 20% of running attempts). Catching the signal in the main thread fixes the problem. Pick-to: 6.5 Change-Id: Id9630a5ee32e261b308ea61dc0a61b424f5239c0 Reviewed-by: Lars Knoll <lars@knoll.priv.no>