File indexing completed on 2025-01-19 03:57:05
0001 /********************************************************* 0002 * Copyright (C) 2020, Val Doroshchuk <valbok@gmail.com> * 0003 * * 0004 * This file is part of QtAVPlayer. * 0005 * Free Qt Media Player based on FFmpeg. * 0006 *********************************************************/ 0007 0008 #ifndef QAVPACKET_H 0009 #define QAVPACKET_H 0010 0011 // 0012 // W A R N I N G 0013 // ------------- 0014 // 0015 // This file is not part of the Qt API. It exists purely as an 0016 // implementation detail. This header file may change from version to 0017 // version without notice, or even be removed. 0018 // 0019 // We mean it. 0020 // 0021 0022 #include "qavframe.h" 0023 #include "qavstream.h" 0024 #include <memory> 0025 0026 QT_BEGIN_NAMESPACE 0027 0028 struct AVPacket; 0029 class QAVPacketPrivate; 0030 class QAVPacket 0031 { 0032 public: 0033 QAVPacket(); 0034 ~QAVPacket(); 0035 QAVPacket(const QAVPacket &other); 0036 QAVPacket &operator=(const QAVPacket &other); 0037 operator bool() const; 0038 0039 AVPacket *packet() const; 0040 double duration() const; 0041 double pts() const; 0042 0043 QAVStream stream() const; 0044 void setStream(const QAVStream &stream); 0045 0046 // Sends the packet to the codec 0047 int send() const; 0048 0049 protected: 0050 std::unique_ptr<QAVPacketPrivate> d_ptr; 0051 0052 private: 0053 Q_DECLARE_PRIVATE(QAVPacket) 0054 }; 0055 0056 QT_END_NAMESPACE 0057 0058 #endif