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
qplatformmediarecorder.cpp
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
5#include "qstandardpaths.h"
7#include <QObject>
8
10
15
17{
18 updateError(QMediaRecorder::FormatError, QMediaRecorder::tr("Pause not supported"));
19}
20
22{
23 updateError(QMediaRecorder::FormatError, QMediaRecorder::tr("Resume not supported"));
24}
25
27{
28 if (m_state == state)
29 return;
30 m_state = state;
31 emit q->recorderStateChanged(state);
32}
33
35{
36 if (m_duration == duration)
37 return;
38 m_duration = duration;
39 emit q->durationChanged(duration);
40}
41
43{
44 if (m_actualLocation == location)
45 return;
46 m_actualLocation = location;
47 emit q->actualLocationChanged(location);
48}
49
54
56{
57 emit q->metaDataChanged();
58}
59
61{
62 const auto audioOnly = settings.videoCodec() == QMediaFormat::VideoCodec::Unspecified;
63
64 const auto primaryLocation =
66 const QString suffix = settings.mimeType().preferredSuffix();
68 outputLocation().toString(QUrl::PreferLocalFile), primaryLocation, suffix);
69
70 Q_ASSERT(!location.isEmpty());
71
72 return location;
73}
74
void setAndNotify(ErrorCode code, QString description, Notifier &notifier)
\inmodule QtMultimedia
RecorderState
\qmlproperty enumeration QtMultimedia::MediaRecorder::recorderState
Error
\qmlproperty enumeration QtMultimedia::MediaRecorder::error
void actualLocationChanged(const QUrl &location)
void updateError(QMediaRecorder::Error error, const QString &errorString)
void stateChanged(QMediaRecorder::RecorderState state)
QMediaRecorder::Error error() const
void durationChanged(qint64 position)
virtual qint64 duration() const
QPlatformMediaRecorder(QMediaRecorder *parent)
virtual QMediaRecorder::RecorderState state() const
QString findActualLocation(const QMediaEncoderSettings &settings) const
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
@ PreferLocalFile
Definition qurl.h:114
else opt state
[0]
Q_MULTIMEDIA_EXPORT QString generateFileName(const QString &requestedName, QStandardPaths::StandardLocation type, const QString &extension)
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
GLint location
GLdouble GLdouble GLdouble GLdouble q
Definition qopenglext.h:259
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
#define emit
long long qint64
Definition qtypes.h:60
QSettings settings("MySoft", "Star Runner")
[0]
char * toString(const MyType &t)
[31]