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
qffmpegencodinginitializer_p.h
Go to the documentation of this file.
1// Copyright (C) 2024 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 QENCODINGINITIALIZER_P_H
5#define QENCODINGINITIALIZER_P_H
6
7#include "qobject.h"
8#include "private/qmediainputencoderinterface_p.h"
9#include <unordered_set>
10#include <vector>
11
12//
13// W A R N I N G
14// -------------
15//
16// This file is not part of the Qt API. It exists purely as an
17// implementation detail. This header file may change from version to
18// version without notice, or even be removed.
19//
20// We mean it.
21//
22
24
30
31namespace QFFmpeg {
32
33class RecordingEngine;
34
35// Initializes RecordingEngine with audio and video sources, potentially lazily
36// upon first frame arrival if video frame format is not pre-determined.
38{
39public:
41
42 ~EncodingInitializer() override;
43
44 void start(const std::vector<QPlatformAudioBufferInputBase *> &audioSources,
45 const std::vector<QPlatformVideoSource *> &videoSources);
46
47private:
48 void addAudioBufferInput(QPlatformAudioBufferInput *input);
49
50 void addPendingAudioBufferInput(QPlatformAudioBufferInput *input);
51
52 void addVideoSource(QPlatformVideoSource *source);
53
54 void addPendingVideoSource(QPlatformVideoSource *source);
55
56 void addPendingSource(QObject *source);
57
58 void tryStartRecordingEngine();
59
60private:
61 void emitStreamInitializationError(QString error);
62
63 template <typename F>
64 void erasePendingSource(QObject *source, F &&functionOrError, bool destroyed = false);
65
66 bool canPushFrame() const override;
67
68private:
69 RecordingEngine &m_recordingEngine;
70 std::unordered_set<QObject *> m_pendingSources;
71};
72
73} // namespace QFFmpeg
74
76
77#endif // QENCODINGINITIALIZER_P_H
EncodingInitializer(RecordingEngine &engine)
\inmodule QtCore
Definition qobject.h:103
void destroyed(QObject *=nullptr)
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointe...
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
GLuint start
GLsizei GLsizei GLchar * source
GLenum GLenum GLenum input
QJSEngine engine
[0]