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#ifndef QFFMPEGMUXER_P_H
4#define QFFMPEGMUXER_P_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists purely as an
11// implementation detail. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include <QtFFmpegMediaPluginImpl/private/qffmpegthread_p.h>
18#include <QtFFmpegMediaPluginImpl/private/qffmpeg_p.h>
19#include <queue>
20
21QT_BEGIN_NAMESPACE
22
23namespace QFFmpeg {
24
25class RecordingEngine;
26
27class Muxer : public ConsumerThread
28{
29public:
30 Muxer(RecordingEngine *encoder);
31
32 void addPacket(AVPacketUPtr packet);
33
34private:
35 AVPacketUPtr takePacket();
36
37 bool init() override;
38 void cleanup() override;
39 bool hasData() const override;
40 void processOne() override;
41
42private:
43 std::queue<AVPacketUPtr> m_packetQueue;
44
45 RecordingEngine *m_encoder;
46};
47
48} // namespace QFFmpeg
49
50QT_END_NAMESPACE
51
52#endif
53

source code of qtmultimedia/src/plugins/multimedia/ffmpeg/recordingengine/qffmpegmuxer_p.h