Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qffmpegimagecapture_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
5#ifndef QFFMPEGIMAGECAPTURE_H
6#define QFFMPEGIMAGECAPTURE_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qplatformimagecapture_p.h>
21
22#include <qqueue.h>
23
25
27{
29public:
31 virtual ~QFFmpegImageCapture();
32
33 bool isReadyForCapture() const override;
34 int capture(const QString &fileName) override;
35 int captureToBuffer() override;
36
37 QImageEncoderSettings imageSettings() const override;
39
41
42protected:
43 virtual int doCapture(const QString &fileName);
44 virtual void setupVideoSourceConnections();
47
48protected Q_SLOTS:
49 void newVideoFrame(const QVideoFrame &frame);
51
52private:
53 QFFmpegMediaCaptureSession *m_session = nullptr;
55 int m_lastId = 0;
56 QImageEncoderSettings m_settings;
57
58 struct PendingImage {
59 int id;
60 QString filename;
61 QMediaMetaData metaData;
62 };
63
64 QQueue<PendingImage> m_pendingImages;
65 bool m_isReadyForCapture = false;
66};
67
69
70#endif // QGSTREAMERCAPTURECORNTROL_H
void setImageSettings(const QImageEncoderSettings &settings) override
void newVideoFrame(const QVideoFrame &frame)
virtual int doCapture(const QString &fileName)
QPlatformVideoSource * videoSource() const
QImageEncoderSettings imageSettings() const override
void setCaptureSession(QPlatformMediaCaptureSession *session)
int capture(const QString &fileName) override
virtual void setupVideoSourceConnections()
bool isReadyForCapture() const override
QFFmpegImageCapture(QImageCapture *parent)
\inmodule QtMultimedia
\inmodule QtMultimedia
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:311
\inmodule QtCore
Definition qpointer.h:18
\inmodule QtCore
Definition qqueue.h:14
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
The QVideoFrame class represents a frame of video data.
Definition qvideoframe.h:26
Combined button and popup list for selecting options.
GLenum GLuint id
[7]
#define Q_OBJECT
#define Q_SLOTS
QSettings settings("MySoft", "Star Runner")
[0]
QFrame frame
[0]