#ifndef MPV_PLUGIN_H_ #define MPV_PLUGIN_H_ #include #include #include #include #include #include #include #include #include "mpv_core.h" #include "mpv_player.h" // C-style registration function for the plugin. void MpvPlayerPluginRegisterWithRegistrar( FlutterDesktopPluginRegistrarRef registrar); namespace mpv { class MpvPlayerPlugin : public flutter::Plugin { public: static void RegisterWithRegistrar(flutter::PluginRegistrarWindows* registrar); MpvPlayerPlugin(flutter::PluginRegistrarWindows* registrar); virtual ~MpvPlayerPlugin(); private: void HandleMethodCall( const flutter::MethodCall& method_call, std::unique_ptr> result); void SendEvent(const flutter::EncodableValue& event); HWND GetWindow(); HWND GetChildWindow(); flutter::PluginRegistrarWindows* registrar_; std::unique_ptr> method_channel_; std::unique_ptr> event_channel_; std::unique_ptr> event_sink_; std::unique_ptr player_; std::optional proc_id_; }; } // namespace mpv #endif // MPV_PLUGIN_H_