@@ -21,14 +21,17 @@ struct on_scope_exit {
2121extern " C"
2222const char * ffDetectCamera (FF_MAYBE_UNUSED FFlist* result)
2323{
24- // TODO: check if supported by Windows Server Core
24+ FF_LIBRARY_LOAD (mfplat, NULL , " dlopen mfplat" FF_LIBRARY_EXTENSION " failed" , " mfplat" FF_LIBRARY_EXTENSION, 1 )
25+ FF_LIBRARY_LOAD_SYMBOL_MESSAGE (mfplat, MFCreateAttributes)
26+ FF_LIBRARY_LOAD (mf, NULL , " dlopen mf" FF_LIBRARY_EXTENSION " failed" , " mf" FF_LIBRARY_EXTENSION, 1 )
27+ FF_LIBRARY_LOAD_SYMBOL_MESSAGE (mf, MFEnumDeviceSources)
2528
2629 const char * error = ffInitCom ();
2730 if (error)
2831 return error;
2932
3033 IMFAttributes* FF_AUTO_RELEASE_COM_OBJECT attrs = nullptr ;
31- if (FAILED (MFCreateAttributes (&attrs, 1 )))
34+ if (FAILED (ffMFCreateAttributes (&attrs, 1 )))
3235 return " MFCreateAttributes() failed" ;
3336
3437 if (FAILED (attrs->SetGUID (
@@ -40,7 +43,7 @@ const char* ffDetectCamera(FF_MAYBE_UNUSED FFlist* result)
4043 IMFActivate** devices = NULL ;
4144 uint32_t count;
4245
43- if (FAILED (MFEnumDeviceSources (attrs, &devices, &count)))
46+ if (FAILED (ffMFEnumDeviceSources (attrs, &devices, &count)))
4447 return " MFEnumDeviceSources() failed" ;
4548
4649 for (uint32_t i = 0 ; i < count; i++)
0 commit comments