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
emit rhiChanged();
24
}
25
26
void
QFFmpegVideoSink
::
onVideoFrameChanged
(
const
QVideoFrame &frame)
27
{
28
QMutexLocker guard { &m_rhiMutex };
29
auto
*buffer = QVideoFramePrivate::hwBuffer(frame);
30
if
(buffer && m_rhi)
31
buffer->initTextureConverter(*m_rhi);
32
}
33
34
QT_END_NAMESPACE
35
36
#
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
QPlatformGraphicsBufferHelper
\inmodule QtGui
qtmultimedia
src
plugins
multimedia
ffmpeg
qffmpegvideosink.cpp
Generated on
for Qt by
1.14.0