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
avfdisplaylink_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 AVFDISPLAYLINK_H
5#define AVFDISPLAYLINK_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 <QtCore/qobject.h>
19#include <QtCore/qmutex.h>
20
21#if defined(Q_OS_IOS) || defined(Q_OS_TVOS)
22#include <CoreVideo/CVBase.h>
23#else
24#include <QuartzCore/CVDisplayLink.h>
25#endif
26
28
29class AVFDisplayLink : public QObject
30{
32public:
33 explicit AVFDisplayLink(QObject *parent = nullptr);
34 virtual ~AVFDisplayLink();
35 bool isValid() const;
36 bool isActive() const;
37
38public Q_SLOTS:
39 void start();
40 void stop();
41
43 void tick(const CVTimeStamp &ts);
44
45public:
46 void displayLinkEvent(const CVTimeStamp *);
47
48protected:
49 virtual bool event(QEvent *) override;
50
51private:
52#if defined(Q_OS_IOS) || defined(Q_OS_TVOS)
53 void *m_displayLink;
54#else
55 CVDisplayLinkRef m_displayLink;
56#endif
57 QMutex m_displayLinkMutex;
58 bool m_pendingDisplayLinkEvent;
59 bool m_isActive;
60 CVTimeStamp m_frameTimeStamp;
61};
62
64
65#endif // AVFDISPLAYLINK_H
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtCore
Definition qmutex.h:281
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
Combined button and popup list for selecting options.
struct _cl_event * event
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS