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
qavfscreencapture_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 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 QAVFSCREENCAPTURE_H
5#define QAVFSCREENCAPTURE_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 "private/qplatformsurfacecapture_p.h"
19#include <qmutex.h>
20#include <qwaitcondition.h>
21
23
25
27{
29
30 class Grabber;
31
32public:
33 explicit QAVFScreenCapture();
34 ~QAVFScreenCapture() override;
35
36 QVideoFrameFormat frameFormat() const override;
37
38 std::optional<int> ffmpegHWPixelFormat() const override;
39
40protected:
41 bool setActiveInternal(bool active) override;
42
43private:
44 void onNewFrame(const QVideoFrame &frame);
45
46 bool initScreenCapture(QScreen *screen);
47
48 void resetCapture();
49
50private:
51 std::optional<QVideoFrameFormat> m_format;
52 mutable QMutex m_formatMutex;
53 mutable QWaitCondition m_waitForFormat;
54
55 std::unique_ptr<Grabber> m_grabber;
56};
57
59
60#endif // QAVFSCREENCAPTURE_H
bool setActiveInternal(bool active) override
~QAVFScreenCapture() override
QVideoFrameFormat frameFormat() const override
std::optional< int > ffmpegHWPixelFormat() const override
\inmodule QtCore
Definition qmutex.h:281
The QScreen class is used to query screen properties. \inmodule QtGui.
Definition qscreen.h:32
The QVideoFrameFormat class specifies the stream format of a video presentation surface.
The QVideoFrame class represents a frame of video data.
Definition qvideoframe.h:27
Combined button and popup list for selecting options.
QScreen * screen
[1]
Definition main.cpp:29
#define Q_OBJECT
QFrame frame
[0]