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
qgraphicsframecapturemetal_p_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 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// Qt-Security score:significant reason:default
4
5#ifndef QGRAPHICSFRAMEDECAPTUREMETAL_P_P_H
6#define QGRAPHICSFRAMEDECAPTUREMETAL_P_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
20#include <QtCore/qmutex.h>
21#if defined(Q_OS_MACOS) && QT_CONFIG(process)
22#include <QtCore/qprocess.h>
23#endif
24
28
29QT_BEGIN_NAMESPACE
30
31class QGraphicsFrameCaptureMetal : public QGraphicsFrameCapturePrivate
32{
33public:
34 QGraphicsFrameCaptureMetal();
35 ~QGraphicsFrameCaptureMetal();
36
37 void setRhi(QRhi *rhi) override;
38 void startCaptureFrame() override;
39 void endCaptureFrame() override;
40 bool initialized() const override;
41 bool isCapturing() const override;
42 void openCapture() override;
43
44private:
45 void updateCaptureFileName();
46#if defined(Q_OS_MACOS) && QT_CONFIG(process)
47 QProcess *m_process = nullptr;
48#endif
49 MTLCaptureManager *m_captureManager = nullptr;
50 MTLCaptureDescriptor *m_captureDescriptor = nullptr;
51 NSURL *m_traceURL = nullptr;
52 bool m_initialized = false;
53 static uint frameNumber;
54};
55
56QT_END_NAMESPACE
57
58#endif // QGRAPHICSFRAMEDECAPTUREMETAL_P_P_H
#define __has_feature(x)
Q_FORWARD_DECLARE_OBJC_CLASS(NSObject)
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
Q_FORWARD_DECLARE_OBJC_CLASS(NSURL)
Q_FORWARD_DECLARE_OBJC_CLASS(MTLCaptureDescriptor)