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
qandroidimagecapture.cpp
Go to the documentation of this file.
1// Copyright (C) 2023 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
5#include <qandroidcamera_p.h>
6
8
10 : QFFmpegImageCapture(parent)
11{
12 connect(this, &QPlatformImageCapture::imageSaved, this, &QAndroidImageCapture::updateExif);
13}
14
18
20{
22 if (ret >= 0) {
23 auto androidCamera = qobject_cast<QAndroidCamera *>(videoSource());
24 if (androidCamera)
25 androidCamera->capture();
26 }
27
28 return ret;
29}
30
32{
33 auto androidCamera = qobject_cast<QAndroidCamera *>(videoSource());
34 if (androidCamera)
36 else
38}
39
40void QAndroidImageCapture::updateExif(int id, const QString &filename)
41{
42 Q_UNUSED(id);
43 auto androidCamera = qobject_cast<QAndroidCamera *>(videoSource());
44 if (androidCamera)
45 androidCamera->updateExif(filename);
46}
void onCaptured(const QVideoFrame &)
QAndroidImageCapture(QImageCapture *parent=nullptr)
void setupVideoSourceConnections() override
int doCapture(const QString &fileName) override
void newVideoFrame(const QVideoFrame &frame)
virtual int doCapture(const QString &fileName)
QPlatformVideoSource * videoSource() const
virtual void setupVideoSourceConnections()
\inmodule QtMultimedia
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Definition qobject.cpp:2960
void imageSaved(int requestId, const QString &fileName)
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
return ret
#define Q_UNUSED(x)
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)