#if defined(_WIN32) #include "MFUtils.h" #include #include #include #include #pragma comment(lib, "mf") #pragma comment(lib, "Mfplat") #pragma comment(lib, "mfplay") #pragma comment(lib, "mfuuid") #pragma comment(lib, "shlwapi") namespace MFUtils { struct MFMedia { MFMedia() : _hr(MFStartup(MF_VERSION)) { } ~MFMedia() { MFShutdown(); } HRESULT _hr; }; HRESULT InitializeMFOnce() { static MFMedia s_mfMedia; return s_mfMedia._hr; } } #endif