43 std::function<std::unique_ptr<nvenc_d3d11_interface>(ID3D11Device *,
shared_dll)>;
65 static std::shared_ptr<nvenc_dynamic_factory>
get();
Factory bound to the newest NVENC SDK supported by the installed driver.
Definition nvenc_dynamic_factory.h:37
std::unique_ptr< nvenc_d3d11_interface > create_nvenc_d3d11_native(ID3D11Device *d3d_device) const
Create a native Direct3D11 NVENC encoder.
Definition nvenc_dynamic_factory.cpp:112
static std::shared_ptr< nvenc_dynamic_factory > get()
Load the NVENC driver and select a compatible SDK implementation.
Definition nvenc_dynamic_factory.cpp:46
nvenc_sdk_version sdk_version() const
Get the SDK implementation selected for this factory.
Definition nvenc_dynamic_factory.cpp:124
std::function< std::unique_ptr< nvenc_d3d11_interface >(ID3D11Device *, shared_dll)> create_encoder_fn
SDK-specific encoder constructor.
Definition nvenc_dynamic_factory.h:42
std::unique_ptr< nvenc_d3d11_interface > create_nvenc_d3d11_on_cuda(ID3D11Device *d3d_device) const
Create a CUDA NVENC encoder with Direct3D11 input surfaces.
Definition nvenc_dynamic_factory.cpp:118
nvenc_dynamic_factory(shared_dll dll, nvenc_sdk_version sdk_version, create_encoder_fn create_native, create_encoder_fn create_on_cuda)
Construct a factory bound to one NVENC SDK implementation.
Definition nvenc_dynamic_factory.cpp:34
Standalone NVENC encoder.
Definition nvenc_base.cpp:185
std::shared_ptr< std::remove_pointer_t< HMODULE > > shared_dll
Shared ownership wrapper for a loaded Windows module.
Definition nvenc_shared_dll.h:20
nvenc_sdk_version
NVENC SDK implementations compiled into Sunshine.
Definition nvenc_version.h:16
Declarations for the SDK-neutral Direct3D11 NVENC interface.
Windows module lifetime helpers shared by NVENC factories and encoders.
NVENC SDK version selection helpers.
Windows runtime operations used to discover the installed NVENC API.
Definition nvenc_dynamic_factory.h:22
std::function< FARPROC(HMODULE, const char *)> get_symbol_fn
Resolve an export from the loaded NVENC driver module.
Definition nvenc_dynamic_factory.h:28
std::function< shared_dll()> load_driver_fn
Load the NVENC driver module.
Definition nvenc_dynamic_factory.h:23
load_driver_fn load_driver
Function that loads the NVENC driver module.
Definition nvenc_dynamic_factory.h:30
get_symbol_fn get_symbol
Resolve a driver export.
Definition nvenc_dynamic_factory.h:31