Android: Pass resolution from QImageCapture to still image reader


QImageCapture allows setting image resolution, but this wasn't fully
utilized by the capturing pipeline which was set up with the preview
resolution.

Add QAndroidCamera::setStillCaptureResolution, called from the new
QFFmpegImageCapture::applySettingsToVideoSource() hook. Use this to
create the still ImageReader at the requested resolution, if supported.

Changing the resolution requires switching the CaptureSession, as
readers in the previous one don't support other resolutions. Callbacks
of a replaced session are ignored, so events from an old CaptureSession
don't interfere after swapping to a new one. If the swap fails, restart
the camera as a fallback.

Fixes: QTBUG-149925
Pick-to: 6.12
Change-Id: I9f8a45dd4a6ffef59c93a48d53ae8d32e6fa50e6
Reviewed-by: Nils Petter Skålerud <nils.petter.skalerud@qt.io>
commit5a6aaf898feefa8bae19834b002d817c88c4a7cf
parent482e18fb3312db70d5913278ad1161f78ea048df
authorMikko Hallamaa <mikko.hallamaa@qt.io>
committerMikko Hallamaa <mikko.hallamaa@qt.io>
commit timeFri, 9 Oct 2026 07:12:35 +0000