AntiClipSettings/H264Palyer.h
2024-08-13 20:06:10 +08:00

26 lines
538 B
C++

#ifndef H264PALYER_H
#define H264PALYER_H
#include <QImage>
#include <optional>
#include <string>
typedef struct AVFrame AVFrame;
typedef struct AVPacket AVPacket;
typedef struct AVCodecContext AVCodecContext;
class H264Palyer {
public:
H264Palyer();
~H264Palyer();
void open();
std::optional<QImage> decode(const uint8_t *data, uint32_t size);
private:
AVPacket *m_packet = nullptr;
AVFrame *m_frame = nullptr;
AVCodecContext *m_codecContext = nullptr;
};
#endif // H264PALYER_H