#ifndef __WGC_CAPTURER_H__ #define __WGC_CAPTURER_H__ #include "wgc/pch.h" #include "wgc/App.h" #include class WgcCapturer { public: bool StartCapturerWindow(HWND hwnd, int width, int height); bool StartCapturerMonitor(HMONITOR monitor, int width, int height); void SetDrawCursor(bool isDrawCursor) { _app->SetDrawCursor(isDrawCursor); } static void Init(); static WgcCapturer* New(); static void Delete(WgcCapturer* ptr); static void Uninit(); void Close() { if (_app != nullptr) { _app->Close(); } } AVFrame* GetFrame() { return _app->GetFrame(); } private: WgcCapturer(); ~WgcCapturer(); App* _app = nullptr; bool _isAppInit = false; static std::list _capturers; static winrt::Windows::System::DispatcherQueue* queuePtr; static winrt::Windows::UI::Composition::ContainerVisual* rootPtr; }; #endif