Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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
26class QPlatformMediaCaptureSession;
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
42 void setCaptureSession(QPlatformMediaCaptureSession *session);
43
44 void record(QMediaEncoderSettings &settings) override;
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;
62 QMediaRecorder::RecorderState m_state = QMediaRecorder::StoppedState;
63 QString m_fileName;
64 QMediaMetaData m_metaData;
65 qint64 m_duration = 0;
66 bool m_sessionWasActive = false;
67};
68
69QT_END_NAMESPACE
70
71#endif
int capture(const QString &fileName) override
virtual ~QWindowsImageCapture()
QImageEncoderSettings imageSettings() const override
void setImageSettings(const QImageEncoderSettings &settings) override
void setCaptureSession(QPlatformMediaCaptureSession *session)
bool isReadyForCapture() const override
QPlatformImageCapture * imageCapture() override
void setCamera(QPlatformCamera *camera) override
void setAudioInput(QPlatformAudioInput *) override
QPlatformCamera * camera() override
QPlatformMediaRecorder * mediaRecorder() override
void setImageCapture(QPlatformImageCapture *imageCapture) override
void setAudioOutput(QPlatformAudioOutput *output) override
void setMediaRecorder(QPlatformMediaRecorder *recorder) override
QWindowsMediaDeviceSession * session() const
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
QPlatformMediaFormatInfo * createFormatInfo() override
QMaybe< QPlatformCamera * > createCamera(QCamera *camera) override
QMaybe< QPlatformMediaRecorder * > createRecorder(QMediaRecorder *recorder) override
QMaybe< QPlatformMediaCaptureSession * > createCaptureSession() override
QPlatformVideoDevices * createVideoDevices() override
QMaybe< QPlatformMediaPlayer * > createPlayer(QMediaPlayer *parent) override
QMaybe< QPlatformImageCapture * > createImageCapture(QImageCapture *imageCapture) override
QMaybe< QPlatformVideoSink * > createVideoSink(QVideoSink *sink) override
QMaybe< QPlatformAudioDecoder * > createAudioDecoder(QAudioDecoder *decoder) override
Combined button and popup list for selecting options.