Beispiel #1
0
        public DatumProducer(StdSharedPtr <Producer> producerSharedPtr,
                             ulong frameFirst = 0,
                             ulong frameStep  = 1,
                             ulong frameLast  = ulong.MaxValue)
        {
            if (producerSharedPtr == null)
            {
                throw new ArgumentNullException(nameof(producerSharedPtr));
            }

            producerSharedPtr.ThrowIfDisposed();

            this._DataType = GenericHelpers.CheckDatumSupportTypes <T>();
            this.NativePtr = NativeMethods.op_DatumProducer_new(this._DataType,
                                                                producerSharedPtr.NativePtr,
                                                                frameFirst,
                                                                frameStep,
                                                                frameLast,
                                                                IntPtr.Zero);
        }
 internal WDatumProducer(IntPtr ptr, bool isEnabledDispose = true) :
     base(ptr, isEnabledDispose)
 {
     this._DataType = GenericHelpers.CheckDatumSupportTypes <T>();
     this.NativePtr = ptr;
 }
Beispiel #3
0
 public ThreadManager(ThreadManagerMode threadManagerMode = ThreadManagerMode.Synchronous)
 {
     this._DataType = GenericHelpers.CheckDatumSupportTypes <T>();
     this.NativePtr = OpenPose.Native.op_ThreadManager_new(this._DataType, threadManagerMode);
 }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Wrapper{T}"/> class with the specified ThreadManager synchronization mode.
 /// </summary>
 /// <param name="threadManagerMode"></param>
 public Wrapper(ThreadManagerMode threadManagerMode = ThreadManagerMode.Synchronous)
 {
     this._DataType = GenericHelpers.CheckDatumSupportTypes <T>();
     this.NativePtr = NativeMethods.op_wrapper_new(this._DataType, threadManagerMode);
 }
 protected WorkerProducer(IntPtr ptr, bool isEnabledDispose = true) :
     base(ptr, isEnabledDispose)
 {
     this._DataType = GenericHelpers.CheckDatumSupportTypes <T>();
 }
Beispiel #6
0
 protected Worker(IntPtr ptr, bool isEnabledDispose = true) :
     base(isEnabledDispose)
 {
     this._DataType = GenericHelpers.CheckDatumSupportTypes <T>();
     this.NativePtr = ptr;
 }