Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qaudiobufferinput.h
Go to the documentation of this file.
1// Copyright (C) 2024 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QAUDIOBUFFERINPUT_H
5#define QAUDIOBUFFERINPUT_H
6
7#include <QtMultimedia/qtmultimediaexports.h>
8#include <QtMultimedia/qaudiobuffer.h>
9#include <QtCore/qobject.h>
10
11QT_BEGIN_NAMESPACE
12
13class QPlatformAudioBufferInput;
15class QMediaCaptureSession;
16
17class Q_MULTIMEDIA_EXPORT QAudioBufferInput : public QObject
18{
19 Q_OBJECT
20public:
21 explicit QAudioBufferInput(QObject *parent = nullptr);
22
23 explicit QAudioBufferInput(const QAudioFormat &format, QObject *parent = nullptr);
24
25 ~QAudioBufferInput() override;
26
27 bool sendAudioBuffer(const QAudioBuffer &audioBuffer);
28
29 QAudioFormat format() const;
30
31 QMediaCaptureSession *captureSession() const;
32
33Q_SIGNALS:
34 void readyToSendAudioBuffer();
35
36private:
37 void setCaptureSession(QMediaCaptureSession *captureSession);
38
39 QPlatformAudioBufferInput *platformAudioBufferInput() const;
40
41 friend class QMediaCaptureSession;
42 Q_DISABLE_COPY(QAudioBufferInput)
43 Q_DECLARE_PRIVATE(QAudioBufferInput)
44};
45
46QT_END_NAMESPACE
47
48#endif // QAUDIOBUFFERINPUT_H
void updateCaptureSessionConnections(QMediaCaptureSession *prevSession, QMediaCaptureSession *newSession) override
QMediaCaptureSession * session() const
bool sendAudioBuffer(const QAudioBuffer &audioBuffer)
bool checkIfCanSendMediaFrame() const override
QPlatformAudioBufferInput * platfromAudioBufferInput() const
QAudioBufferInputPrivate(QAudioBufferInput *q)
void initialize(const QAudioFormat &format={})
void emitReadyToSendMediaFrame() override
\inmodule QtMultimedia
QMediaCaptureSession * captureSession() const
Combined button and popup list for selecting options.