public OptionsListDebugView(OptionsList optionList) { if (optionList == null) { throw new ArgumentNullException(nameof(optionList)); } ol = optionList; }
/// <summary> /// Initializes a new instance of the <see cref="ProcessingBlock"/> class. /// <para> /// Starts the processing block directing it's output to the <see cref="Queue"/> /// </para> /// </summary> /// <param name="ptr">native <c>rs2_processing_block*</c> pointer</param> public ProcessingBlock(IntPtr ptr) : base(ptr, NativeMethods.rs2_delete_processing_block) { object error; Options = new OptionsList(Handle); Info = new InfoCollection(NativeMethods.rs2_supports_processing_block_info, NativeMethods.rs2_get_processing_block_info, Handle); NativeMethods.rs2_start_processing_queue(Handle, queue.Handle, out error); }
/// <summary> /// Initializes a new instance of the <see cref="CustomProcessingBlock"/> class. /// </summary> /// <param name="cb">Processing function to be applied to every frame entering the block</param> public CustomProcessingBlock(FrameProcessorCallback cb) { frameProcessorCallbackHandle = GCHandle.Alloc(cb, GCHandleType.Normal); IntPtr cbPtr = GCHandle.ToIntPtr(frameProcessorCallbackHandle); object error; var pb = NativeMethods.rs2_create_processing_block_fptr(fpc, cbPtr, out error); m_instance = new Base.DeleterHandle(pb, NativeMethods.rs2_delete_processing_block); Options = new OptionsList(m_instance.Handle); }
internal override void Initialize() { lock (tableLock) { if (refCountTable.Contains(Handle)) { refCount = refCountTable[Handle] as Base.RefCount; } else { refCount = new Base.RefCount(); refCountTable[Handle] = refCount; } Retain(); } Info = new InfoCollection(NativeMethods.rs2_supports_sensor_info, NativeMethods.rs2_get_sensor_info, Handle); Options = new OptionsList(Handle); }
internal Sensor(IntPtr sensor) : base(sensor, NativeMethods.rs2_delete_sensor) { Info = new InfoCollection(NativeMethods.rs2_supports_sensor_info, NativeMethods.rs2_get_sensor_info, Handle); Options = new OptionsList(Handle); }
internal override void Initialize() { Info = new InfoCollection(NativeMethods.rs2_supports_sensor_info, NativeMethods.rs2_get_sensor_info, Handle); Options = new OptionsList(Handle); }