Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qffmpegpacket_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
4#ifndef QFFMPEGPACKET_P_H
5#define QFFMPEGPACKET_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtFFmpegMediaPluginImpl/private/qffmpeg_p.h>
19#include <QtFFmpegMediaPluginImpl/private/qffmpegplaybackutils_p.h>
20#include <QtCore/qsharedpointer.h>
21
22QT_BEGIN_NAMESPACE
23
24namespace QFFmpeg {
25
26struct Packet
27{
29 {
30 Data(const LoopOffset &offset, AVPacketUPtr p, quint64 sourceId)
32 {
33 }
34
38 };
39 Packet() = default;
40 Packet(const LoopOffset &offset, AVPacketUPtr p, quint64 sourceId)
41 : d(new Data(offset, std::move(p), sourceId))
42 {
43 }
44
45 bool isValid() const { return !!d; }
46 AVPacket *avPacket() const { return d->packet.get(); }
47 const LoopOffset &loopOffset() const { return d->loopOffset; }
48 quint64 sourceId() const { return d->sourceId; }
49
50private:
51 QExplicitlySharedDataPointer<Data> d;
52};
53
54} // namespace QFFmpeg
55
56QT_END_NAMESPACE
57
58Q_DECLARE_METATYPE(QFFmpeg::Packet)
59
60#endif // QFFMPEGPACKET_P_H
Data(const LoopOffset &offset, AVPacketUPtr p, quint64 sourceId)
Packet()=default
AVPacket * avPacket() const
bool isValid() const
const LoopOffset & loopOffset() const
Packet(const LoopOffset &offset, AVPacketUPtr p, quint64 sourceId)
quint64 sourceId() const