Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qffmpegsubtitlerenderer.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
5
6#include "qvideosink.h"
7#include "qdebug.h"
8
10
11namespace QFFmpeg {
12
17
19{
20 setOutputInternal(m_sink, sink, [cleanPrevSink](QVideoSink *prev) {
21 if (prev && cleanPrevSink)
22 prev->setSubtitleText({});
23 });
24}
25
27{
28 if (m_sink)
29 m_sink->setSubtitleText({});
30}
31
33{
34 if (m_sink)
35 m_sink->setSubtitleText(frame.isValid() ? frame.text() : QString());
36
37 return {};
38}
39
40} // namespace QFFmpeg
41
43
44#include "moc_qffmpegsubtitlerenderer_p.cpp"
void setOutputInternal(QPointer< Output > &actual, Output *desired, ChangeHandler &&changeHandler)
SubtitleRenderer(const TimeController &tc, QVideoSink *sink)
RenderingResult renderInternal(Frame frame) override
void setOutput(QVideoSink *sink, bool cleanPrevSink=false)
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
The QVideoSink class represents a generic sink for video data.
Definition qvideosink.h:22
void setSubtitleText(const QString &subtitle)
Sets the current subtitle text.
Combined button and popup list for selecting options.
const GLfloat * tc
GLsizei GLenum GLboolean sink
QFrame frame
[0]