summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Android: Add warning about setting earpieceBartlomiej Moskal2022-08-031-0/+4
| | | | | | | | | | | | | | Built in earpiece cannot be set as Audio Output device when wired Headphones are connected. Earpiece has the lowest priority and setWiredHeadsetOn method (to force it) is deprecated. That is why earpiece are unavailable when wired Headphones are connected. Task-number: QTBUG-99022 Change-Id: I7c9dd2a046240b822c2e0d397f4db31a6e932e7d Reviewed-by: Samuel Mira <samuel.mira@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 17f31f1e2052474470f6005ae696292d2fd90073) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add missing mutex relockPiotr Srebrny2022-08-031-0/+1
| | | | | | Change-Id: I914911f07feed1a996c0596b7acc63a7e3a11fd3 Reviewed-by: Lars Knoll <lars.knoll@gmail.com> (cherry picked from commit ddc9ba4172dc8175a32c41f8e16d5d2a777919d6)
* Android: Fix changes in preview resolution after taking a photoSamuel Mira2022-07-292-5/+8
| | | | | | | | | | | This patch fixes the changes in preview resolution after taking photos. As a side effect also prevents freezing the photo on the declarative camera example. Fixes: QTBUG-102772 Change-Id: Id8d6e3c63002f275d651c7f1aba59324f96f3857 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 579a0423b8b3c62c582a706d338a9eb1bcd788a3)
* Android: Fix for changing Audio sinkBartlomiej Moskal2022-07-274-1/+14
| | | | | | | | | | | | | | | | The OpenSL ES API does not provide direct audio output IO-devices as a sink for media objects. That's why setting audio output in QAndroidAudioSink is done with JNI calls by AudioManager. The disadvantage of this solution is that the audio output is set for the entire Android device (not just for the current sink). But this is still a better solution than not working audio output change at all. Task-number: QTBUG-99022 Change-Id: Id9a3d7a1abf2497b8e94363c93f888d09db9edb4 Reviewed-by: Samuel Mira <samuel.mira@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit eed4ee2729af19e75a3a35d0778dd87c6c1cf1b7)
* Android: Filters out unsupported FLAC audio codecsBartlomiej Moskal2022-07-271-7/+6
| | | | | | | | | | | | | When using Android backend, MediaRecorder is used for recording. API for MediaRecorder do not allow to set audio encoder with FLAC option. That is why we need to filters out unsupported FLAC audio codecs from encoders list. Task-number: QTBUG-98121 Change-Id: I4b0ea35a2f111afb7ff07cb3206255789834ff8a Reviewed-by: Samuel Mira <samuel.mira@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 6acdd79dd6d6c381dc13461d165dbc4dccf670be)
* Android: Fix framerate drop when QML animation is over video/cameraSamuel Mira2022-07-192-13/+23
| | | | | | | | | | | | | | | The reason for framerate drop was the invoke method that forces to readback a new frame from the surface. Removing that method may lead for the video output to be become stuck when the render thread becomes blocked, since because the object needs to be moved to OpenGL thread to be able to create OpenGLContext. To solve this, it now verifies if the thread needs to create OpenGLContext and moves to OpenGL thread but will move back to the original thread after the OpenGLContext are created. Fixes: QTBUG-104133 Change-Id: I38517e8c1e9db2f4098aaaaa5a0598a406f04281 Reviewed-by: Lars Knoll <lars.knoll@gmail.com> (cherry picked from commit e8248b7a953ca2284f4fa489dfc31579bb92f66e)
* Adjust video output size by frame orientationPiotr Srebrny2022-07-061-1/+1
| | | | | | | | | | | | The reported QQuickVideoOutput::sourceRect() size was incorrect as it did not take the frame orientation into account. This was caught by Q_ASSERT. The bug was found and solved by Vladimir Belyavsky. Fixes: QTBUG-104483 Change-Id: Icffa7e69a60b434f85f25604297ebea5ed4dd316 Reviewed-by: Lars Knoll <lars.knoll@gmail.com> (cherry picked from commit a573a6f507b8b63a8a868adb5d97c21bc7849ae6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QAudioHelpers: fix C++20 -Werror,-Wdeprecated-enum-float-conversionMarc Mutz2022-06-301-1/+1
| | | | | | | | | | | | | | | | | Says Clang 10.0.0 -std=c++20: qaudiohelpers.cpp:71:44: error: arithmetic between enumeration type 'QAudioHelperInternal::signedVersion<unsigned char>::(anonymous enum at /home/marc/Qt/qt5/qtmultimedia/src/multimedia/audio/qaudiohelpers.cpp:63:5)' and floating-point type 'double' is deprecated [-Werror,-Wdeprecated-enum-float-conversion] pDst[i] = signedVersion<T>::offset + ((typename signedVersion<T>::TS)(pSrc[i] - signedVersion<T>::offset) * factor); ~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix by turning the enum { offset } into a static constexpr int instead. Task-number: QTBUG-104172 Change-Id: I92a22583fc5e1fc524364b64701aa8d416b82671 Reviewed-by: Lars Knoll <lars.knoll@gmail.com> (cherry picked from commit 94d43085b3f3327b2bf2d644c5f984391f608d3a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Release DC context after usePiotr Srebrny2022-06-281-2/+5
| | | | | | | Fixes: QTBUG-104520 Change-Id: Ida7840aaa185a9db96dd366fbc44292586fd81f4 Reviewed-by: André de la Rocha <andre.rocha@qt.io> (cherry picked from commit 8c78ed8e94ff59bdc629d65475f31fec66adaaf0)
* QNX: fix KHR image handlingRafael Roquetto2022-06-161-2/+6
| | | | | | | | | | | Textures previously bound to KHR image sources cannot be reused/bound to a newly created KHR image - at least not on QNX. Ensure that a new texture is created before binding a new KHR image. (cherry picked from commit 21dad3632dec5e5ea7c9d45bba927aba2b8e23ea) Change-Id: I7bf8da631debcd44b8e42bd23bc5043372e3536f Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
* Android: Fix for UnderrunError on QAndroidAudioSinkPekka Gehör2022-06-131-0/+3
| | | | | | | | | | | | | | | | After fix we set a state of QAndroidAudioSink to the QAudio::IdleState, immediately when m_audioSource->atEnd() is true and buffer size is > 0. Because otherwise it is called when buffer size is 0 and m_audioSource->atEnd() is true. and it leads to that we also call a setError(QAudio::UnderrunError) in QAndroidAudioSink::onEOSEvent() function. The patch will not affect the tests. Task-number: QTBUG-97492 Change-Id: Id48469141ab4aab266b775aea674bc6e82a53d33 Reviewed-by: Samuel Mira <samuel.mira@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 58d09e0b57c8f0e7d7947d703390954f45277fbf)
* Android: Fix error signals issuesPekka Gehör2022-06-132-6/+17
| | | | | | | | | | | | Error Signal types changed to the same as on gstreamer side. After fix the tst_QAudioDecoderBackend test go passes. Task-number: QTBUG-100079 Change-Id: I845d744fb07aba084168fe8c7fe5b380b6ec6ebe Reviewed-by: Samuel Mira <samuel.mira@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit bed5590f87a19da562ddb91b9c0ba4d313613f1a) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Android: Fix for the permissions issue on the tst_QAudioSource testPekka Gehör2022-06-021-1/+11
| | | | | | | | | | | | | When testing for the first time with an emulator with Android version <= 9 after test installation, the test passes because we do not have record permissions from user, so we use the default SampleRates list for QAudioDevice input. We don’t even check to see if these sample rates are supported in opensles. After the fix, the QOpenSLESEngine::supportedSampleRates() function works the same way on the first and second runs of the test and so on. Fixes: QTBUG-99095 Change-Id: I0b61232b5cb38c314913fa60c8bf2fd374b0468f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 7a5876caae7696b887a99c053629c638ec55f418) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Windows: fix media player position while rewindingAndré de la Rocha2022-05-311-4/+6
| | | | | | | Fixes: QTBUG-103853 Change-Id: I606dbc06d3aa46d6b75d5189c3125cf789e5fda5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 54ee3fb7dadbd91d5eb322b635bece5b2b055fba)
* Doc: Landing page cleanupKai Köhne2022-05-311-16/+9
| | | | | | | | | | | Fix inconsistency with \section1 vs \section2. Also merge Reference and Examples section into one, and use title case consistenly. Replace reference to 'Qt Quick Multimedia' with 'Qt Multimedia', and use consistent style of find_package(). Change-Id: I77aec63629dae85096bb4f98dbfd7af5174de443 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit b4b6a66e071e4d9fcef19e0bc4f4645fa5a8a0db)
* Android: Correct the wrong signal call sequencePekka Gehör2022-05-302-19/+29
| | | | | | | | | | | | The call sequence of the signals and buffer handling are now implemented against the tst_QAudioDecoderBackend test. Task-number: QTBUG-100079 Change-Id: I55b02ffe34ab13ee35b71741fb139914d9f16b62 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit f324a096cb57b89b084d0c73ee92568d697260f3)
* QPulseAudioSource: fix UB (memcpy() called with nullptr dest) in read()Marc Mutz2022-05-261-2/+6
| | | | | | | | | | | | | | | | | | deviceReady() calls read(nullptr, 0), but calling memcpy() with a nullpt destination is UB, even if the length is simulateneously zero. Ditto applyVolume() (called from read()). Fix by guarding the memcpy() calls. Add assertions to indicate that for these functions, nullptr is valid input iff length is zero. Found by clangsa's core.NonNullParamChecker. Change-Id: I9006b0e933e196a7a212e0ebe2bd27f6b9552518 Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io> (cherry picked from commit 8df415d5bcf23462bedb4cb7601b909851ee15dd)
* Windows: Fix RTSP stream playbackAndré de la Rocha2022-05-252-3/+29
| | | | | | | | | | | Avoids changing the player topology for remote streams. Also improves handling of error conditions related to network streaming. Task-number: QTBUG-103567 Change-Id: I358389ed22397c3b15e5971a042e43dc369127f4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 196ea281d1843cfe62541001619a8517506af773)
* Fix qaudiosource auto test when using pulseaudioLars Knoll2022-05-241-3/+11
| | | | | | Change-Id: I538ab32837061157a9e259674d97fa6ddca4d4c6 (cherry picked from commit 8f5effb83a1a4690e42bee32cbc918a5c405fdd8) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Windows: Fix missing includeAndré de la Rocha2022-05-231-0/+2
| | | | | | | | | | Building qtmultimedia with the current qtbase dev started failing due to a missing include, possibly due to changes in some other header. Change-Id: I644cae7391bbd58bc1241ae593e56e6f3241c5ce Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 0eaf455896f91b03ea0eb015c1c6333b4224b577)
* Windows: Enable scrubbing mode for audio streamsAndré de la Rocha2022-05-231-2/+1
| | | | | | | | | | This avoids generating sound while seeking in paused state. Fixes: QTBUG-102969 Change-Id: I045ef87f17d3980eecdacf56b7513d8886747588 Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit f903bad766639a207080c6b4666c4cefc51f0902)
* Windows: Fix audio buffer sizesAndré de la Rocha2022-05-231-8/+5
| | | | | | | | | | | | | | | Audio buffer sizes were being calculated in a way that could result in buffer sizes that were not a multiple of the audio frame size. For instance, a buffer with an odd number of bytes could be used for holding 16-bit audio data, which would result in the audio data contained on half of buffers received by applications being shifted by half a sample, causing applications to misinterpret that audio data. Fixes: QTBUG-102843 Change-Id: I252384cb99fffca5e068b0b14e4be9b0469962ec Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 88ab683b570f0d87ef609e262c3799059cee2107)
* Fix null pointer dereference in GUI-less applicationsAndré de la Rocha2022-05-161-0/+4
| | | | | | | | | | | | | A pointer to the primary screen, which in GUI-less applications is null, was being dereferenced without testing, resulting in a crash when using the camera. Fixes: QTBUG-103394 Change-Id: Id891423bba585b474adab079521287677e8c8075 Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 4b73ae6531c4bf9da7309ac12e218f432a227daf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Docs: Fix broken linksNicholas Bennett2022-05-131-1/+1
| | | | | | | | | | | | The muted and volume properties belong to the AudioOutput qml type, not the MediaPlayer type, so these were fixed. Added qtquickcontrols module dependency to qdoc project. Task-number: QTBUG-102306 Change-Id: Iac447482c27a10a2cdba204739f753ccecd88289 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit e4fb343f897718beee106e72df13b5063d71d402) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiomKai Köhne2022-05-132-3/+3
| | | | | | | | | | | | | | Using REQUIRED as a prefix instead of suffix works better with OPTIONAL_COMPONENTS, and is also the order in the CMake manual. Also replace a non-breaking space (c2 a0) with a normal one. Task-number: QTBUG-98867 Change-Id: I4cfbba7e54ea35db4654dda06bae82bda752e0c2 Reviewed-by: Rui Oliveira Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 121082df1f52568ac08b0a5904358f00450b0a67) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QtMultimedia: replace qSwap with std::swap/member-swap where possibleMarc Mutz2022-05-116-9/+9
| | | | | | | | | | | | | | | qSwap() is a monster that looks for ADL overloads of swap() and also detects the noexcept of the wrapped swap() function, so it should only be used when the argument type is unknown. In the vast majority of cases, the type is known to be efficiently std::swap()able or to have a member-swap. Call either of these. Task-number: QTBUG-97601 Change-Id: Ida8402522bc980e871455d8fb21dddcf5b2dd384 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 583b991120596a5fbfdfd726ec228c23e819107e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix chunk sizing in QPulseAudioSinkAxel Spoerl2022-05-111-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | QPulseAudioSink:write() takes a length parameter which is set to the qMin of itself and the return value of pa_stream_writable_size(). This method returns the number of bytes requested by the server, but not yet written. Unless data is buffered, the value is 0. That leads to length being set to 0 and no data being sent. In PulseOutputPrivate::writeData(), a loop was implemented calling QPulseAudioSink::write() up to 10 times for each data chunk. That forced data buffering and subsequently the return value of pa_stream_writable_size() to be > 0. This patch replaces the query of pa_stream_writable_size() with the nbytes value modified by pa_stream_begin_write(). It represents the maximum amount of bytes the pulseaudio server is ready to accept. The patch also removes the loop calling write up to 10 times as it becomes unnecessary. Fixes: QTBUG-60575 Change-Id: I316a5ac610c8540ab8f7fff4a3b0b1ee3d7e7ad5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit f1829a24d4c9a393f95d55c415daa80275a90b93)
* WMF: improve errors handling in session creation logicVladimir Belyavsky2022-05-112-16/+18
| | | | | | | | | | | | | | | Additional changes to 44349054855e484cdd479a9b54d4183dfc51c654: - Don't create extra objects in case when MFCreateMediaSession() or IMFMediaSession::BeginGetEvent() fail. - Avoid loading a source when MFPlayerSession::createSession() failed for some reason. Plus replace old connect syntax with new one in the affected code. Fixes: QTBUG-103272 Change-Id: I9472ea81a9a59809e3a5956e9a7b4005ee8a8199 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 99d41ce066eadce99da5cc61dbd76a2e661986ee)
* Update metadata after updating media durationPiotr Srebrny2022-05-091-2/+2
| | | | | | | | | | | | | Media duration was sometimes set to 0 in metadata as it was read from m_duration variable, which is updated asynchronously from gstreambus. Do metadata parsing after updateding the m_duration variable to avoid this race. Fixes: QTBUG-102588 Change-Id: Id7514c73c7668f589e0a209f8fdf00a86e8a1208 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit fe1177d6c771b8195284f2e6f2f0876790b07c03) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Windows: Avoid changing the player topology for HEVCAndré de la Rocha2022-05-082-5/+22
| | | | | | | | | | | | | Changing the topology after a HEVC stream is loaded fails, while it works as expected for other codecs. This causes other issues as the player enters an error state. Ignoring the track change for HEVC streams as a workaround. Also giving more time for closing the session. Fixes: QTBUG-102707 Change-Id: Ie02951130df5fc809f89d564a7442ea0e4d16b6b Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 7105c492621fc618799e57d06c94a6b816561770) Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io>
* WMF: fix crash when media session can't be created by some reasonVladimir Belyavsky2022-05-061-0/+1
| | | | | | | | | | Just return early in case MFCreateMediaSession fails. Fixes: QTBUG-103272 Change-Id: I1ae128198ab4507bb90dab5749a50a5be847353a Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 44349054855e484cdd479a9b54d4183dfc51c654) Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Android: Fix qopenslengine audioFormat conversionSamuel Mira2022-04-304-9/+28
| | | | | | | | | | | | | This patch fixes the conversion audio format into SLFormat on qopenslengine. Previously the conversion did not take into account the sample format. To take it into account the SLDataFormat_PCM had to be changed to SLAndroidDataFormat_PCM_EX. Fixes: QTBUG-102962 Change-Id: I3699ee0cc939c46ad9ce8eae35c555ea9e8fc59f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 742344a6652ace697d188e52687d4ac340028ddd)
* Android: Unnecessary QMutex functionality removedPekka Gehör2022-04-282-12/+0
| | | | | | | | | | | Mutex on android side is unnecessary because, all the elements it guards are access only from one thread. Task-number: QTBUG-100079 Change-Id: Idd4035ef52e64415c2b63d9c62612e95217f88cc Reviewed-by: Samuel Mira <samuel.mira@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 51a548f8da473de731471ea784975a5f84c58b6a)
* Android: Fix destroying QThread while it is still running issuePekka Gehör2022-04-282-5/+9
| | | | | | | | | | Destroying Decoder thread in destructor of the QAndroidAudioDecoder while it is still running, will cause a fatal error. Task-number: QTBUG-100079 Change-Id: I43cdc3f9a8f718f3fce64a8aca7f1c2208fd7c48 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit f686479d6decf22dc5f93ce5596186dca148cc33)
* Fix Camera Preview on declarative-cameraSamuel Mira2022-04-282-2/+2
| | | | | | | | | | | | | | | | The example declarative camera showed a black screen in the camera preview until a touch on the screen occurred. It was introduced by 36f110e6c97e2c98ded86945825aa563fd93f2e0 patch. This patch fixes this issue. While working on the issue, the fix uncovered another issue regarding setting a camera format not correctly initialized. That is also fixed on this patch. Task-number: QTBUG-102029 Change-Id: I27adb97be2c2ace5f33818256e5b47ecf9e7210f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> (cherry picked from commit 540ff1496bcc9ef4019eb34978715b79ef0615a4)
* Android: fix source device issuePekka Gehör2022-04-271-15/+14
| | | | | | | | | | | | | | | Changed the QDataStream.write to the File.Write, because a QDataStream.write add an extra 4 -bytes to the file. For this reason the AMediaExtractor_setDataSourceFd will fail. Also changed the tempPath to the QDir.tempPath(), because a file creation fails with a tempPath; Task-number: QTBUG-100079 Change-Id: I2357520821ff5b78b8fc24acbf505af753161915 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 3f880a5c66b5c9e005cff8eee296ef8b8b039563)
* Android: fix wrong source file issuePekka Gehör2022-04-272-0/+41
| | | | | | | | | Return from the setSource if a source is video file or a source url is a invalid. Task-number: QTBUG-100079 Change-Id: If862f95cdcc5d2821640c0c481496346adf10e2d Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit a10fcc5e6a6978d82b97d202b3eb39d1a666f67f)
* Android: fix lost first buffer data issue with QAndroidAudioDecoderPekka Gehör2022-04-271-14/+16
| | | | | | | | | | | AMEDIACODEC_INFO_OUTPUT_FORMAT_CHANGED always comes first, so let's handle it with the same input buffer index. Otherwise, the first output buffer is lost. Task-number: QTBUG-100079 Change-Id: Ia642a573d06c7092d15834b50641c982d23ab606 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit c9ddced7cce79882e4a76436bf70390df9d97e37)
* Check result of open()ing a QTemporaryFileMårten Nordheim2022-04-261-1/+8
| | | | | | | | Change-Id: Ief4f6651a8763deaa259a62c1076ea8be1d62da1 Coverity-Id: 390145 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 983e50fbef960086e05d7de4f13a534216f76d66) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix usage of unsupported Exif constructor on Android 6Samuel Mira2022-04-192-4/+14
| | | | | | | | | | | | | | QtCameraListener used ExifInterface(InputStream stream) constructor that was added in API 24 while the mininum support is Android 6 API 23. The fix consists in using ExifInterface(String filename) constructor present since API 5. To use that constructor, it is necessary to save the data to a temporary file for ExifInterface to use. Fixes: QTBUG-99228 Change-Id: Ib39e8da696c64c20e4afcd3f71dd0e7abdea5ee6 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 6ccb976f4f9693ad7c6881a186fd6af0f05ff023) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* darwin: Don't specify source format hint for audio recordingDoris Verria2022-04-054-18/+55
| | | | | | | | | | | | | | | | | | | | | | | We were initializing the audio writer input with a format hint equal to the audio capture device's active format. This is wrong as we can't ensure that the captured audio buffers will be in that same format. This caused failure in recording because the captured audio buffers had the kAudioFormatFlagIsNonInterleaved set, while the format hint didn't, causing the internal calls to the AudioConverter to fail with errors. To fix, do not specify a format hint but instead setup the audio settings dictionary with the necessary keys. Force a default value for AVNumberOfChannelsKey since it is now required, and for recording with more than 2 channels, provide a supported channel layout. Fixes: QTBUG-98262 Done-with: Vladimir Belyavsky <belyavskyv@gmail.com> Change-Id: I537d82e729c91a66d85aaa61c563a1ecd1a91af3 Reviewed-by: Vladimir Belyavsky <belyavskyv@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 980c145069c589085b4dee4b4c2b69e3b1a0adc3) Reviewed-by: Doris Verria <doris.verria@qt.io>
* QVideoWindow: disconnect videoFrameChanged signal when destroyingRafael Roquetto2022-04-011-0/+3
| | | | | | | | | | | | Prevent signal from invoking methods on a half-destroyed object. It can happen when a video sink is trying to set a default frame prior to the sink itself being destructed, if that destruction is a side-effect of the video window destuctor itself. Change-Id: I49ad1e2d0fe28040bf32648fa76e3de8b08d0f0e Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 71c5377235b9e37be9c0eb25671e23484e289fad) Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
* Fix Multimedia auto test videoDimension on AndroidSamuel Mira2022-03-293-4/+23
| | | | | | | | | | | Added a seekTo in the android mediaPlayer setPosition to update position and a function on videooutput to render one single frame. Both changes were added for consistency between different platforms. Fixes: QTBUG-99361 Change-Id: I2ad0d1bb71ddd7cbc31a97587506050b9969fdd0 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 78891c03ec3675373ef6b54559d244cda32a9402)
* QVideoSink: update documentationRafael Roquetto2022-03-231-4/+2
| | | | | | | | | | Remove reference to the "native window mode of operation", as it is no longer supported since at least Qt 6.2. Change-Id: I7e553ddccd45b4c8b134ba058ade34f064fb5a24 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit ba7a6634e3e5387803aa72e7f9f243f550fae256) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove .prev_CMakeLists.txtKai Köhne2022-03-224-654/+0
| | | | | | | Change-Id: Ibf08af40c82d60ca06996644eb8390909a180178 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 56683ba70031f8fa3a70e1eb20e59389d66f46db) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* AVFCameraSession - don't use preview layerTimur Pocheptsov2022-03-211-6/+1
| | | | | | | | | | | | | | | | It's not in use essentially and was a legacy when we, indeed, were adding it as a sub-layer in a view. Starting from macOS Monterey, creating such a layer using +layerWithSession: results in a broken AVCaptureSession - frames/sample buffers stop coming after the first 25 frames. Also, qt application may break other non-qt apps, having their own capture session/viewfinders frozen too. Fixes: QTBUG-99641 Change-Id: I75dfba5db0d50bd015fcd6904a0c5c8ea800230f Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit f7dc6003acfbbd93444c6ae99871404a4cc8f4d2) Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Docs: Update QML Mediaplayer Example DocumentationNicholas Bennett2022-03-181-0/+1
| | | | | | | | | | | | Added a step through of the code and added images and animations to support the explanations. Large videos were uploaded to YouTube and embedded. Task-number: QTBUG-100512 Change-Id: Ie79de8e7af7908d8f2728c2af273ed5f4ae51a65 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 29eb3cc4d8a00f889b989730d65f8b7d074bef6a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix conversion from YUV422 to RGBMitch Curtis2022-03-181-3/+1
| | | | | | | Change-Id: I3e4409f40bb97c4e1f1cfafa406ebd34e16da390 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 755116275005da6c6c46246197969780a4269a83) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Windows: Restore device session state when ending media recordingsAndré de la Rocha2022-03-172-5/+15
| | | | | | | | | | | | | The device session active/inactive status should be restored after the end of media recordings, otherwise the input devices may remain in use and cause other issues. Fixes: QTBUG-101434 Fixes: QTBUG-101591 Change-Id: I35c8ed7a36556472b7c015e6fd2044aac40314eb Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 152530f9295ec7580b93c68640cca09484dbeb73) Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Windows: Rework workaround for WMF issueAndré de la Rocha2022-03-173-2/+7
| | | | | | | | | | | | | | | | What seems to be a WMF issue was causing a crash with specific videos and also issues when changing position of flac files. A previous workaround for it was depending on the way the media playing was started and thus seemed to fix the issue when tested with the Widgets-based Media Player example, but still failed with the QML-based one. This patch seems to fix it for all cases. Fixes: QTBUG-100854 Fixes: QTBUG-100181 Change-Id: I7e46d72b5e656383442d2866ef93f3183c9f9fa7 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit b068cb359996d0a5125b3b8bc341854674b7cbb7) Reviewed-by: André de la Rocha <andre.rocha@qt.io>