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
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 <QtCore/qpointer.h>
23#include <qqueue.h>
24
26
28{
30public:
32 virtual ~QFFmpegImageCapture();
33
34 bool isReadyForCapture() const override;
35 int capture(const QString &fileName) override;
36 int captureToBuffer() override;
37
38 QImageEncoderSettings imageSettings() const override;
40
42
43protected:
44 virtual int doCapture(const QString &fileName);
45 virtual void setupVideoSourceConnections();
48
49protected Q_SLOTS:
50 void newVideoFrame(const QVideoFrame &frame);
52
53private:
54 QFFmpegMediaCaptureSession *m_session = nullptr;
55 QPointer<QPlatformVideoSource> m_videoSource;
56 int m_lastId = 0;
57 QImageEncoderSettings m_settings;
58
59 struct PendingImage {
60 int id;
61 QString filename;
62 QMediaMetaData metaData;
63 };
64
65 QQueue<PendingImage> m_pendingImages;
66 bool m_isReadyForCapture = false;
67};
68
70
71#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:346
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
The QVideoFrame class represents a frame of video data.
Definition qvideoframe.h:27
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]