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
qffmpegmuxer_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#ifndef QFFMPEGMUXER_P_H
4#define QFFMPEGMUXER_P_H
5
6#include "qffmpegthread_p.h"
7#include "qffmpeg_p.h"
8#include <queue>
9
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 void 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
40
41#endif
FFmpeg thread that is used to implement a consumer pattern.
void cleanup() override
Called on this thread before thread exits.
Muxer(RecordingEngine *encoder)
void init() override
Called on this thread when thread starts.
void processOne() override
Process one work item.
void addPacket(AVPacketUPtr packet)
bool hasData() const override
Must return true when data is available for processing.
std::unique_ptr< AVPacket, AVDeleter< decltype(&av_packet_free), &av_packet_free > > AVPacketUPtr
Definition qffmpeg_p.h:141
Combined button and popup list for selecting options.