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
qwindowscamera_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 QWINDOWSCAMERA_H
5#define QWINDOWSCAMERA_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/qplatformcamera_p.h>
19
20#include <QtCore/qspan.h>
21
22QT_BEGIN_NAMESPACE
23
24namespace QFFmpeg {
25
26class ActiveCamera;
27
28qsizetype indexOfClosestCameraFormat(QSpan<const QCameraFormat> candidates,
29 const QCameraFormat &requested);
30
32{
33public:
34 explicit QWindowsCamera(QCamera *parent);
36
37 bool isActive() const override { return bool(m_active); }
38 void setActive(bool active) override;
39 void setCamera(const QCameraDevice &camera) override;
40 bool setCameraFormat(const QCameraFormat &/*format*/) override;
41
42private:
43 QCameraDevice m_cameraDevice;
44 std::unique_ptr<ActiveCamera> m_active;
45};
46
47} // namespace QFFmpeg
48
49QT_END_NAMESPACE
50
51#endif //QWINDOWSCAMERA_H
void onReadSample(HRESULT status, LONGLONG timestamp, IMFSample *sample)
bool setFormat(const QCameraFormat &format)
static std::unique_ptr< ActiveCamera > create(QWindowsCamera &wc, const QCameraDevice &device, const QCameraFormat &format)
bool setCameraFormat(const QCameraFormat &) override
void setCamera(const QCameraDevice &camera) override
QWindowsCamera(QCamera *parent)
void setActive(bool active) override
bool isActive() const override
\inmodule QtCore
Definition qmutex.h:346
QT_MANGLE_NAMESPACE(QMacScreenCaptureStreamDelegate) QMacScreenCaptureStreamDelegate
qsizetype indexOfClosestCameraFormat(QSpan< const QCameraFormat > candidates, const QCameraFormat &requested)