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
qffmpegmediaformatinfo_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 QFFmpegMediaFormatInfo_H
5#define QFFmpegMediaFormatInfo_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 <QtMultimedia/private/qplatformmediaformatinfo_p.h>
19#include <qhash.h>
20#include <qlist.h>
21#include <qaudioformat.h>
22#include <QtFFmpegMediaPluginImpl/private/qffmpeg_p.h>
23
24QT_BEGIN_NAMESPACE
25
26class QFFmpegMediaFormatInfo : public QPlatformMediaFormatInfo
27{
28public:
29 QFFmpegMediaFormatInfo();
30 ~QFFmpegMediaFormatInfo() override;
31
32 static QMediaFormat::VideoCodec videoCodecForAVCodecId(AVCodecID id);
33 static QMediaFormat::AudioCodec audioCodecForAVCodecId(AVCodecID id);
34 static QMediaFormat::FileFormat fileFormatForAVInputFormat(const AVInputFormat &format);
35
36 static const AVOutputFormat *outputFormatForFileFormat(QMediaFormat::FileFormat format);
37
38 static AVCodecID codecIdForVideoCodec(QMediaFormat::VideoCodec codec);
39 static AVCodecID codecIdForAudioCodec(QMediaFormat::AudioCodec codec);
40
41 static QAudioFormat::SampleFormat sampleFormat(AVSampleFormat format);
42 static AVSampleFormat avSampleFormat(QAudioFormat::SampleFormat format);
43
44 static int64_t avChannelLayout(QAudioFormat::ChannelConfig channelConfig);
45 static QAudioFormat::ChannelConfig channelConfigForAVLayout(int64_t avChannelLayout);
46
47 static QAudioFormat audioFormatFromCodecParameters(const AVCodecParameters &codecPar);
48};
49
50QT_END_NAMESPACE
51
52#endif
\inmodule QtMultimedia
The QAudioFormat class stores audio stream parameter information.
constexpr bool isValid() const noexcept
Returns true if all of the parameters are valid.
RenderingResult pushFrameToOutput(const Frame &frame)
Microseconds durationForBytes(qsizetype bytes) const
RenderingResult renderInternal(Frame frame) override
void updateOutputs(const Frame &frame)
void setPitchCompensation(bool enabled)
std::chrono::milliseconds timerInterval() const override
void setOutput(QAudioBufferOutput *bufferOutput)
void initAudioFrameConverter(const Frame &frame)
void updateSynchronization(const SynchronizationStamp &stamp, const Frame &frame)
void onAudioSinkStateChanged(QAudio::State state)
void setOutput(QAudioOutput *output)
void pushFrameToBufferOutput(const Frame &frame)
Microseconds bufferLoadingTime(const SynchronizationStamp &syncStamp) const
std::conditional_t< QT_FFMPEG_AVIO_WRITE_CONST, const uint8_t *, uint8_t * > AvioWriteBufferType