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#include "qffmpegthread_p.h"
7#include "qffmpeg_p.h"
8#include <queue>
9
10QT_BEGIN_NAMESPACE
11
12namespace QFFmpeg {
13
14class RecordingEngine;
15
16class Muxer : public ConsumerThread
17{
18public:
19 Muxer(RecordingEngine *encoder);
20
21 void addPacket(AVPacketUPtr packet);
22
23private:
24 AVPacketUPtr takePacket();
25
26 bool init() override;
27 void cleanup() override;
28 bool hasData() const override;
29 void processOne() override;
30
31private:
32 std::queue<AVPacketUPtr> m_packetQueue;
33
34 RecordingEngine *m_encoder;
35};
36
37} // namespace QFFmpeg
38
39QT_END_NAMESPACE
40
41#endif
42

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