2015-09-15 11:45:37 -07:00
|
|
|
#include <obs-module.h>
|
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
#ifdef ENABLE_WINMF
|
2018-02-25 22:37:56 -08:00
|
|
|
#include <util/profiler.h>
|
2015-09-15 11:45:37 -07:00
|
|
|
#include "mf-common.hpp"
|
|
|
|
|
|
|
|
extern "C" extern void RegisterMFAACEncoder();
|
|
|
|
extern void RegisterMFH264Encoders();
|
2018-02-25 22:37:56 -08:00
|
|
|
#endif
|
2015-09-15 11:45:37 -07:00
|
|
|
|
|
|
|
|
|
|
|
extern "C" bool obs_module_load(void)
|
|
|
|
{
|
2022-03-16 23:10:42 +01:00
|
|
|
#ifdef ENABLE_WINMF
|
2015-09-15 11:45:37 -07:00
|
|
|
MFStartup(MF_VERSION, MFSTARTUP_FULL);
|
|
|
|
|
|
|
|
RegisterMFAACEncoder();
|
|
|
|
RegisterMFH264Encoders();
|
2018-02-25 22:37:56 -08:00
|
|
|
#endif
|
2015-09-15 11:45:37 -07:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" void obs_module_unload(void)
|
|
|
|
{
|
2022-03-16 23:10:42 +01:00
|
|
|
#ifdef ENABLE_WINMF
|
2015-09-15 11:45:37 -07:00
|
|
|
MFShutdown();
|
2018-02-25 22:37:56 -08:00
|
|
|
#endif
|
2015-09-15 11:45:37 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
OBS_DECLARE_MODULE()
|
2018-09-11 01:51:38 -07:00
|
|
|
MODULE_EXPORT const char *obs_module_description(void)
|
|
|
|
{
|
|
|
|
return "Windows Media Foundations H.264/AAC encoder";
|
|
|
|
}
|
2018-02-25 22:37:56 -08:00
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
#ifdef ENABLE_WINMF
|
2015-09-15 11:45:37 -07:00
|
|
|
OBS_MODULE_USE_DEFAULT_LOCALE("win-mf", "en-US")
|
2018-02-25 22:37:56 -08:00
|
|
|
#endif
|