Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qffmpegaudioinput_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 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#ifndef QFFMPEGAUDIOINPUT_H
4#define QFFMPEGAUDIOINPUT_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists purely as an
11// implementation detail. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include <private/qplatformaudioinput_p.h>
18#include "qffmpegthread_p.h"
19#include <qaudioinput.h>
20
22
23class QAudioSource;
24class QAudioBuffer;
25namespace QFFmpeg {
26class AudioSourceIO;
27}
28
29constexpr int DefaultAudioInputBufferSize = 4096;
30
32{
34public:
37
38 void setAudioDevice(const QAudioDevice &/*device*/) override;
39 void setMuted(bool /*muted*/) override;
40 void setVolume(float /*volume*/) override;
41
42 void setFrameSize(int frameSize);
43 void setRunning(bool b);
44
45 int bufferSize() const;
46
49
50private:
51 QFFmpeg::AudioSourceIO *audioIO = nullptr;
52 std::unique_ptr<QThread> inputThread;
53};
54
56
57
58#endif // QPLATFORMAUDIOINPUT_H
\inmodule QtMultimedia
The QAudioDevice class provides an information about audio devices and their functionality.
\qmltype AudioInput \instantiates QAudioInput
Definition qaudioinput.h:19
The QAudioSource class provides an interface for receiving audio data from an audio input device.
void newAudioBuffer(const QAudioBuffer &buffer)
void setFrameSize(int frameSize)
void setAudioDevice(const QAudioDevice &) override
void setVolume(float) override
void setMuted(bool) override
QFFmpegAudioInput(QAudioInput *qq)
\inmodule QtCore
Definition qobject.h:103
Combined button and popup list for selecting options.
constexpr int DefaultAudioInputBufferSize
GLboolean GLboolean GLboolean b
GLenum GLuint buffer
static constexpr QSize frameSize(const T &frame)
#define Q_OBJECT
#define Q_SIGNALS