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
qwindowsimagecapture_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 QWINDOWSIMAGECAPTURE_H
5#define QWINDOWSIMAGECAPTURE_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/qplatformimagecapture_p.h>
19
21
24
26{
28public:
31
32 bool isReadyForCapture() const override;
33
34 int capture(const QString &fileName) override;
35 int captureToBuffer() override;
36
37 QImageEncoderSettings imageSettings() const override;
39
41
42private Q_SLOTS:
43 void handleVideoFrameChanged(const QVideoFrame &frame);
44
45private:
46 int doCapture(const QString &fileName);
47 void saveImage(int captureId, const QString &fileName,
48 const QImage &image, const QMediaMetaData &metaData,
50 QString writerFormat(QImageCapture::FileFormat reqFormat);
51 int writerQuality(const QString &writerFormat,
53
54 QWindowsMediaCaptureService *m_captureService = nullptr;
55 QWindowsMediaDeviceSession *m_mediaDeviceSession = nullptr;
56 QImageEncoderSettings m_settings;
57 int m_captureId = 0;
58 bool m_capturing = false;
59 QString m_fileName;
60};
61
63
64#endif // QWINDOWSIMAGECAPTURE_H
\inmodule QtMultimedia
FileFormat
Choose one of the following image formats:
Quality
Enumerates quality encoding levels.
\inmodule QtGui
Definition qimage.h:37
\inmodule QtMultimedia
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
QMediaMetaData metaData() const
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
The QVideoFrame class represents a frame of video data.
Definition qvideoframe.h:27
int capture(const QString &fileName) override
virtual ~QWindowsImageCapture()
QWindowsImageCapture(QImageCapture *parent)
QImageEncoderSettings imageSettings() const override
void setImageSettings(const QImageEncoderSettings &settings) override
void setCaptureSession(QPlatformMediaCaptureSession *session)
bool isReadyForCapture() const override
Combined button and popup list for selecting options.
Definition image.cpp:4
#define Q_OBJECT
#define Q_SLOTS
QSettings settings("MySoft", "Star Runner")
[0]
QFrame frame
[0]