summaryrefslogtreecommitdiffstats
path: root/src/multimedia
Commit message (Collapse)AuthorAgeFilesLines
* Fix emitting 'reday to send' signals if mediaRecorder.autoStop enabledArtem Dyomin34 hours2-0/+3
| | | | | | | | | Media frame inputs shouldn't emit 'ready to send signals' after sending the last frame if mediaRecorder.autoStop is enabled. Pick-to: 6.8 Change-Id: Ib99f579b4b75ba7d6c8a08c11ae17eb2c1db2533 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* QSoundEffect: fix memory corruptionTim Blechmann3 days1-2/+1
| | | | | | | | | | | `QSample::release` was called multiple times: once from `QSoundEffect::setSource` and once from `SampleDeleter`. This caused asan failures. Fixes: QTBUG-125213 Pick-to: 6.5 6.7 6.8 Change-Id: Iaede2ca3c13143d468159097b312535f5dd4d085 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* PlatformMediaPlayer - silence clang-tidy warningsTim Blechmann4 days1-2/+2
| | | | | | Pick-to: 6.5 6.7 6.8 Change-Id: Id25ea00d1eab5e557cf4d170464ec791b0c4280e Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Implement QAudioBufferOutput, as a custom output for QMediaPlayerArtem Dyomin8 days8-0/+213
| | | | | | | | | | | | | | | | | | | | | | Users want to be able to visualize output audio data from QMediaPlayer. The current patch implements a mechnism allowing getting decoded audio data, so that users could visualize what they want. The class is a part of programmatic IO that we add in 6.8. The functionality will allow us to harden QtMM integration tests. [ChangeLog] Added QAudioBufferOutput allowing to get the decoded audio data from QMediaPlayer Task-number: QTBUG-111094 Change-Id: I5f83e7835965f1e7e47b138da0ce82f650abaa4b Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io> Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io> Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Add the property QMediaRecorder::autoStopArtem Dyomin8 days5-0/+52
| | | | | | | | | | | | | | | | | The property is supposed to help users to write a well-structured code. It means that users could just take care of pushing media frames to inputs and handling the end of the source streams. Thus, the user code that controls media inputs will only send frames there, and don't call QMediaRecorder::stop after all streams has been finished. The same qml property will allow users to follow a good declarative style instead of calling calling MediaRecorder::stop. [ChangeLog] Added the property QMediaRecorder::autoStop making the media recorder to stop at the and of input streams. Change-Id: Ifa136f6e125f039bf8b0667bf205f8686a201a89 Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Expose QAbstractVideoBuffer in public APIArtem Dyomin8 days10-88/+156
| | | | | | | | | | | | | | | | | | QAbstractVideoBuffer is needed for users to be able to provide custom data to QVideoFrame. We already have QAbstractVideoBuffer as a private implementation, and QAbstractVideoBuffer was public in Qt5. Currently, the video buffer doesn't provide any functionality to work with hw textures directly. If a user works with GPU textures, they will need to map/unmap it by overriding matching methods. [ChangeLog] Added QAbstractVideoBuffer that allows to provide custom data to QVideoFrame. Added a QVideoFrame's constructor taking QAbstractVideoBuffer. Change-Id: Iba5658f228a2373124c571ff8cf71595ef970b43 Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
* Fix documentation of QVideoFrame's constructorArtem Dyomin8 days1-8/+10
| | | | | | | | Fixed description of a policy of pixel data copying. Change-Id: If6cb3cc075e9625d7a7edba587027976617d3722 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
* Enhance mapping of QImageVideoBuffer: don't detach in read only modeArtem Dyomin8 days1-1/+4
| | | | | | | | | | | | We shouldn't detach image in read only mode to get round potential pixel copies if the user still hold the original image. The same approach already works for QMemoryVideoBuffer Pick-to: 6.7 6.5 Change-Id: I5334d69d1013178760ff535db8dda5fca1e7fd3e Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
* GStreamer: custom camera - add factory to create camera from elementTim Blechmann9 days1-0/+4
| | | | | | | | | | | Adding a new factory that allows application code to fully manage the `GstElement*` used in the QCaptureSession. Task-number: QTBUG-123495 Task-number: QTBUG-112999 Pick-to: 6.5 6.7 Change-Id: Ia37227e31102f62cf78562dca283b0bce7823720 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Rename MapData::nPlane => planeCount, size => dataSizeArtem Dyomin9 days4-32/+32
| | | | | | | | | | Preparation for exposing QAbstractVideoBuffer to the public API. New naming seems to be more consistent with the purpose of the variables. Change-Id: Iab1b45e52abf57508327034e2fef2134a30ef372 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Tim Blechmann <tim@klingt.org>
* Move MapMode debug output operator from qabstractvideobuffer_p.hArtem Dyomin10 days4-28/+24
| | | | | | | | | Preparation for exposing QAbstractVideoBuffer. The debug operator mustn't be in qabstractvideobuffer_p.h. Change-Id: I225f63debd9f6adffa04df4e043443feaf15bb08 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Tim Blechmann <tim@klingt.org>
* Android: doc update of deprecating the Android back-endRami Potinkara10 days1-0/+2
| | | | | | | | | [ChangeLog][Multimedia][Android] Deprecated MediaCodec Android back-end Task-number: QTBUG-125370 Change-Id: I4909d5d968b9aaeeaed6cda98ac5063e79d0dd98 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Deprecate internal methods of QVideoFrameArtem Dyomin11 days4-7/+28
| | | | | | | | | | | | | | | | | | We're going to expose QAbstractVideoBuffer, and the internal methods of QVideoFrame doesn't work well with it. - QVideoFrame::videoBuffer() is not needed as we don't want to get users access to it. - The constructor (QAbstractVideoBuffer*, QVideoFrameFormat) is not needed as we'll add a new one with unique_ptr instead. Let's use private API instead of the internal methods. The private construction also allows to avoid dynamic cast upon the construction. After adding public API, some of changes, especially in tests, might be reverted to use the new QVideoFrame's constructor. Change-Id: Id25d9e7faf9e88ce7f57492ba173dd168d6cf1de Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Move QHwVideoBuffer to a separate fileArtem Dyomin11 days7-50/+81
| | | | | | | Preparation for exposing QAbstractVideoBuffer Change-Id: I46e8bc095f39a2166baa9d34a6eb27cac6496377 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Add method format to QAbstractVideoBufferArtem Dyomin11 days3-0/+7
| | | | | | | | QAbstractVideoBuffer will hold the format instead of passing it to QVideoFrame's constructor. Change-Id: Ib75be337832f979aa2a4fac0193ab1c0918a3148 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Add QtVideo::MapMode, deprecate QVideoFrame::MapModeArtem Dyomin11 days13-77/+178
| | | | | | | | | | | | | | | QAbstractVideoBuffer is going to be exposed in the public API, and it will use MapMode, so the enum should be in a common namespace. The only drawback of the deprecation is that QVideoFrame::mapMode() still returns QVideoFrame::MapMode. However, calling the method will not cause deprecation warnings, because enum values are deprecated, not the enum as is. [ChangeLog] Added the namespace QtVideo::MapMode, deprecated QVideoFrame::MapMode. Change-Id: I5248c76c01f07a33f0f5a67e7db2d5072af5383d Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Decouple QAbstractVideoBuffer from hw related interfaceArtem Dyomin11 days9-72/+65
| | | | | | | It's a preparation to expose QAbstractVideoBuffer in the public API. Change-Id: I5c445b16120b45a3667b1359a1a171d1a227dd01 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Improve logging of loaded stubsArtem Dyomin2024-05-242-11/+15
| | | | | | | | | | | | VAAPI symbols can be loaded by plugin and by shared stub; Let's distinguish between logs in these cases. Amends 1f2171249486fdf6cb1f136e125aa54693e5f846 Pick-to: 6.7 6.5 Change-Id: Iac462dd7908210ee0f8896c13ab1858e5f932367 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
* Implement QAudioBufferInput and QVideoFrameInputArtem Dyomin2024-05-248-25/+380
| | | | | | | | | [ChangeLog] Added classes QAudioBufferInput and QVideoFrameInput allowing to send custom media data to QMediaRecorder. Task-number: QTBUG-125401 Change-Id: I8792f84e39f44eabb9349e3ea1d90c1b4cc971ca Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* GStreamer: introduce custom cameraTim Blechmann2024-05-241-0/+2
| | | | | | | | | | Adding support for custom cameras to QCaptureSession via `makeCustomGStreamerCamera`. Task-number: QTBUG-123495 Pick-to: 6.5 6.7 Change-Id: I2c9bfad1b1279de15e3b7a67cf41323ecf8c4983 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* GStreamer: better getter for QGStreamerPlatformSpecificInterfaceTim Blechmann2024-05-242-1/+8
| | | | | | Pick-to: 6.5 6.7 Change-Id: I57118ef632af4e409b4fbeb99113dad2d566bedc Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Remove QAbstractVideoBuffer::mapModeArtem Dyomin2024-05-237-24/+9
| | | | | | | | | | | | | We assume that QAbstractVideoBuffer::map returns non-empty value if the mapping was successful, so we may store mapMode in QVideoFramePrivate. Removing the method from QAbstractVideoBuffer makes the logic more straight, and helps to expose QAbstractVideoBuffer in the public API. Pick-to: 6.7 6.5 Change-Id: I91f81bcd12eb7f3c7e3495a4aa90a40615801641 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Fix buffer overruns and corrupt images with CPU YUV->RGB conversionJøger Hansegård2024-05-233-39/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | QVideoFrame::toImage could cause crash and corrupt images when YUV to RGB conversion was performed on the CPU with YUV formats. This was caused by logic errors in the YUV to RGB conversion code. This patch fixes this issue and adds tests to cover CPU conversion. From the reference images, we see that CPU conversion does not match the colors correctly, but this is a separate issue. Also, support for cpu conversion of Format_YUV420P10 is lacking. NOTE: QVideoFrame::toImage/qImageFromVideoFrame may still cause crash/ASAN/D3DValidation failures when the number of rows/columns in the QVideoFrame is 1. Some reference images are renamed because we switched to using the QVideoFrameFormat::pixelFormatToString function instead of maintaining a separate list of format names in the tests. This reduces duplication. Fixes: QTBUG-124537 Fixes: QTBUG-124534 Fixes: QTBUG-123749 Pick-to: 6.5 6.7 Change-Id: I5224e4b98a9ff5b5857e264c8907a4be3c5a9941 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* QPlatformmediaplayer: add debug output for `TrackType`Tim Blechmann2024-05-231-0/+20
| | | | | | Pick-to: 6.5 6.7 Change-Id: I3ae34ecef4c40e013948f36a6a12cc990d07a8cf Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* GStreamer: Camera - fix debug outputTim Blechmann2024-05-231-4/+6
| | | | | | | | | * there was no `orientation` argument * simplify enum->string conversion Pick-to: 6.5 6.7 Change-Id: Ibfe15b0b5df39485a1e058615e6700083b46f227 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Remove QAbstractVideoBuffer::underlyingBytearrayArtem Dyomin2024-05-223-10/+0
| | | | | | | | | | | | The idea to add the method hasn't made a difference. The data is delivered to the rendering pipeline without copy even without calling the method. Now the method is not used, let's remove it. Pick-to: 6.7 6.5 Change-Id: I794590fc727165857ee7bf794cfad0344cf601c4 Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* QMediaMetaData: clean up includesTim Blechmann2024-05-231-7/+8
| | | | | | | | Use include path with module and sort includes. Pick-to: 6.5 6.7 Change-Id: I8f351c6072738e9e158349738ac6d9a007b5b204 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* GStreamer: move `nativePipeline` to QGStreamerPlatformSpecificInterfaceTim Blechmann2024-05-227-34/+16
| | | | | | | | | | | | | Move the accessor for the underlying GstPipeline to QGStreamerPlatformSpecificInterface in order to make separate it out from the `QPlatformMediaPlayer` / `QPlatformMediaCaptureSession` classes. Pick-to: 6.5 6.7 Change-Id: I5825affc8b15fa6eabbd50ca3f3cc34cc1e4a9d6 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Document dynamic linking of FFmpeg on macOSJøger Hansegård2024-05-221-12/+12
| | | | | | | | | | | | | | | The FFmpeg backend now uses dynamic linking to FFmpeg libraries on macOS. This patch updates the documentation to reflect this. [ChangeLog] Document that FFmpeg media backend links dynamically to FFmpeg libraries on both Windows and macOS, and that applications using Qt Multimedia with the FFmpeg media backend must deploy shared FFmpeg libraries as part of their installers. Fixes: QTBUG-125552 Pick-to: 6.7 6.5 Change-Id: I312ed88804d3174ae012b519492dc364240ca2bd Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* GStreamer: pipeline - use std::chrono for position/durationTim Blechmann2024-05-221-0/+2
| | | | | | | | | The units are rather unsafe and a bit difficult to use reliably. So we completely convert the APIs to use std::chrono types. Pick-to: 6.5 6.7 Change-Id: Iab33af72baefadd97411dec35ad36641920afa8f Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Harden binding source to encoder in the RecordingEngineArtem Dyomin2024-05-218-32/+52
| | | | | | | | | | | | * used QMediaInputEncoderInterface instead of a functor * used functions connect***/disconnect*** to for consistency * added comments to the code Task-number: QTBUG-125401 Change-Id: I3e12bb4c0229fe9631b6608c66705703ce99aa1f Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
* Implement private classes for QVideoFrameInput and QAudioBufferInputArtem Dyomin2024-05-215-0/+263
| | | | | | | | | | | | | | The private classes will be used by public API in following CRs. Implemented logic of handling and emitting 'readyToSendFrame', and capture session changing, for both classes, QVideoFrameInput and QAudioBufferInput. Task-number: QTBUG-125401 Change-Id: Id86ec324017013fdd95454fe4adcabbc492e8bc5 Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io> Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Implement setters of custom media inputs in FFmpeg media capture sessionArtem Dyomin2024-05-212-0/+10
| | | | | | | | | | | The patch just adds setters that will be used upon implementing public functions. Task-number: QTBUG-125401 Change-Id: I4c530d832ac4c1a6600a9e596270124c7b01c1c5 Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Implement QPlatfromVideoFrameInput and QPlatfromAudioBufferInputArtem Dyomin2024-05-215-0/+145
| | | | | | | | | | | | | | | | The public API is likely to be QVideoFrameInput and QAudioBufferInput, so the naming is expected to be consistent; otherwise, we'll rename it later on. The patch implements a part of private functionality for custom media inputs, making the work with the media recorder. Task-number: QTBUG-125401 Change-Id: If9143d10f337986093ff9272b57dd30b2fc8f3da Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Doc: Add mention of QT_FFMPEG_PROTOCOL_WHITELISTMikko Hallamaa2024-05-211-0/+6
| | | | | | | | | | This patch adds a mention of QT_FFMPEG_PROTOCOL_WHITELIST in the documentation of QMediaPlayer::setSource(); Pick-to: 6.7 6.5 Change-Id: Id0021c7fb0544f0053800ad87b0abc5dcd2ad7aa Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* QMediaCaptureSession: make QMediaCaptureSessionPrivate a QObjectPrivateTim Blechmann2024-05-183-64/+97
| | | | | | | | | | Using the `QObjectPrivate` machinery for `QMediaCaptureSessionPrivate` to make it consistent with the rest of the codebase. Pick-to: 6.5 6.7 Change-Id: Ia725ac7fb8fbbed1f4e54baf060daa82a7d54094 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Android: Use AudioDeviceCallback to track changes in audio devicesBartlomiej Moskal2024-05-161-6/+2
| | | | | | | | | | | | | | | | | | | | Instead of using BroadcastReceiver with different filters, use AudioDeviceCallback[0] prepared for this purpose. Since we are interested in changes in audio devices, we should use the API prepared for this purpose. We shouldn't rely on BroadcastReceiver - especially for a Bluetooth case. After receiving intent about the connection of Bluetooth devices, AudioManager updates its list of connected devices with a delay. Therefore, we cannot assume that the device array will be updated immediately. That is why it is better to use AudioDeviceCallback. [0]https://developer.android.com/reference/android/media/AudioDeviceCallback Task-number: QTBUG-123044 Pick-to: 6.7 6.5 Change-Id: Ic2087f536a045562386be6a5862c3ce7968210e7 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Harden stub versions detectionArtem Dyomin2024-05-151-0/+29
| | | | | | | | | Added a compile time check, that the version detected by cmake and the version from headers are the same. Pick-to: 6.7 6.5 Change-Id: I7b169c005fab5d8cab1999d8f937ab561075b0d1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add abstract error functionality to the base class QPlatformVideoSourceArtem Dyomin2024-05-153-4/+7
| | | | | | | | The functionality is to be used in media recorder. Pick-to: 6.7 6.5 Change-Id: Id4248c3495f044f1b1a90058dceacdea172a1870 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Platform integration: introduce gstreamer-specific interface classTim Blechmann2024-05-154-4/+68
| | | | | | | | | | `QGStreamerPlatformSpecificInterface` allows developers to access gstreamer specific via a custom interface class. Pick-to: 6.5 6.7 Change-Id: If364ff9f9465476a7d9e55eb846e2e6e94ea7e83 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Rework dependencies stubs for FFmpegArtem Dyomin2024-05-143-0/+228
| | | | | | | | | | | | | | | | * Move the stub utils from the plugin to QtMM so that shared stubs could reuse them. * Make the stubs as singletons instead of a static object to address initialization races and allow lazy loading (it's optional now). * Decouple stubs definition: one file and singleton per stubbed lib. It gives us an advantage to create shared stubs separately, they are to be implemented in the next CR. Task-number: QTBUG-120990 Pick-to: 6.7 6.5 Change-Id: I2158a49073b1e66d1bbfcb993b7746a4bd45048f Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Move camera error to QPlatformCameraArtem Dyomin2024-05-145-22/+26
| | | | | | | | | | | The patch allows to implement errors interface in QPlatformVideoSource. The error interface will help to handle postpone initialization of the recorder. Pick-to: 6.7 6.5 Change-Id: Ia769a85501e7997b8bc61323784b128d6542631a Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Add HasHdrContent to QMediaMetaData::Key enumerationJøger Hansegård2024-05-142-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | The HasHdrContent metadata key can be used to determine if a video track potentially contains HDR video. QMediaMetaData::value(QMediaMetaData::HasHdrContent) will return true when the decoder reports that the video uses ColorTransfer_ST2084 or ColorTransfer_STD_B67. These are color transfers used with Dolby Vision videos, for example HDR video recorded with an iPhone. Note that even if HasHdrContent is true, the video may still not utilize the extended dynamic range. This simplified approach is chosen because it is fast, and does not require decoding video frames to determine the actual range being used. Qt Multimedia still does not support proper display of HDR content, but the new metadata key can be used to determine if the video is a SDR video that will be presented correctly. Supported on FFmpeg media backend only. Fixes: QTBUG-114427 Change-Id: I7361d8c61838a66a61d18a2b9e6c8d75a6bdbdb8 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Tim Blechmann <tim@klingt.org>
* ALSA: fix surround device detectionTim Blechmann2024-05-142-39/+19
| | | | | | | | | | | | `QAlsaAudioDeviceInfo::checkSurround` did not check if a specific device is a surround device, but if any device is a surround device. This is both wrong and inefficient. Instead it is better to check the device name directly. Pick-to: 6.5 6.7 Change-Id: Id8dbcd5831d27cf5781a28c815a675cd501d4172 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
* Doc: Update the limitations section of QScreenCapture documentationMikko Hallamaa2024-05-141-6/+9
| | | | | | | | | | | | | | | | QScreenCapture documentation has a section about current limitations, which was outdated especially when it comes to EGLFS screen capture implementation. This patch adds mentions of the following: * Screen capture implementation on EGLFS is working. * Capture frame rate on EGLFS is locked to 30 FPS. * Screen capture when using Wayland compositor is still not supported. Task-number: QTBUG-125031 Pick-to: 6.7 Change-Id: I22b502d4b7ebe12e6dd80b82fdaa120a7508bb5d Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Add methods QVideoFrame::streamFrameRate and setStreamFrameRateArtem Dyomin2024-05-102-0/+20
| | | | | | | | | | | | | | Users need to be able to modify underlying QVideoFrameFormat::streamFrameRate, it's needed for working custom video input, when the user gets QVideoFrame from QVideoSink and wants to set a new stream frame rate for the format and send it to custom video input. [ChangeLog][QVideoFrame] Added the property 'streamFrameRate' to QVideoFrame. Change-Id: I061eac1f1ecdb0828ef079cee14e0871181fdd08 Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Add rotation property to QVideoFrameFormatArtem Dyomin2024-05-104-4/+26
| | | | | | | | | | | | | | | We initialize QMediaRecorder by its properties and matching QVideoFrameFormat of the source. That's why, we need the property in QVideoFrameFormat for proper initialization. Note, we already have 'isMirrored' in QVideoFrameFormat, 'mirrored' in QVideoFrame, 'rotation' in QVideoFrame, so adding rotation to QVdieoFrameFormat looks consistent. [ChangeLog][QVideoFrameFormat] Added the property 'rotation' to QVideoFrameFormat. Change-Id: I62abd2e8a1ade4e1e2144c2adc6bc6606828af88 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Use correct stride factor with YUV420P10 pixel formatJøger Hansegård2024-05-101-1/+1
| | | | | | | | | | | | | | | | | | YUV420P10 assumes 16 bits per component (of which 10 is used). This patch changes the stride factor from 1 to 2 with Format_YUV420P10 to reflect the 16 bit word size. The tests are also extended to cover most pixel formats supported by QVideoFrame. [ChangeLog] Fix display of videos using YUV420P10 pixel format Task-number: QTBUG-124537 Task-number: QTBUG-124534 Task-number: QTBUG-123749 Pick-to: 6.5 6.7 Change-Id: I289b33dc2b553cc3b8b6bc4b43831eb75c277129 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Simplify color management tests by using FFmpeg color conversionJøger Hansegård2024-05-102-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces custom conversion RGB to YUV conversion code used only for tests with FFmpeg libswscale code. This makes it easier to extend the tests with more pixel formats, and allow us to generate realistic output images with correct color space and transfer. The idea of this is that all reference images should now be equal, apart from quantization errors from full vs limited range signals. In truth, they are not exactly the same, and some color discrepancy remains. Comments are added to the tests to address this. Note that the maximum pixel diff threshold had to be adjusted because of numerical inaccuracies on some platforms. Also, the reference image has been reduced in size to reduce amount of space required for the reference images. In addition, the image is now even width and height because odd width/height images are not supported with chroma subsampling. Task-number: QTBUG-124537 Task-number: QTBUG-124534 Task-number: QTBUG-123749 Pick-to: 6.7 6.5 Change-Id: I0a36255de4acd75e61df0bb934d65ccff0ead063 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Rename QVideoFrameFormat::frameRate => streamFrameRateArtem Dyomin2024-05-103-3/+28
| | | | | | | | | | The name 'frameRate' is not consistent with QVideoFrameFormat, 'streamFrameRate' works much better. [ChangeLog][QVideoFrameFormat] Renamed the property QVideoFrameFormat::frameRate to QVideoFrameFormat::streamFrameRate. Change-Id: I03413f15669de471371e6ed42ce948c22d1b5f5f Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>