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
qffmpegmediarecorder_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#ifndef QFFMPEGMEDIARECODER_H
5#define QFFMPEGMEDIARECODER_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtMultimedia/private/qplatformmediarecorder_p.h>
19
21
22class QMediaMetaData;
24
25namespace QFFmpeg {
26class RecordingEngine;
27} // namespace QFFmpeg
28
30{
32public:
35
36 bool isLocationWritable(const QUrl &sink) const override;
37
38 void record(QMediaEncoderSettings &settings) override;
39 void pause() override;
40 void resume() override;
41 void stop() override;
42
43 void setMetaData(const QMediaMetaData &) override;
44 QMediaMetaData metaData() const override;
45
47
49
50private Q_SLOTS:
52 void finalizationDone();
53 void handleSessionError(QMediaRecorder::Error code, const QString &description);
54
55private:
56 using RecordingEngine = QFFmpeg::RecordingEngine;
57 struct RecordingEngineDeleter
58 {
59 void operator()(RecordingEngine *) const;
60 };
61
62 QFFmpegMediaCaptureSession *m_session = nullptr;
63 QMediaMetaData m_metaData;
64
65 std::unique_ptr<RecordingEngine, RecordingEngineDeleter> m_recordingEngine;
66};
67
68QT_END_NAMESPACE
69
70#endif // QFFMPEGMEDIARECODER_H
void setMediaRecorder(QPlatformMediaRecorder *recorder) override
void setVideoPreview(QVideoSink *sink) override
QPlatformSurfaceCapture * windowCapture() override
void setWindowCapture(QPlatformSurfaceCapture *) override
void setVideoFrameInput(QPlatformVideoFrameInput *) override
void setScreenCapture(QPlatformSurfaceCapture *) override
void setAudioInput(QPlatformAudioInput *input) override
QPlatformVideoFrameInput * videoFrameInput() override
std::vector< QAudioBufferSource * > activeAudioInputs() const
void setImageCapture(QPlatformImageCapture *imageCapture) override
QPlatformSurfaceCapture * screenCapture() override
QPlatformImageCapture * imageCapture() override
QPlatformAudioInput * audioInput() const
QPlatformVideoSource * primaryActiveVideoSource()
void setCamera(QPlatformCamera *camera) override
QPlatformMediaRecorder * mediaRecorder() override
QPlatformCamera * camera() override
~QFFmpegMediaCaptureSession() override
void setAudioBufferInput(QPlatformAudioBufferInput *input) override
void setAudioOutput(QPlatformAudioOutput *output) override
void setCaptureSession(QFFmpegMediaCaptureSession *session)
void record(QMediaEncoderSettings &settings) override
bool isLocationWritable(const QUrl &sink) const override
~QFFmpegMediaRecorder() override
QMediaMetaData metaData() const override
void setMetaData(const QMediaMetaData &) override
std::conditional_t< QT_FFMPEG_AVIO_WRITE_CONST, const uint8_t *, uint8_t * > AvioWriteBufferType
static int preferredAudioSinkBufferSize(const QFFmpegAudioInput &input)
#define qCWarning(category,...)
#define qCDebug(category,...)
#define Q_STATIC_LOGGING_CATEGORY(name,...)