mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 13:08:50 +02:00
afa2985f64
Implements hardware encoders through the Media Foundation interface provided by Microsoft. Supports: - Quicksync (Intel) - VCE (AMD) - NVENC (NVIDIA, might only be supported through MF on Windows 10) Notes: - NVENC and VCE do not appear to have proper CBR implementations. This isn't a fault of our code, but the Media Foundation libraries. Quicksync however appears to be fine.
29 lines
507 B
C++
29 lines
507 B
C++
#include <obs-module.h>
|
|
#include <util/profiler.h>
|
|
|
|
#include "mf-common.hpp"
|
|
|
|
extern "C" extern void RegisterMFAACEncoder();
|
|
extern void RegisterMFH264Encoders();
|
|
|
|
|
|
extern "C" bool obs_module_load(void)
|
|
{
|
|
CoInitializeEx(0, COINIT_MULTITHREADED);
|
|
MFStartup(MF_VERSION, MFSTARTUP_FULL);
|
|
|
|
RegisterMFAACEncoder();
|
|
RegisterMFH264Encoders();
|
|
|
|
return true;
|
|
}
|
|
|
|
extern "C" void obs_module_unload(void)
|
|
{
|
|
MFShutdown();
|
|
CoUninitialize();
|
|
}
|
|
|
|
OBS_DECLARE_MODULE()
|
|
OBS_MODULE_USE_DEFAULT_LOCALE("win-mf", "en-US")
|