/// <summary> /// </summary> public NvJpeg(nvjpegBackend backend, nvjpegDevAllocator devAllocator, uint flags) { _handle = new nvjpegHandle(); res = NvJpegNativeMethods.nvjpegCreateEx(backend, ref devAllocator, IntPtr.Zero, flags, ref _handle); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvjpegCreateEx", res)); if (res != nvjpegStatus.Success) { throw new NvJpegException(res); } }
/// <summary> /// </summary> internal BufferDevice(NvJpeg nvJpeg, nvjpegDevAllocator deviceAllocator) { _nvJpeg = nvJpeg; _buffer = new nvjpegBufferDevice(); res = NvJpegNativeMethods.nvjpegBufferDeviceCreate(nvJpeg.Handle, ref deviceAllocator, ref _buffer); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvjpegBufferDeviceCreate", res)); if (res != nvjpegStatus.Success) { throw new NvJpegException(res); } }
public static extern nvjpegStatus nvjpegCreateEx(nvjpegBackend backend, ref nvjpegDevAllocator dev_allocator, ref nvjpegPinnedAllocator pinned_allocator, uint flags, ref nvjpegHandle handle);
public static extern nvjpegStatus nvjpegBufferDeviceCreate(nvjpegHandle handle, ref nvjpegDevAllocator device_allocator, ref nvjpegBufferDevice buffer);
public BufferDevice CreateBufferDevice(nvjpegDevAllocator deviceAllocator) { return(new BufferDevice(this, deviceAllocator)); }