#ifndef __GDI_CAPTURER_H__ #define __GDI_CAPTURER_H__ #include "basic/frame.h" #include class GdiCapturer { public: bool Open(HWND hwnd, int width, int height); HDC GetHdc(int borderWidth, int borderHeight); AVFrame* GetFrame(); void Close(); ~GdiCapturer(); private: HDC _srcHdc = nullptr; HDC _dstHdc = nullptr; HBITMAP _bitmap = nullptr; BITMAPINFO _bitmapInfo; int m_width = 0; int m_height = 0; AVFrame* _frame = nullptr; }; #endif