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
qwindowsmediaencoder_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//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the Qt API. It exists purely as an
9// implementation detail. This header file may change from version to
10// version without notice, or even be removed.
11//
12// We mean it.
13//
14
15#ifndef QWINDOWSMEDIAENCODER_H
16#define QWINDOWSMEDIAENCODER_H
17
18#include <private/qplatformmediarecorder_p.h>
19
20#include <QtCore/qglobal.h>
21#include <QtCore/qurl.h>
22
24
28
30{
32public:
34
35 bool isLocationWritable(const QUrl &location) const override;
36 QMediaRecorder::RecorderState state() const override;
37 qint64 duration() const override;
38
39 void setMetaData(const QMediaMetaData &metaData) override;
40 QMediaMetaData metaData() const override;
41
43
45 void pause() override;
46 void resume() override;
47 void stop() override;
48
49private Q_SLOTS:
50 void onCameraChanged();
51 void onRecordingStarted();
52 void onRecordingStopped();
53 void onDurationChanged(qint64 duration);
54 void onStreamingError(int errorCode);
55 void onRecordingError(int errorCode);
56
57private:
58 void saveMetadata();
59
60 QWindowsMediaCaptureService *m_captureService = nullptr;
61 QWindowsMediaDeviceSession *m_mediaDeviceSession = nullptr;
63 QString m_fileName;
64 QMediaMetaData m_metaData;
65 qint64 m_duration = 0;
66 bool m_sessionWasActive = false;
67};
68
70
71#endif
\inmodule QtMultimedia
\inmodule QtMultimedia
RecorderState
\qmlproperty enumeration QtMultimedia::MediaRecorder::recorderState
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
QWindowsMediaEncoder(QMediaRecorder *parent)
void setMetaData(const QMediaMetaData &metaData) override
QMediaRecorder::RecorderState state() const override
void setCaptureSession(QPlatformMediaCaptureSession *session)
QMediaMetaData metaData() const override
bool isLocationWritable(const QUrl &location) const override
qint64 duration() const override
void record(QMediaEncoderSettings &settings) override
Combined button and popup list for selecting options.
GLint location
#define Q_OBJECT
#define Q_SLOTS
long long qint64
Definition qtypes.h:60
QSettings settings("MySoft", "Star Runner")
[0]