Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qffmpegstreamdecoder_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 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 QFFMPEGSTREAMDECODER_P_H
4#define QFFMPEGSTREAMDECODER_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//
20#include "private/qplatformmediaplayer_p.h"
21
22#include <optional>
23
25
26namespace QFFmpeg {
27
29{
31public:
32 StreamDecoder(const Codec &codec, qint64 absSeekPos);
33
35
37
38public slots:
39 void decode(Packet);
40
42
44
47
49
50protected:
51 bool canDoNextStep() const override;
52
53 void doNextStep() override;
54
55private:
56 void decodeMedia(Packet);
57
58 void decodeSubtitle(Packet);
59
60 void onFrameFound(Frame frame);
61
62 int sendAVPacket(Packet);
63
64 void receiveAVFrames();
65
66private:
67 Codec m_codec;
68 const qint64 m_absSeekPos = 0;
69 const QPlatformMediaPlayer::TrackType m_trackType;
70
71 qint32 m_pendingFramesCount = 0;
72
73 LoopOffset m_offset;
74
75 QQueue<Packet> m_packets;
76};
77
78} // namespace QFFmpeg
79
81
82#endif // QFFMPEGSTREAMDECODER_P_H
bool canDoNextStep() const override
void onFrameProcessed(Frame frame)
void packetProcessed(Packet)
void requestHandleFrame(Frame frame)
QPlatformMediaPlayer::TrackType trackType() const
\inmodule QtCore
Definition qqueue.h:14
Combined button and popup list for selecting options.
QMediaFormat::AudioCodec codec
#define Q_OBJECT
#define slots
#define signals
int qint32
Definition qtypes.h:44
long long qint64
Definition qtypes.h:55
QFrame frame
[0]