Esempio n. 1
0
 /// <summary>
 /// </summary>
 public NvJpeg(nvjpegBackend backend, nvjpegPinnedAllocator pinnedAllocator, uint flags)
 {
     _handle = new nvjpegHandle();
     res     = NvJpegNativeMethods.nvjpegCreateEx(backend, IntPtr.Zero, ref pinnedAllocator, flags, ref _handle);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvjpegCreateEx", res));
     if (res != nvjpegStatus.Success)
     {
         throw new NvJpegException(res);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// </summary>
 internal BufferPinned(NvJpeg nvJpeg, nvjpegPinnedAllocator pinnedAllocator)
 {
     _nvJpeg = nvJpeg;
     _buffer = new nvjpegBufferPinned();
     res     = NvJpegNativeMethods.nvjpegBufferPinnedCreate(nvJpeg.Handle, ref pinnedAllocator, ref _buffer);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvjpegBufferPinnedCreate", res));
     if (res != nvjpegStatus.Success)
     {
         throw new NvJpegException(res);
     }
 }
Esempio n. 3
0
 public static extern nvjpegStatus nvjpegCreateEx(nvjpegBackend backend,
                                                  ref nvjpegDevAllocator dev_allocator,
                                                  ref nvjpegPinnedAllocator pinned_allocator,
                                                  uint flags,
                                                  ref nvjpegHandle handle);
Esempio n. 4
0
 public static extern nvjpegStatus nvjpegBufferPinnedCreate(nvjpegHandle handle,
                                                            ref nvjpegPinnedAllocator pinned_allocator,
                                                            ref nvjpegBufferPinned buffer);
Esempio n. 5
0
 public BufferPinned CreateBufferPinned(nvjpegPinnedAllocator pinnedAllocator)
 {
     return(new BufferPinned(this, pinnedAllocator));
 }