AntiClipSettings/H264Palyer.h

26 lines
538 B
C
Raw Permalink Normal View History

2024-08-13 20:06:10 +08:00
#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