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
qplatformaudiobufferinput_p.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 QPLATFORMAUDIOBUFFERINPUT_P_H
5#define QPLATFORMAUDIOBUFFERINPUT_P_H
6
7#include <QtMultimedia/qaudioformat.h>
8#include <QtMultimedia/qaudiobuffer.h>
9
10//
11// W A R N I N G
12// -------------
13//
14// This file is not part of the Qt API. It exists purely as an
15// implementation detail. This header file may change from version to
16// version without notice, or even be removed.
17//
18// We mean it.
19//
20
22
24
25class Q_MULTIMEDIA_EXPORT QAudioBufferSource : public QObject
26{
27 Q_OBJECT
28Q_SIGNALS:
29 void newAudioBuffer(const QAudioBuffer &buffer);
30};
31
32class Q_MULTIMEDIA_EXPORT QPlatformAudioBufferInput : public QAudioBufferSource
33{
34 Q_OBJECT
35public:
36 QPlatformAudioBufferInput(const QAudioFormat &format = {}) : m_format(format) { }
37
38 const QAudioFormat &audioFormat() const { return m_format; }
39
40 QMediaInputEncoderInterface *encoderInterface() const { return m_encoderInterface; }
41 void setEncoderInterface(QMediaInputEncoderInterface *encoderInterface)
42 {
43 m_encoderInterface = encoderInterface;
44 }
45
46Q_SIGNALS:
47 void encoderUpdated();
48
49private:
50 QMediaInputEncoderInterface *m_encoderInterface = nullptr;
51 QAudioFormat m_format;
52};
53
54QT_END_NAMESPACE
55
56#endif // QPLATFORMAUDIOBUFFERINPUT_P_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