예제 #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));
 }