示例#1
0
 /// <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);
     }
 }
示例#2
0
 /// <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);
     }
 }
示例#3
0
 public static extern nvjpegStatus nvjpegCreateEx(nvjpegBackend backend,
                                                  ref nvjpegDevAllocator dev_allocator,
                                                  ref nvjpegPinnedAllocator pinned_allocator,
                                                  uint flags,
                                                  ref nvjpegHandle handle);
示例#4
0
 public static extern nvjpegStatus nvjpegBufferDeviceCreate(nvjpegHandle handle,
                                                            ref nvjpegDevAllocator device_allocator,
                                                            ref nvjpegBufferDevice buffer);
示例#5
0
 public BufferDevice CreateBufferDevice(nvjpegDevAllocator deviceAllocator)
 {
     return(new BufferDevice(this, deviceAllocator));
 }