|
|
|
@ -7,7 +7,14 @@ public static class NvEncSharpRedirector |
|
|
|
{ |
|
|
|
{ |
|
|
|
static NvEncSharpRedirector() |
|
|
|
static NvEncSharpRedirector() |
|
|
|
{ |
|
|
|
{ |
|
|
|
NativeLibrary.SetDllImportResolver(typeof(Lennox.NvEncSharp.LibCuda).Assembly, Resolver); |
|
|
|
try |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
NativeLibrary.SetDllImportResolver(typeof(Lennox.NvEncSharp.LibCuda).Assembly, Resolver); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
catch (DllNotFoundException) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// do nothing
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static IntPtr Resolver(string libraryName, Assembly assembly, DllImportSearchPath? searchPath) |
|
|
|
private static IntPtr Resolver(string libraryName, Assembly assembly, DllImportSearchPath? searchPath) |
|
|
|
|