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 QFFMPEGVIDEOSINK_H |
5 | #define QFFMPEGVIDEOSINK_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/qplatformvideosink_p.h> |
19 | #include <QtFFmpegMediaPluginImpl/private/qffmpeghwaccel_p.h> |
20 | #include <QtCore/qmutex.h> |
21 | |
22 | QT_BEGIN_NAMESPACE |
23 | |
24 | // Required for QDoc workaround |
25 | class QString; |
26 | |
27 | class QFFmpegVideoSink : public QPlatformVideoSink |
28 | { |
29 | Q_OBJECT |
30 | |
31 | public: |
32 | QFFmpegVideoSink(QVideoSink *sink); |
33 | void setRhi(QRhi *rhi) override; |
34 | |
35 | protected: |
36 | void onVideoFrameChanged(const QVideoFrame &frame) override; |
37 | |
38 | private: |
39 | QMutex m_rhiMutex; |
40 | QRhi *m_rhi = nullptr; |
41 | }; |
42 | |
43 | QT_END_NAMESPACE |
44 | |
45 | |
46 | #endif |
47 |
Definitions
Learn Advanced QML with KDAB
Find out more