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
qffmpegaudioframeconverter_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 QFFMPEGAUDIOFRAMECONVERTER_P_H
4#define QFFMPEGAUDIOFRAMECONVERTER_P_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 <QtMultimedia/qaudiobuffer.h>
18
19extern "C" {
20#include <libavutil/frame.h>
21}
22
23#include <memory>
24
25QT_BEGIN_NAMESPACE
26
27class QFFmpegResampler;
28
29namespace QFFmpeg {
30
32{
34 virtual QAudioBuffer convert(AVFrame *) = 0;
35};
36
37struct Frame;
38
40 const QAudioFormat &outputFormat);
41
43makeTrivialAudioFrameConverter(const Frame &frame, QAudioFormat outputFormat, float playbackRate);
44
46makePitchShiftingAudioFrameConverter(const Frame &frame, QAudioFormat outputFormat,
47 float playbackRate);
48
49} // namespace QFFmpeg
50
51QT_END_NAMESPACE
52
53#endif // QFFMPEGAUDIOFRAMECONVERTER_P_H
std::unique_ptr< QFFmpegResampler > createResampler(const Frame &frame, const QAudioFormat &outputFormat)
std::unique_ptr< AbstractAudioFrameConverter > makePitchShiftingAudioFrameConverter(const Frame &frame, QAudioFormat outputFormat, float playbackRate)
std::conditional_t< QT_FFMPEG_AVIO_WRITE_CONST, const uint8_t *, uint8_t * > AvioWriteBufferType
std::unique_ptr< AbstractAudioFrameConverter > makeTrivialAudioFrameConverter(const Frame &frame, QAudioFormat outputFormat, float playbackRate)
virtual QAudioBuffer convert(AVFrame *)=0