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
qffmpegvideosink.cpp
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
#
include
<
qffmpegvideosink_p
.
h
>
4
#
include
<
qffmpegvideobuffer_p
.
h
>
5
#
include
<
private
/
qvideoframe_p
.
h
>
6
7
QT_BEGIN_NAMESPACE
8
9
QFFmpegVideoSink
::
QFFmpegVideoSink
(
QVideoSink
*
sink
)
10
: QPlatformVideoSink(sink)
11
{
12
}
13
14
void
QFFmpegVideoSink
::
setRhi
(QRhi *rhi)
15
{
16
{
17
QMutexLocker guard{ &m_rhiMutex };
18
if
(m_rhi == rhi)
19
return
;
20
m_rhi = rhi;
21
}
22
23
Q_EMIT rhiChanged();
24
}
25
26
void
QFFmpegVideoSink
::
onVideoFrameChanged
(
const
QVideoFrame &frame)
27
{
28
auto
*buffer = QVideoFramePrivate::hwBuffer(frame);
29
if
(!buffer)
30
return
;
31
32
withRhi([&](QRhi *rhi) {
33
if
(rhi)
34
buffer->initTextureConverter(*rhi);
35
});
36
}
37
38
QT_END_NAMESPACE
39
40
#
include
"moc_qffmpegvideosink_p.cpp"
QFFmpegVideoSink
Definition
qffmpegvideosink_p.h:28
QFFmpegVideoSink::onVideoFrameChanged
void onVideoFrameChanged(const QVideoFrame &frame) override
Definition
qffmpegvideosink.cpp:26
QFFmpegVideoSink::setRhi
void setRhi(QRhi *rhi) override
Definition
qffmpegvideosink.cpp:14
QVideoSink
The QVideoSink class represents a generic sink for video data.
Definition
qvideosink.h:22
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtmultimedia
src
plugins
multimedia
ffmpeg
qffmpegvideosink.cpp
Generated on
for Qt by
1.16.1