From 954053c17cb53b41c8ecf8cb794898c89fdef5e4 Mon Sep 17 00:00:00 2001 From: Nicholas Bennett Date: Fri, 12 May 2023 15:14:46 +0300 Subject: Docs: Add note about YUV420P format with FFMPEG backend on Android Being a generic format, we can receive either a fully planar 4:2:0 - YUV420P or a semiplanar NV12/NV21. That will depend on the codec implemented in the device, so device-dependent. Fixes: QTBUG-112454 Pick-to: 6.5 6.5.1 Change-Id: Iebebca8d3d2bb5b540f92ec87b536dcb49ec7e4f Reviewed-by: Mats Honkamaa --- src/multimedia/camera/qcamera.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/multimedia/camera/qcamera.cpp b/src/multimedia/camera/qcamera.cpp index 928217bd2..ca9200b04 100644 --- a/src/multimedia/camera/qcamera.cpp +++ b/src/multimedia/camera/qcamera.cpp @@ -460,6 +460,11 @@ void QCamera::setCameraDevice(const QCameraDevice &cameraDevice) Gets or sets the currently active camera format. + \note When using the FFMPEG backend on an Android target device if you request + \b YUV420P format, you will receive either a fully planar 4:2:0 YUV420P or a + semi-planar NV12/NV21. This depends on the codec implemented by the device + OEM. + \sa cameraDevice::videoFormats */ @@ -468,6 +473,11 @@ void QCamera::setCameraDevice(const QCameraDevice &cameraDevice) Returns the camera format currently used by the camera. + \note When using the FFMPEG backend on an Android target device if you request + \b YUV420P format, you will receive either a fully planar 4:2:0 YUV420P or a + semi-planar NV12/NV21. This depends on the codec implemented by the device + OEM. + \sa QCameraDevice::videoFormats */ QCameraFormat QCamera::cameraFormat() const @@ -477,8 +487,13 @@ QCameraFormat QCamera::cameraFormat() const } /*! - Tells the camera to use the format desribed by \a format. This can be used to define - as specific resolution and frame rate to be used for recording and image capture. + Tells the camera to use the format described by \a format. This can be used to define + a specific resolution and frame rate to be used for recording and image capture. + + \note When using the FFMPEG backend on an Android target device if you request + \b YUV420P format, you will receive either a fully planar 4:2:0 YUV420P or a + semi-planar NV12/NV21. This depends on the codec implemented by the device + OEM. */ void QCamera::setCameraFormat(const QCameraFormat &format) { -- cgit v1.2.1