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
qffmpegaudiodecoder_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
4#ifndef QFFMPEGAUDIODECODER_H
5#define QFFMPEGAUDIODECODER_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "private/qplatformaudiodecoder_p.h"
19#include <qffmpeg_p.h>
20#include <qurl.h>
21
23
24namespace QFFmpeg {
25class AudioDecoder;
26}
27
29{
31
32public:
35
36 QUrl source() const override;
37 void setSource(const QUrl &fileName) override;
38
39 QIODevice *sourceDevice() const override;
40 void setSourceDevice(QIODevice *device) override;
41
42 void start() override;
43 void stop() override;
44
45 QAudioFormat audioFormat() const override;
46 void setAudioFormat(const QAudioFormat &format) override;
47
48 QAudioBuffer read() override;
49
50public Q_SLOTS:
51 void newAudioBuffer(const QAudioBuffer &b);
52 void done();
53 void errorSignal(int err, const QString &errorString);
54
55private:
56 using AudioDecoder = QFFmpeg::AudioDecoder;
57
58 QUrl m_url;
59 QIODevice *m_sourceDevice = nullptr;
60 std::unique_ptr<AudioDecoder> m_decoder;
61 QAudioFormat m_audioFormat;
62
63 QAudioBuffer m_audioBuffer;
64};
65
67
68#endif // QFFMPEGAUDIODECODER_H
IOBluetoothDevice * device
\inmodule QtMultimedia
The QAudioDecoder class implements decoding audio.
The QAudioFormat class stores audio stream parameter information.
void setSource(const QUrl &fileName) override
void newAudioBuffer(const QAudioBuffer &b)
QIODevice * sourceDevice() const override
void errorSignal(int err, const QString &errorString)
QAudioFormat audioFormat() const override
void setAudioFormat(const QAudioFormat &format) override
virtual ~QFFmpegAudioDecoder()
QFFmpegAudioDecoder(QAudioDecoder *parent)
QAudioBuffer read() override
void setSourceDevice(QIODevice *device) override
QUrl source() const override
\inmodule QtCore \reentrant
Definition qiodevice.h:34
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
GLboolean GLboolean GLboolean b
GLint GLsizei GLsizei GLenum format
#define Q_OBJECT
#define Q_SLOTS