CVideoDecoder.h 622 B

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. class AVCodecContext;
  3. class CVideoDataManager;
  4. class AVPacket;
  5. class AVFrame;
  6. class CVideoDecoder
  7. {
  8. public:
  9. CVideoDecoder(AVCodecContext* pDecoder, bool bHard, CVideoDataManager* pDataManager);
  10. ~CVideoDecoder();
  11. bool DecodePacket(AVPacket* pkt, unsigned char* &pData);
  12. bool DecodePacketGpu(AVPacket* pkt, unsigned char* &pData);
  13. private:
  14. static unsigned __stdcall DecodeThread(void* param);
  15. void DecodeProcessor();
  16. private:
  17. AVCodecContext* m_pDecoder{nullptr};
  18. bool m_bHard{false};
  19. CVideoDataManager* m_pDataManager{ nullptr };
  20. unsigned char* m_pI420{nullptr};
  21. void* pCuStream{nullptr};
  22. };