summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update dependencies on '6.6.1' in qt/qtmultimediav6.6.16.6.1Qt Submodule Update Bot2023-11-201-4/+4
| | | | | Change-Id: Ic09ad0d3160015e87f0ff4b07934bca47895793e Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update pfft to the latest version from upstreamLars Knoll2023-11-164-91/+90
| | | | | | | Fixes: QTBUG-119151 Pick-to: dev 6.6 6.5 6.2 Change-Id: I71bb0c2081632fd6855f3c0045ea9fb54c128e07 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Update dependencies on '6.6.1' in qt/qtmultimediaQt Submodule Update Bot2023-11-161-4/+4
| | | | | Change-Id: I6343e974d658b29ff64ae32f83bef79cc96a10bd Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Media Player Example: Set volume slider minimum width to default sizeLars Sutterud2023-11-141-0/+3
| | | | | | | | | | | | | | | | | | This change fixes a design bug where decreasing the window width would decrease the volume slider width gradually down to zero. A volume slider needs a certain width to be useful, therefore the default slider width from QSlider::sizeHint() is now used as its minimum size. This is done by changing its horizontol QSizePolicy to MinimumExpanded. As a result the volume slider now has a constant width, which is the same apprach used in e.g. Apple Music and VLC player. Fixes: QTBUG-119087 Pick-to: 6.5 6.2 5.15 Change-Id: Ibe93b278f2651d4aa3a5c0ce7316dad27c2776e5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 96e0b1338dff1f186966cbb2159e9399d78234c2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add environment variable for testing audio sample rate deviationsArtem Dyomin2023-11-131-6/+27
| | | | | | | | | | | | | | | In some cases, mostly on Linux, audio sink consumes bytes faster than expected, that causes audio stuttering. The variable might help us to test on the user side how the sample rate deviation affects the audio playback. Task-number: QTBUG-116020 Pick-to: 6.5 Change-Id: Ie6a34b7e8f9223f70b4a21ada536375d2bb787be Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 2ab05abc865356a2fb1748993eeb9204d346afcc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Handle non-standard pixel aspect ratios by the ffmpeg backendArtem Dyomin2023-11-1311-22/+152
| | | | | | | | | | | | | | Videos may have some specific pixel aspect ratio which means that video frames should be scaled on drawing. The patch handles such videos an makes them draw properly. Task-number: QTBUG-108754 Pick-to: 6.5 Change-Id: Iddfa37b55bccde35d97e64ac58b4f639ea51451b Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 2d5a8d28841fba0b0c4d8ed67dcf91f3bfafe486) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix BT2020 full range color transformation matrix and add testsJøger Hansegård2023-11-134-11/+278
| | | | | | | | | | | | | | | | | | | The color transformation matrices are hard to maintain. Having tests that demonstrates how they are calculated makes them easier to maintain. While writing these tests, we found that the matrices for BT2020 with full range YUV signal did not match the limited range version, giving too green images. Other coefficients were also adjusted to agree better with the reference, but these changes were insignificant. Task-number: QTBUG-117744 Pick-to: 6.5 Change-Id: I2207e4919bf7f8ff63cec995b866843354228364 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 968a8ad06611a94d30e834d3a048d8d3f0c98034) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* wasm: fix QAudioInput for wasmLorn Potter2023-11-132-10/+13
| | | | | | | | | | | | Don't remove devices that were previously found. Temporarily make webaudio devices not the default Pick-to: 6.5 Fixes: QTBUG-115075 Change-Id: Iedaf53858c3b7dddc2cf1eb33a855989ca5793d9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 0272a7c1a68ed8c7abf46fe2bdc2abbba4ace66a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.6' in qt/qtmultimediaQt Submodule Update Bot2023-11-101-4/+4
| | | | | Change-Id: I171e3121454239b31083c29fd60175e8bbba408f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fix build with vaapi versions < 1.9.0Artem Dyomin2023-11-101-1/+6
| | | | | | | | | | | The function vaSyncBuffer was introduced in 1.9.0. Task-number: QTBUG-118510 Pick-to: 6.5 Change-Id: Icebabc981de1fa5e1738d092479686221da07987 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit f24e2a4d7f2b13f5b79367c729de87df9459ff3b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix full range color transform matrix for the 709 YCbCr to RGBChristian Strømme2023-11-101-5/+4
| | | | | | | | | | Fixes: QTBUG-117744 Pick-to: 6.5 Change-Id: I9f80add59986a6bd8aa1947a2804097e84eea2d5 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit 20d503cd5795197276959f73d338e790d43b56ec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix dynamic symbols resolving if ffmpeg linked dynamicallyArtem Dyomin2023-11-102-22/+24
| | | | | | | | | | | | | | | * QtMM doesn't use openssl explicitly, loading openssl symbols should be disabled if ffmpeg is linked dynamically. * VAAPI-related warning message should be skipped for dynamically linked ffmpeg as the message doesn't make sense. Pick-to: 6.5 Change-Id: I89a4c70840f22117d65ef8eed3c40448555c57a0 Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit fde8e3e7b9cdfd6b879603b919260f2d66dc7f7c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.6' in qt/qtmultimediaQt Submodule Update Bot2023-11-081-4/+4
| | | | | Change-Id: Ia4c9a491402fddcdb7a3025af2ca57c33ee881b2 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fix waiting for the end frame in the ffmpeg mediaplayerArtem Dyomin2023-11-084-9/+54
| | | | | | | | | | | | | The problem was in immediate handling of the ending frame after the last frame; we should wait for the last frame ending before finalization the rendering. Pick-to: 6.5 Change-Id: Ie5e30419678ac3a4d5c0d722d99beb8c197bcb46 Reviewed-by: Lars Knoll <lars@knoll.priv.no> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> (cherry picked from commit 4b8077ed171bce50f5ba97caec2058745cbfc44f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QSGVideoNode: cleanup the code a bitVladimir Belyavsky2023-11-082-13/+6
| | | | | | | | | | | | - remove unused member variables - use in-class member initialization Pick-to: 6.5 Change-Id: If7db24d7e8d154575a4121b9125405ca77b09864 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit e3caec4c996739f5da20ef1176509afc9a8ad7c8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc update on negative playback rates, and hardened FFmpeg handlingJøger Hansegård2023-11-085-9/+67
| | | | | | | | | | | | | | | | | | | | | | | | The FFmpeg media player does not support negative playback rates, even if the documentation stated that negative rates can be used. This is fixed by updating the documentation to state that negative rates are not supported (independently of backend). Note: Negative playback rates may still work with some backends, but it is not considered supported (or maintained). In addition, the FFmpeg backend has been changed to clamp negative playback rates to 0, instead of asserting. This patch also fixes an issue where playbackRateChanged signals were not emitted by the FFmpeg backend. The mediaplayer example is updated to make this issue easier to spot in the future. Task-number: QTBUG-118654 Pick-to: 6.5 Change-Id: Iaaffa9fa39bdd462ad5b5a838390325d78d64e85 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 1c96be87cbafd78a9b509607cd65735cd8b533d4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QSGVideoMaterial: get rid useless mutexVladimir Belyavsky2023-11-081-4/+0
| | | | | | | | | | | | | | | | | | We can remove the useless m_frameMutex from QSGVideoMaterial, since both functions it guards are always called from the same thread (QSGRenderThread). It's also non-sense to guard only these functions, since m_currentFrame can be accessed from other functions such as QSGVideoMaterialRhiShader::updateUniformData(), QSGVideoNode::setTexturedRectGeometry(), etc. which are not guarder by the mutex. But this is not a problem, because they are also called from QSGRenderThread. Pick-to: 6.5 Change-Id: Iae2d8c4f8b16f10faed51b205513350c793dd1b1 Reviewed-by: Lars Knoll <lars@knoll.priv.no> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 563d645d9d7aa54403e16dac952a6acf07cf00bb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QWindowsMediaDevices: fix potential nullptr accessVladimir Belyavsky2023-11-071-24/+29
| | | | | | | | | | | | | | | | Fix potential crash in QWindowsMediaDevices::availableDevices() due to nullptr access to m_deviceEnumerator. This may happen in case where m_deviceEnumerator instantiation was failed by some reason in QWindowsMediaDevices constructor. Also make the warning in such situations more informative. Fixes: QTBUG-118706 Pick-to: 6.5 Change-Id: I60c7fab3ea13f6f576de89f184c1bf9cd80579c4 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit cf96c6862fe9b46a8d9fbad9494b04c9d3c7e644) Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Avoid resource_name collisions in qt_add_shaders callsLaszlo Agocs2023-11-072-5/+5
| | | | | | | | | | | | | | | | | It has been pointed out that platforms with static builds can end up in symbol name clashes when a Qt library and an application uses the same resource_name in qt_add_shaders or qt_add_resources. Avoid this by using more unique resource_names for Multimedia's own qt_add_shaders calls. Pick-to: 6.5 Fixes: QTBUG-118624 Change-Id: Ie3cc65abe42be1ae6bc61a6e2951997b4c398b79 Reviewed-by: Lars Knoll <lars@knoll.priv.no> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit d217eca2f065df538ec2cbd275150d9d587fd018) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Delay emitting playingChanged event until after state has changedJøger Hansegård2023-11-062-6/+30
| | | | | | | | | | | | | | | | | | The QMediaPlayer was emitting playingChanged event before changing its state. Clients would therefore read the old value of isPlaying when responding to the playingChanged signal. This patch updates the internal media player state before emitting the playingChanged signal, to ensure that clients get the current value when responding to the signal. Fixes: QTBUG-117006 Pick-to: 6.5 Change-Id: I9d45d6e0613ff901f4a02759798f2e25386b6c64 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io> (cherry picked from commit a72c3dab70e3ef0d52193af2cf798013c1926061) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: remove wrong dependency to QtMultimediaQuick in platform pluginAssam Boudjelthia2023-11-061-1/+0
| | | | | | | | | | | | | | | | The multimedia android platform plugin doesn't need to explicitly depend on Qt6MultimediaQuick. That dependency is written to the XML dependecy files used by androiddeployqt that are passed to the apps when loading libs, yet androiddeployqt don't necessarily deploy all of them since it also takes into account library linkage. Still the dependency in this case doesn't make sense regardless. Pick-to: 6.5 Fixes: QTBUG-118749 Change-Id: I6c635ff28f4d6d829cb5842a9dc7663a041e8d07 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 4bba6d1fe7ac9121066f45896e92103453711347) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Try setting OPENSSL_INCLUDE_DIR if it is missingBartlomiej Moskal2023-11-061-0/+6
| | | | | | | | | | | | | | | If OPENSSL_INCLUDE_DIR is not set, it can be create based on OPENSSL_ROOT_DIR Pick-to: 6.5 Task-number: QTBUG-110805 Task-number: QTBUG-114954 Task-number: QTBUG-113980 Change-Id: Ifadad6ee545f7e5ad2a644735f18e8563fc054b5 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 99f375db5065b48c36cca26c0f77e0926edad802) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Simplify lifetime handling when creating EVR video samplesJøger Hansegård2023-11-034-13/+11
| | | | | | | | | | | | | | In this change, we reduce the need for manual handling of COM interface reference counting when creating video samples in EVR MediaPlayer. This is done by maintaining the interface pointers in a list of smart- pointers, which takes care of the reference counting for us. Pick-to: 6.5 Change-Id: I119203ba1aae657b5ddd389f306762454933ff46 Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 8cd1fbf6a790d1c8ad986920949405e449d16098)
* Update dependencies on '6.6' in qt/qtmultimediaQt Submodule Update Bot2023-11-031-4/+4
| | | | | Change-Id: I19b7d338270744a37ad15d9925ea7ef773244384 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.6' in qt/qtmultimediaQt Submodule Update Bot2023-11-021-4/+4
| | | | | Change-Id: I71aff410ac43e3683280413de7a21cf8b23dcb5d Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Assign anonymous functions to signal handlers that access parametersMikko Hallamaa2023-11-022-2/+2
| | | | | | | | | | | | | | | | | QML Camera had plain code signal handlers that access signal parameters. This brings up qmllint info messages because injecting parameters like this deprecated. These handlers are assigned arrow functions where the parameter is defined in the signature. Task-number: QTBUG-113682 Pick-to: 6.5 Change-Id: I6b4f5f3f966e525dbf554815a00e185bdb4f2f43 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> (cherry picked from commit 2b01c10ff7570bdb3c84cc0b5b7036f4965edd7f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix unqualified access to properties in QML Camera exampleMikko Hallamaa2023-11-018-111/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | The QML Camera example had plenty of qmllint warnings about unqualified access of properties. These are now qualified with the object IDs. Accesses using parent.property syntax are also replaced with id.property. For accessing properties of outer components from inner delegates, the "pragma ComponentBehavior: Bound" is added to the files qmllint warns about to ensure access. Additionally for delegate components that access data created for them dynamically, "required property" syntax is used to access them using id.property. Anchor bindings in AnchorChanges now use id.property syntax as well, but qmllint gives "incompatible-type" warnings regarding binding QQuickAnchorLine to QQmlScriptString. This is a qmllint issue, so for now the warnings are suppressed using qmllint disable comments. Task-number: QTBUG-113682 Task-number: QTBUG-101364 Pick-to: 6.5 Change-Id: I4e1f219d0fa7436b2a9da3389f792e8d1bd150d1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> (cherry picked from commit 48a0b9593ab48412169c058708f5e13b9f90d54b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* EVRCustomPresenter: use ComPtr for class membersVladimir Belyavsky2023-11-012-34/+20
| | | | | | | | | | | | | ...to make the code a bit clearer and simplify lifetime handling. There are a few more places here where we can use ComPtr instead of custom ref-counting. So, in the long term, we might replace it with ComPtr as well and remove qt_evr_safe_release() completely. Pick-to: 6.5 Change-Id: Ifdbead0187a63bc7f9666df4e45bec524781a1c2 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 1d71702e7583ad25dc42343672da4a8dd3da8cc1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Simplify lifetime handling of IMFSample instances in EVR MediaPlayerJøger Hansegård2023-11-012-27/+9
| | | | | | | | | | | | | By using the ComPtr smart pointer class, we can simplify some of the lifetime handling of Windows Media Foundation sample objects by reducing amount of code for reference counting. Pick-to: 6.5 Change-Id: If89820270b0714d56419ba9b306f8493c4488280 Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 968745eaf3b54810e6f816fa8972ee60d5e253dc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Simplify lifetime handling of IMFSample instances even moreJøger Hansegård2023-11-012-11/+4
| | | | | | | | | | | | | | In this change we replace a queue of IMFSample interface pointers with a queue of smart pointers in the SamplePool class. This way, we turn the queue into an owning queue, and reduce the need for manually calling AddRef and Release on the contained COM interfaces. Pick-to: 6.5 Change-Id: I10f00855f94005e985f9a83326890c78c8634590 Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit b295b244bd4ff4c3bbea298664830c1c54c068f1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Simplify lifetime handling of IMFSample instances for frame steppingJøger Hansegård2023-11-012-23/+8
| | | | | | | | | | | | | | In this change we replace a queue of IMFSample interface pointers with a queue of smart pointers in the FrameStep struct. This way, we turn the queue into an owning queue, and reduce the need for manually calling AddRef and Release on the contained COM interfaces. Pick-to: 6.5 Change-Id: I3f284b9fb636b6284342f9ccce6d7927bab94ba8 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io> (cherry picked from commit fde9561d9a73306fe70e1679e3ceee847ba452da) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Reorder media player tests according to tested functionJøger Hansegård2023-10-301-338/+350
| | | | | | | | | | | | | | | This change groups tests according to the tested function. This helps visualizing how each function is being tested. Only tests that follow the function_doesWhat_underWhichCondition naming convention has been reordered for now. Task-number: QTBUG-116779 Pick-to: 6.5 Change-Id: Ibe796b9b92954bfed805f5be8a23e3015dac97cf Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit ecdf1f340e00eb5bb75a87a1d1cecf826ed7621c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.6' in qt/qtmultimediaQt Submodule Update Bot2023-10-301-4/+4
| | | | | Change-Id: I2a38f74dbfdf0d76052ffe582d01845c09797b8f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* QVideoTextureHelper: add missing QVideoFrame::unmap() callVladimir Belyavsky2023-10-301-0/+2
| | | | | | | | | | | | | | | In QVideoTextureHelper::updateTextureWithMap() we do frame.map(), but there is no corresponding frame.unmap() call, what may potentially lead to memory leaks and/or other side effects. So adding a scope guard to call frame.unmap() on any return from the function. Task-number: QTBUG-118587 Pick-to: 6.5 Change-Id: I04062cfcd23698872e825bd88044e30858e8d12a Reviewed-by: Lars Knoll <lars@knoll.priv.no> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit cf42eff34303a7009465c7fc71bd80b62a7b481f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Unify logic of enum error+string holding and changing notificationArtem Dyomin2023-10-3014-60/+209
| | | | | | | | | | | | | | We use the pair error + errorsString in several places, let's handle the update in notification in one place and have unit tests for the logic. Thus, the change fixes errors notification for camera. Pick-to: 6.5 Change-Id: Ie94ec728b051047bdd63ae3860e8942c3c245b1e Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit a69450f5e12d3cd0ff3367980c2fa9f4ab205457) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Replace qWarning with qCWarning in v4l2MemoryTransferArtem Dyomin2023-10-271-2/+5
| | | | | | | | | Pick-to: 6.5 Change-Id: I9cf5123100b7533535d0a482860d351b5c1f64a2 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> (cherry picked from commit eb6656beae99e53fabeea40fe77d91c5b06c36d5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Refactor QML camera example "variant" type propertiesMikko Hallamaa2023-10-262-4/+4
| | | | | | | | | | | | | QML camera example had custom properties with deprecated "variant" type. These now have the type replaced with a narrower type or "var". Task-number: QTBUG-113682 Pick-to: 6.5 Change-Id: I8767dc740d2189a00a5def875ebb847e229008b1 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit a1cf6699b736629be731af6d8745a946f4c43354) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Improve mediaplayer test naming and split some big testsJøger Hansegård2023-10-262-161/+334
| | | | | | | | | | | | | | | | | | | This patch attempts to improve naming of some of the mediaplayer tests to make it easier to see what the test is covering. In addition, doc strings are added to better describe some of the tests, and some long scenario tests are split into smaller ones to ease maintainability. Some tests are also extended to cover more of the media player's state, to better specify which function should change which properties. The goal of this patch is to make gaps in test coverage easier to spot, without reducing test coverage. Task-number: QTBUG-116779 Pick-to: 6.5 Change-Id: I1d6e1693e4b3d909b3ecef608cea22134f16f526 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 40356de19a07af4b88cfd698850d482fd0929060) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add draining delay of audiosink buffer in mediaplayerArtem Dyomin2023-10-262-2/+12
| | | | | | | | | | | | After finishing of audio frames play we should wait for the rest of sound in the buffer. Pick-to: 6.5 Change-Id: I874e2a70b2b9bfaa5e0842a5f347ba4f09870d92 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io> (cherry picked from commit c9cfd64ebab07ba14bc4fa9d93a3008b49f87bd7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add missing "moc_*.cpp" includes to v4l2 filesArtem Dyomin2023-10-252-0/+4
| | | | | | | | Pick-to: 6.5 Change-Id: I5c580069901ba7765c76c10f578c774312106502 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 93afcabc37ab694fe8295a966ffc4f099ce14b3c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move QV4l2CameraDevices to separate filesArtem Dyomin2023-10-256-182/+224
| | | | | | | | | | | It's nice to decouple cameradevices from camera since to make the maintenance easier. Pick-to: 6.5 Change-Id: I5bd8eadc7d43c1227e881e9223254af673fa15e3 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 53de18b1c2d5d85621205d4202402287407bde19) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: Fix short sounds playingBartlomiej Moskal2023-10-252-4/+19
| | | | | | | | | | | | | | | | | | | | | | Android uses OpenSL ES to play sounds. Firstly buffer is filled up with the initial data, then player state is changed to SL_PLAYSTATE_PLAYING. In playing state, player requests more data (using callback). When there is no more data we are responsible to set SL_PLAYSTATE_STOPPED on the player. In seems that change between SL_PLAYSTATE_PLAYING and SL_PLAYSTATE_STOPPED states is too quick. The result in cutting off end of the sound (for short sounds there is no sound at all). Therefore, when data is over we pass empty data buffer to OpenSL ES engine to make sure that player was not stopped too fast. Task-number: QTBUG-111045 Pick-to: 6.5 Change-Id: Iac23639d3d85a279f503a4b26637d46ea16c9864 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit eec1e986ce6110547975f358adc0a941b53370d5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add preffix m_ to v4l2 camaera class membersArtem Dyomin2023-10-252-121/+123
| | | | | | | | Pick-to: 6.5 Change-Id: Ia4b351e9233964671ccf2b5542cbafec0834f6c6 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 69322164152e484d11760b77f120428c35701bb1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Ensure updating of all v4l2 parameters on camera changeArtem Dyomin2023-10-242-70/+75
| | | | | | | | | | | Let's have camera parameters in a separate structure to make the code easier to maintain. Pick-to: 6.5 Change-Id: I22e794356fde753ecd879b6f22c5b4afd79861c3 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 3bbfd53813741cc2b39bcba5aa6210688d2e8998) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix a typo in quick media playerArtem Dyomin2023-10-241-1/+1
| | | | | | | | | | Task-number: QTBUG-117919 Pick-to: 6.5 Change-Id: I70a14eae9875c923fb1f26999a33ebddd6b64eac Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 9c445620d7eefb622b7591bb7401c5007849fbaf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix v4l2 camera frames corruptionArtem Dyomin2023-10-247-241/+521
| | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation of v4l2 video frames was based on direct mapping of the file memory; the problems of this approach are: - memory corruption in the case of closing the file when some buffer still exist or holding the file open with memory mapping until all buffers are deleted, which causes fake "busy camera" problems. - only few buffers available for keeping (only 4 in that impl); if a users holds all of them, the camera couldn't work. The introduced new approach exchanges mmap approach with a flexible selection of a memory transfer mechanism: - at first, we try using USER_PTR memory, which suits us the best (it's not supported for some cameras) - if user ptr is not supported by the camera driver, we use MMAP, in a safe way, but with an overhead (extra frame copy). Pick-to: 6.5 Change-Id: Iab0e3f8e8340521b7f4d6454ea4c84d2e2dd39b9 Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 72afefec2c071c7adc3586f5ee0ee12c444e9eea) Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Refactor QML Camera example orientation and control layout state logicMikko Hallamaa2023-10-242-26/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QML Camera example, the state of the photo/video controls that determines the layout those controls was updated by the setState function. This function was called on camera UI width change, and initially only because of stillControls.state being bound to the function. The videoControls.state was then bound to stillControls.state. This caused qmllint warnings (unqualified access to setState() and info message because setState() doesn't return a value) and log spamming whenever the window width changed. The orientation and control layout state logic is now encapsulated in a separate Item "controlLayout", and the stillControls and videoControls objects both bind to the state and buttonsWidth properties of this new Item. Additionally the message about state change is logged only when the state actually changes. Documentation is also updated to display the correct part of the code in the section that mentions the control layout. Task-number: QTBUG-113682 Pick-to: 6.5 Change-Id: I99e5c0c3d3bb369dd985cd06fdb51d687ef24f1f Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> (cherry picked from commit 2785589db4447d3ea421ba59130d6be4e6574b6b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Highlight QML 'Camera Application' in Mobile categoryKai Köhne2023-10-241-0/+3
| | | | | | | | | Pick-to: 6.5 Task-number: QTBUG-117209 Change-Id: Ia1b1582d9452d61db1e877362f2eb578a33ae188 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 2349ae2d5eb061ecd5e965c69c25d1d3c26f41c7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update list of highlighted examples for "Graphics & Multimedia" categoryKai Köhne2023-10-241-5/+5
| | | | | | | | | Task-number: QTBUG-117211 Pick-to: 6.5 Change-Id: I3b02380276d7fa1f2e520ea16cb1d01b58b25aca Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit beb1334afe07fa7d0531b6e9b2d3f916f1ad5b6b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.6' in qt/qtmultimediaQt Submodule Update Bot2023-10-241-4/+4
| | | | | Change-Id: I37f1b0d21a49671eac45254e01d4a51de2265841 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>