/**************************************************************************** * Copyright 2019 Nreal Techonology Limited. All rights reserved. * * This file is part of NRSDK. * * https://www.nreal.ai/ * *****************************************************************************/ namespace NRKernal { using System; using System.Runtime.InteropServices; /// Callback, called when the camera image. /// Handle of the RGB camera. /// Handle of the RGB camera image. /// The userdata. [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void CameraImageCallback(UInt64 rgb_camera_handle, UInt64 rgb_camera_image_handle, UInt64 userdata); /// Interface for camera data provider. public interface ICameraDataProvider { /// Creates a new bool. /// True if it succeeds, false if it fails. bool Create(); /// Gets raw data. /// Handle of the image. /// The eye. /// [in,out] The pointer. /// [in,out] The size. /// True if it succeeds, false if it fails. bool GetRawData(UInt64 imageHandle, int eye, ref IntPtr ptr, ref int size); /// Gets a resolution. /// Handle of the image. /// The eye. /// The resolution. NativeResolution GetResolution(UInt64 imageHandle, int eye); /// Gets hmd time nanos. /// Handle of the image. /// The eye. /// The hmd time nanos. UInt64 GetHMDTimeNanos(UInt64 imageHandle, int eye); /// Get exposure time. /// Handle of the image. /// The eye. /// Exposure time of the image. UInt32 GetExposureTime(UInt64 imageHandle, int eye); /// Get Gain. /// Handle of the image. /// The eye. /// Gain of the image. UInt32 GetGain(UInt64 imageHandle, int eye); /// Callback, called when the set capture. /// The callback. /// (Optional) The userdata. /// True if it succeeds, false if it fails. bool SetCaptureCallback(CameraImageCallback callback, UInt64 userdata = 0); /// Sets image format. /// Describes the format to use. /// True if it succeeds, false if it fails. bool SetImageFormat(CameraImageFormat format); /// Starts a capture. /// True if it succeeds, false if it fails. bool StartCapture(); /// Stops a capture. /// True if it succeeds, false if it fails. bool StopCapture(); /// Destroys the image described by imageHandle. /// Handle of the image. /// True if it succeeds, false if it fails. bool DestroyImage(UInt64 imageHandle); /// Releases this object. /// True if it succeeds, false if it fails. bool Release(); } }