Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qffmpegavaudioformat_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
QFFMPEGAVAUDIOFORMAT_P_H
5
#
define
QFFMPEGAVAUDIOFORMAT_P_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
<
QtFFmpegMediaPluginImpl
/
private
/
qffmpegdefs_p
.
h
>
19
#
include
<
QtMultimedia
/
private
/
qtmultimediaglobal_p
.
h
>
20
21
#
if
QT_FFMPEG_HAS_AV_CHANNEL_LAYOUT
22
[[maybe_unused]]
static
inline
bool
operator==(
const
AVChannelLayout &lhs,
23
const
AVChannelLayout &rhs)
24
{
25
return
lhs.order == rhs.order && lhs.nb_channels == rhs.nb_channels && lhs.u.mask == rhs.u.mask;
26
}
27
28
[[maybe_unused]]
static
inline
bool
operator!=(
const
AVChannelLayout &lhs,
29
const
AVChannelLayout &rhs)
30
{
31
return
!(lhs == rhs);
32
}
33
34
#
endif
35
36
QT_BEGIN_NAMESPACE
37
38
class
QAudioFormat;
39
40
namespace
QFFmpeg
{
41
42
struct
AVAudioFormat
43
{
44
explicit
AVAudioFormat
(
const
AVCodecContext *context);
45
explicit
AVAudioFormat
(
const
AVCodecParameters *codecPar);
46
explicit
AVAudioFormat
(
const
QAudioFormat
&audioFormat);
47
48
#
if
QT_FFMPEG_HAS_AV_CHANNEL_LAYOUT
49
AVChannelLayout
channelLayout
;
50
#
else
51
uint64_t
channelLayoutMask
;
52
#
endif
53
AVSampleFormat
sampleFormat
;
54
int
sampleRate
;
55
};
56
57
bool
operator
==(
const
AVAudioFormat
&lhs,
const
AVAudioFormat
&rhs);
58
59
inline
bool
operator
!=(
const
AVAudioFormat
&lhs,
const
AVAudioFormat
&rhs)
60
{
61
return
!(lhs
==
rhs);
62
}
63
64
QDebug
operator
<<(
QDebug
,
const
AVAudioFormat
&);
65
66
}
// namespace QFFmpeg
67
68
QT_END_NAMESPACE
69
70
#
endif
// QFFMPEGAVAUDIOFORMAT_P_H
QAudioFormat
The QAudioFormat class stores audio stream parameter information.
Definition
qaudioformat.h:22
QAudioFormat::sampleRate
constexpr int sampleRate() const noexcept
Returns the current sample rate in Hertz.
Definition
qaudioformat.h:88
QFFmpeg
Definition
qandroidcacertificates.cpp:26
QFFmpeg::operator==
bool operator==(const AVAudioFormat &lhs, const AVAudioFormat &rhs)
Definition
qffmpegavaudioformat.cpp:67
QFFmpeg::operator!=
bool operator!=(const AVAudioFormat &lhs, const AVAudioFormat &rhs)
Definition
qffmpegavaudioformat_p.h:59
QFFmpeg::operator<<
QDebug operator<<(QDebug dbg, const AVAudioFormat &format)
Definition
qffmpegavaudioformat.cpp:78
QFFmpeg::AVAudioFormat
Definition
qffmpegavaudioformat_p.h:43
QFFmpeg::AVAudioFormat::AVAudioFormat
AVAudioFormat(const AVCodecContext *context)
Definition
qffmpegavaudioformat.cpp:18
QFFmpeg::AVAudioFormat::sampleFormat
AVSampleFormat sampleFormat
Definition
qffmpegavaudioformat_p.h:53
QFFmpeg::AVAudioFormat::AVAudioFormat
AVAudioFormat(const QAudioFormat &audioFormat)
Definition
qffmpegavaudioformat.cpp:50
QFFmpeg::AVAudioFormat::sampleRate
int sampleRate
Definition
qffmpegavaudioformat_p.h:54
QFFmpeg::AVAudioFormat::channelLayoutMask
uint64_t channelLayoutMask
Definition
qffmpegavaudioformat_p.h:51
qtmultimedia
src
plugins
multimedia
ffmpeg
qffmpegavaudioformat_p.h
Generated on
for Qt by
1.18.0