From d5b87ad6554a674aa38a3d301918a49f5baf57a7 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 4 Jun 2021 15:58:15 +0200 Subject: Use QAudioInput in QMediaCaptureSession MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convert the audioInput property to use a pointer to a QAudioInput in line with the API changes planned. Not setting up a QAudioInput implies that you do not get any audio. Move the volume and muted properties over to QAudioInput, they should really not be part of the QMediaCaptureSession. Adjust the platform API accordingly and adjust implementations. The Android adaptation is incomplete, but that was the case before as well. This needs some refactoring to properly support setting devices and adjusting volume/muted. Dynamically adjusting to changes of the audio input device is not yet implemented on Windows. Change-Id: I2fb63b9e57908d6dc02130b8d534ef7ac1a1ac85 Reviewed-by: André de la Rocha Reviewed-by: Volker Hilsheimer --- examples/multimediawidgets/camera/camera.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'examples/multimediawidgets/camera/camera.h') diff --git a/examples/multimediawidgets/camera/camera.h b/examples/multimediawidgets/camera/camera.h index 95e436744..c30927deb 100644 --- a/examples/multimediawidgets/camera/camera.h +++ b/examples/multimediawidgets/camera/camera.h @@ -58,6 +58,7 @@ #include #include #include +#include #include @@ -133,6 +134,7 @@ private: QMediaDevices m_devices; QMediaCaptureSession m_captureSession; QScopedPointer m_camera; + QScopedPointer m_audioInput; QCameraImageCapture *m_imageCapture; QScopedPointer m_mediaEncoder; -- cgit v1.2.3