diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-06-04 15:58:15 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-06-11 15:12:28 +0200 |
commit | d5b87ad6554a674aa38a3d301918a49f5baf57a7 (patch) | |
tree | a2d28e0f72142a13ca602c1ef927f3a81a15eee7 /examples/multimediawidgets/camera/camera.h | |
parent | 9fd208f11a218d8a8b07fc525258eea3b3596d62 (diff) |
Use QAudioInput in QMediaCaptureSession
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 <andre.rocha@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples/multimediawidgets/camera/camera.h')
-rw-r--r-- | examples/multimediawidgets/camera/camera.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 <QMediaMetaData> #include <QMediaCaptureSession> #include <QMediaDevices> +#include <QAudioInput> #include <QMainWindow> @@ -133,6 +134,7 @@ private: QMediaDevices m_devices; QMediaCaptureSession m_captureSession; QScopedPointer<QCamera> m_camera; + QScopedPointer<QAudioInput> m_audioInput; QCameraImageCapture *m_imageCapture; QScopedPointer<QMediaEncoder> m_mediaEncoder; |