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
qplatformvideosource_p.h
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
4#ifndef QPLATFORMVIDEOSOURCE_P_H
5#define QPLATFORMVIDEOSOURCE_P_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 "qvideoframeformat.h"
19
20#include <QtCore/qobject.h>
21#include <QtCore/qnativeinterface.h>
22#include <QtCore/private/qglobal_p.h>
23
24#include <optional>
25
27
28class QVideoFrame;
30
31class Q_MULTIMEDIA_EXPORT QPlatformVideoSource : public QObject
32{
34public:
35 using QObject::QObject;
36
37 virtual void setActive(bool active) = 0;
38 virtual bool isActive() const = 0;
39
40 virtual QVideoFrameFormat frameFormat() const = 0;
41
42 virtual std::optional<int> ffmpegHWPixelFormat() const;
43
45
46 virtual QString errorString() const = 0;
47
48 bool hasError() const { return !errorString().isEmpty(); }
49
52 void activeChanged(bool);
54};
55
57
58#endif // QPLATFORMVIDEOSOURCE_P_H
\inmodule QtCore
Definition qobject.h:103
Q_INVOKABLE QObject(QObject *parent=nullptr)
Constructs an object with parent object parent.
Definition qobject.cpp:936
virtual QVideoFrameFormat frameFormat() const =0
virtual void setActive(bool active)=0
virtual bool isActive() const =0
virtual QString errorString() const =0
virtual void setCaptureSession(QPlatformMediaCaptureSession *)
void newVideoFrame(const QVideoFrame &)
void activeChanged(bool)
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
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.
#define Q_OBJECT
#define Q_SIGNALS