summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update dependencies on '6.4' in qt/qtmultimediav6.4.0-beta1Qt Submodule Update Bot2022-06-111-3/+3
| | | | | Change-Id: I57b9a37cdd6399a631f4dde06a95cca10e2d97ee Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Refactor QNX camera supportRafael Roquetto2022-06-0914-462/+1367
| | | | | | | | | | | | | | | | | | | | | | | Introduce a brand new QQnxCamera class that models around the QNX camera API, and represents an underlying camera unit. As a result, QQnxCamera is a self-contained and orthogonal class that no longer inherits from QPlatformCamera. A new class called QQnxPlatformCamera has been introduced to provide the QPlatformCamera implementation for QNX. While QQnxCamera remains close to the underlying QNX camera API (including the types being used), QQnxPlatformCamera sits one level up and makes use of a QQnxCamera object to expose it to the Qt-compliant API/types. QQnxCamera also enabled doing without the code duplication in QQnxVideoDevices, vastly simplified that class. Change-Id: I5e09a24d52f4890616c66373dd4529c404b107b2 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit e881a1afc08f1b168e743d63a2acc3025f3cb88c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtmultimediaQt Submodule Update Bot2022-06-081-3/+3
| | | | | Change-Id: Ibf2f4c975f4bc44592abe861345d4e7312e66ede Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Improve newly added error messagesFriedemann Kleint2022-06-082-4/+4
| | | | | | Change-Id: I781a06cca8f2bf8a51c027d13b21d4202c800e23 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 2838a402f226e1589c293d91b4243881518afc2c)
* Android: Fix for UnderrunError on QAndroidAudioSinkPekka Gehör2022-06-071-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) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Darwin plugin (AVFoundation): remove unused functionsTimur Pocheptsov2022-06-032-109/+1
| | | | | | | Otherwise iOS build fails (developer build). Change-Id: I02993dbc10045b81097fd30924ad54c9a422852d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove old Digia organization identifier from example Info.plistsTor Arne Vestbø2022-06-022-3/+3
| | | | | | | | The PRODUCT_BUNDLE_IDENTIFIER variable already contains an appropriate value based on the organization and product name. Change-Id: I089582a95bedd00712c5a0994129a6c825d0d411 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Darwin: Account for missing kCVImageBufferTransferFunctionKeyTor Arne Vestbø2022-06-021-32/+33
| | | | | Change-Id: Id80d7882e7076de2273e71b387bc6f8927d7b056 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Android: Fix for the permissions issue on the tst_QAudioSource testPekka Gehör2022-06-011-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 Pick-to: 6.2 6.3 Change-Id: I0b61232b5cb38c314913fa60c8bf2fd374b0468f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Drop audio and video frames when recording is pausedPiotr Srebrny2022-06-011-4/+8
| | | | | Change-Id: I447ad9517cb488ac2a50b14596d1ded8296b1555 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update dependencies on 'dev' in qt/qtmultimediaQt Submodule Update Bot2022-05-311-3/+3
| | | | | Change-Id: Ied62f9ec867ebe12fbe3c4c4784b4dc4d376ecb7 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fix a bug in the near field gain setterLars Knoll2022-05-311-1/+1
| | | | | | | | | The valid range in resonance audio is from 0-9. We map it to a 0-1 range in our API, meaning we need to multiply our number by 9, not divide by 9. Change-Id: Id10e408a4953d40c68dda0247ab11ed3370eae85 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Windows: fix media player position while rewindingAndré de la Rocha2022-05-311-4/+6
| | | | | | | Fixes: QTBUG-103853 Pick-to: 6.3 Change-Id: I606dbc06d3aa46d6b75d5189c3125cf789e5fda5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Android: fix for tst_qaudiodecoderbackend testPekka Gehör2022-05-311-8/+32
| | | | | | | | | | QRC files taken to use for Android. Added a few conditions for Android due to Android limitations. Fixes: QTBUG-99094 Pick-to: 6.2 6.3 Change-Id: I13afc038ab7f2ea725c2aa1180800fe1d33f53f4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Improve volume matching between Surround and Stereo modesLars Knoll2022-05-312-145/+147
| | | | | | | | | | | Stereo mode was quite a bit louder that Surround mode when sent to the same speaker array. This raises the volume of the surround decoder matrices by a factor of 1.5 which seems to approximately account for the volume difference between the modes. Change-Id: I6eb2db535449e17cf6d7c5e2c63cb60de3f34369 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Spatial Audio: Implement support for room reverb in surround modeLars Knoll2022-05-3111-66/+168
| | | | | | | | | | | | | | | | | | Resonance audio doesn't calculate any reverb when we ask for ambisonic output. The reason is that reverb is purely calculated using mono sources and a stereo output and is directly connected to the stereo mixer at the end of the pipeline. To fix this, gain access to private parts of resonance audio by compiling it with -Dprivate=public. That's ok, as we compile it purely as an internal library anyway. After that retrieve the audio data for the reverb component from the graph manager and add it at the end of the processing pipeline (after ambisonic decoding) to the different surround channels. Change-Id: Iaeeec8df7a963858b6ec0399948a55f89136964e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Patch resonance audio to give access to reverb dataLars Knoll2022-05-316-2/+32
| | | | | | | | | | | | | | | When retrieving the ambisonic sound field from resonance audio, that data does contain room reflections, but not reverb for the room. The reason is that reverb is directionally independent and resonance audio only calculates it in stereo. Work around this, by adding a small getter that allows us to retrieve the audio buffer that contains the reverb data. Change-Id: I6dd177293d38713ce29c40483dfc8d2409828fce Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix surround outputLars Knoll2022-05-312-10/+23
| | | | | | | | | | | Don't assume the QAudioSink has only two channels. Instead use the preferred channel configuration from the sink. Also set the buffer size according to the number of output channels to avoid stuttering. Change-Id: I7fe0b197d35019d363a64154a8e29a324291ce1c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Add a Surround mode to QAudioEngineLars Knoll2022-05-316-22/+33
| | | | | | | | | So far, we only had a Normal and Headphone mode here. Extend this to cover Surround configurations, and explicit Stereo mode and the Headphone mode. Change-Id: I086d02157d4edfd92e5b24076bee9a51bb5cc68a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix the data to decode ambisonic to surround speaker arraysLars Knoll2022-05-316-315/+266
| | | | | | | | | | | | | | | | | Use the correct channel order and normalization of the ambisonic channels. Resonance Audio expects Ambix compatible ordering (ie. ACN channel order) and normalization (SN3D). Specify that we want that ordering in the script generating the speaker data and normalize the factors correctly to SN3D. Add hand coded handling for Mono, Stereo, 2Dot1, 3Dot0 and 3Dot1 speaker configurations as those do not cover the area behind the listener and thus don't really qualify as a surround configuration. Change-Id: I905ddaa81938df918a460a7dea0526444836cdff Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Document the coordinate system being used by QAudioEngineLars Knoll2022-05-314-9/+26
| | | | | | | | And fix the example to correctly position the sound source around the listener. Change-Id: I66035e22a47902552f08e3dac0cb1ee31608bb59 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Avoid deadlock, don't emit signals while holding mutexPiotr Srebrny2022-05-271-0/+4
| | | | | | | | | | Emitting signals requires grabbing the event loop lock. This can lead to deadlock between Renderer and Decoder, which occurs when Decoder running from event loop tries to access Renderer that is emitting a signal. Change-Id: Ia1fdf06d37fd49e199ef1f1552a98f63aa757995 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update dependencies on 'dev' in qt/qtmultimediaQt Submodule Update Bot2022-05-271-3/+3
| | | | | Change-Id: I36dcaf688dc886bc2cf8d789da367f48e4eb2675 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Add missing qmake files for multimedia examplesPaul Olav Tvete2022-05-273-2/+24
| | | | | Change-Id: I7442b1e2bac663c560f37e35cb71a6aa6984d8b0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix compile error on videonode pluginTunahan Erkoyuncu2022-05-261-0/+2
| | | | | | | | Fixes compile error on imx6 toolchains that uses old version of gst. Pick-to: 5.15 Change-Id: Ic1c6d62355ab9208204583103e99a2c8b52acee2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Improve regex to account for dots and pluses in the library namesPiotr Srebrny2022-05-251-7/+7
| | | | | | Fixes: QTBUG-102645 Change-Id: I15c4ded5a1e68cb09c4d3afdf63f9ae7955fd5c0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix state transition in QGStreamerAudioSink::resume()Axel Spoerl2022-05-241-1/+1
| | | | | | | | | | | Calling resume() resulted in a state transition depending on the audio sink's mode: Transition to ActiveState in pull mode and to IdleState in push mode - even when there was audio playback remaining. This patch always transitions the state to ActiveState. State transitions to IdleState anyway, when the playback has finished. Change-Id: I34146eeab81f5d6629ac90c5153abc3e4e6e77c4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* API cleanups for spatial/3D audioLars Knoll2022-05-2435-742/+730
| | | | | | | | | Naming changes for the spatial audio API after reviewing it. Most of the names are now both shorter and better reflect the function they serve. Change-Id: I07347826f2fadf3d1705c597f35c168b19afe137 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Windows: Fix RTSP stream playbackAndré de la Rocha2022-05-242-3/+29
| | | | | | | | | | | Avoids changing the player topology for remote streams. Also improves handling of error conditions related to network streaming. Pick-to: 6.3 6.2 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>
* Extend fraction computation algorithm to numbers above 1 and below 0Piotr Srebrny2022-05-249-43/+136
| | | | | | | | | | This patch extends the algorithm for finding a real number numerator and denominator to numbers below 0 and above 1. It also improves interface by returning a pair of number. Additionally, it adds some basic test cases. Change-Id: I70f23a06a1cd2451242a53ec7c5e2fb90b9586bb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix compilation error on Windows caused by switch with only default casePiotr Srebrny2022-05-241-6/+5
| | | | | | Change-Id: I5a44923f78f0f5f842915a5d377c7db4d57a0acd Reviewed-by: Samuel Mira <samuel.mira@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update dependencies on 'dev' in qt/qtmultimediaQt Submodule Update Bot2022-05-241-3/+3
| | | | | Change-Id: I362f3836f3f17192192ec92ccd8417c105aa1c4c Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fix state transition in QPulseAudioSink::resume()Axel Spoerl2022-05-231-1/+1
| | | | | | | | | | | Calling resume() resulted in a state transition depending on the audio sink's mode: Transition to ActiveState in pull mode and to IdleState in push mode - even when there was audio playback remaining. This patch always transitions the state to ActiveState. State transitions to IdleState anyway, when the playback has finished. Change-Id: Idcd0be16929ea430cddc99a9a0284ea75e9b335b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Android: Enable FFmpeg playback - HW renderingSamuel Mira2022-05-237-1/+250
| | | | | | | | | This patch enables video playback on Android using Hardware rendering with FFmpeg backend. Task-number: QTBUG-102233 Change-Id: Ib9af89ef78e53846d0742a828a3ec5430a8a9f80 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* PulseAudio: fix sink transition to idleVolker Hilsheimer2022-05-232-1/+15
| | | | | | | | | | | | | | When the client writing to the sink has no more data, then the sink will keep rendering the data already written until it runs into buffer underflow. It will then call the relevant callback. At that point, check if the source device has reached the end. If it has, then wait for the stream to be drained before signalling the state change to idle. Pick-to: 6.3 Change-Id: If7d626ff2f31460abf61971e27f992db2af534a0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up QPulseAudioSink implementationVolker Hilsheimer2022-05-234-162/+161
| | | | | | | | | | | | | | Use categorized logging, with logging helpers converted to inline statics and using literal operators. Use member initialization and reorganize members to avoid padding. Remove unused data members, and replace the QTimer with a QBasicTimer, as QPlatformAudioSink is a QObject already. Minor changes to coding style. Pick-to: 6.3 Change-Id: I1aeb909fdcacea50bf9c80c0aeee7c9fa5c15020 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* spatial audio: Use centimeters by defaultLars Knoll2022-05-239-38/+109
| | | | | | | | | | | | | | | Qt Quick 3D uses a centimeters by default for positions and distances. Align our API with that choice. Add a distanceScale property to enable the user to choose a different scale. Store all our data internally in meters, to be aligned with the data expected by resonance audio and to make sure we don't mess up the existing configuration when the distance scale changes. Change-Id: Id06cb49bd152bfa7920c096c662ff103041261e0 Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
* QPulseAudioSource: fix UB (memcpy() called with nullptr dest) in read()Marc Mutz2022-05-201-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. Pick-to: 6.3 6.2 5.15 Change-Id: I9006b0e933e196a7a212e0ebe2bd27f6b9552518 Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
* Fix missing includesVille Voutilainen2022-05-183-0/+4
| | | | | | | | There's been recent header refactorings, this fixes the fallout. Pick-to: 6.3 6.2 Change-Id: Icc8158efc2560e958b365dde7286919037678fec Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Android: Enable FFmpeg playback - SW renderingSamuel Mira2022-05-185-1/+78
| | | | | | | | | | | | This patch enables video playback on Android using the FFmpeg backend. For now, just Software rendering with audio subsystem integration. Also, to get basic rendering working, this patch adds the conversion of content scheme URLs into qmediaplayer.cpp. Task-number: QTBUG-102232 Task-number: QTBUG-100474 Change-Id: I0e0efa8d05ad9c1bfaaedd2a18d6d2e7a163b999 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Add error signaling from VideoEncoderPiotr Srebrny2022-05-184-4/+10
| | | | | | | This patch adds signaling of encoder open error and processing error. Change-Id: I574e3d341bf63d1178ebcc4d054f415facfcff11 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Enable HW encoding on Windows for ffmpegPiotr Srebrny2022-05-184-2/+26
| | | | | | | | | | | | FFmpeg HW encoding uses COM objects in the COINIT_MULTITHREADED concurrency mode. However, the main thread configures access to COM in the COINIT_APARTMENTTHREADED mode with the call to OleInitialize, which is not compatible with FFmpeg. As the concurrency model is defined per thread, we can open the FFmpeg encoder in the encoder thread and let it configure its desired mode. Change-Id: I5c868f95c50228394ba87a9547083576cbdade4f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix mingw64 compliation error complaining about missing virtual destructPiotr Srebrny2022-05-181-0/+1
| | | | | Change-Id: Ibe4ac6e5ba5ad8b6f61a19140e3a10f2d911ff73 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Android: streamdecoder fix for mediacodecSamuel Mira2022-05-182-2/+22
| | | | | | | | | In android, avcodec_send_packet using mediacodec results some times in EAGAIN, and those packets have to be resent. Change-Id: I3234297f1f612c0921989338082397626910bd1d Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update dependencies on 'dev' in qt/qtmultimediaQt Submodule Update Bot2022-05-171-3/+3
| | | | | Change-Id: Ifaefedb6f16fa2e7948b53f0fa76f5b4abd431c3 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* QNX: re-enable SIMD on QNXRafael Roquetto2022-05-171-5/+0
| | | | | | | | | | | | | | The issue that required this chunk of CMake code was already addressed in the same commit that introduced it, namely, the missing parentheses on early patchsets pertraining to: #elif !defined(PFFFT_SIMD_DISABLE) && \ (((defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM)) && defined(__ARM_NEON__)) || \ defined(_M_ARM64) || defined(__aarch64__) || defined(__ARM64__)) Change-Id: Ib1df1952dd2ea4f0943d3cded80bb2474c463622 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Some smaller API fixes to QSpatialAudioSoundSourceLars Knoll2022-05-166-67/+74
| | | | | | | | Try to improve/clarify naming of properties. Change-Id: Idd610a95a196c127bfa0922f5a711ab2e483dcbf Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix a logic error when decoding sound in the spatial sound engineLars Knoll2022-05-161-7/+10
| | | | | | | | | | | The engine starts playback of files even if they are only partially loaded. In some cases, this could lead to the loops variable being incremented on a file that was not fully loaded yet, stopping playback early. Change-Id: I9147ab523b4775873214100a61eec39eac7148c5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io>
* Fix race condition in the ffmpeg audio decoderLars Knoll2022-05-163-13/+15
| | | | | | | | | | | Set the paused flag before sending the buffer to the application. Also make sure we lock the threads mutex before setting modifying the paused flag, to avoid race conditions between shouldWait() and the actual wait call. Change-Id: Ieac7432b5d25ea617ee29eacf745db6a5b8a29d5 Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Properly handle transmission through room wallsLars Knoll2022-05-168-27/+215
| | | | | | | | | | | Different wall materials will cause differnt dampening and occlusions of the sound sources behind. To ensure smooth transitions, use a switchover at the corners of the room. Change-Id: If9a12d1c4fec1c08cb7aba1097ac1562c9c6fb84 Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>