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
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
38 // Maximum number of frames that we are allowed to keep in render queue
40
41public slots:
42 void setInitialPosition(TimePoint tp, qint64 trackPos);
43
44 void decode(Packet);
45
47
49
52
54
55protected:
56 bool canDoNextStep() const override;
57
58 void doNextStep() override;
59
60private:
61 void decodeMedia(Packet);
62
63 void decodeSubtitle(Packet);
64
65 void onFrameFound(Frame frame);
66
67 int sendAVPacket(Packet);
68
69 void receiveAVFrames();
70
71private:
72 Codec m_codec;
73 qint64 m_absSeekPos = 0;
74 const QPlatformMediaPlayer::TrackType m_trackType;
75
76 qint32 m_pendingFramesCount = 0;
77
78 LoopOffset m_offset;
79
80 QQueue<Packet> m_packets;
81};
82
83} // namespace QFFmpeg
84
86
87#endif // QFFMPEGSTREAMDECODER_P_H
std::chrono::steady_clock::time_point TimePoint
StreamDecoder(const Codec &codec, qint64 absSeekPos)
bool canDoNextStep() const override
static qint32 maxQueueSize(QPlatformMediaPlayer::TrackType type)
void onFrameProcessed(Frame frame)
void packetProcessed(Packet)
void setInitialPosition(TimePoint tp, qint64 trackPos)
void requestHandleFrame(Frame frame)
QPlatformMediaPlayer::TrackType trackType() const
Combined button and popup list for selecting options.
QMediaFormat::AudioCodec codec
GLenum type
#define Q_OBJECT
#define slots
#define signals
int qint32
Definition qtypes.h:49
long long qint64
Definition qtypes.h:60
#define decode(x)
QFrame frame
[0]