#pragma once class AVCodecContext; class CVideoDataManager; class AVPacket; class AVFrame; class CVideoDecoder { public: CVideoDecoder(AVCodecContext* pDecoder, bool bHard, CVideoDataManager* pDataManager); ~CVideoDecoder(); bool DecodePacket(AVPacket* pkt, unsigned char* &pData); bool DecodePacketGpu(AVPacket* pkt, unsigned char* &pData); private: static unsigned __stdcall DecodeThread(void* param); void DecodeProcessor(); private: AVCodecContext* m_pDecoder{nullptr}; bool m_bHard{false}; CVideoDataManager* m_pDataManager{ nullptr }; unsigned char* m_pI420{nullptr}; void* pCuStream{nullptr}; };