public pxcmStatus StartRecINT(IntPtr source, Handler handler)
 {
     if (handlerDIR != null)
     {
         handlerDIR.Dispose();
     }
     handlerDIR = new HandlerDIR(handler);
     return(PXCMSpeechRecognition_StartRec(instance, source, handlerDIR.dirUnmanaged));
 }
Example #2
0
    /**
     * @brief	Initialize the SenseManager pipeline for streaming with callbacks. The application must
     * enable raw streams or algorithm modules before this function.
     * @param[in] handler				Optional callback instance.
     * @return PXC_STATUS_NO_ERROR		Successful execution.
     */
    public pxcmStatus Init(Handler handler)
    {
        if (handler == null)
        {
            return(PXCMSenseManager_Init(instance, IntPtr.Zero));
        }

        if (handlerDIR != null)
        {
            handlerDIR.Dispose();
        }
        handlerDIR = new HandlerDIR(this, handler);
        return(PXCMSenseManager_Init(instance, handlerDIR.dirUnmanaged));
    }
Example #3
0
    /**
     *  @brief	The function locates an I/O device that meets any module input needs previously specified
     *  by the RequestStreams function. The device and its streams are configured upon a successful return.
     *  @param[in]	handler				The optional handler instance for callbacks during the device match.
     *  @return PXCM_STATUS_NO_ERROR	Successful executation.
     */
    public pxcmStatus LocateStreams(Handler handler)
    {
        HandlerDIR handlerDIR = new HandlerDIR(handler);
        pxcmStatus sts        = PXCMCaptureManager_LocateStreams(instance, handlerDIR.dirUnmanaged);

        if (sts >= pxcmStatus.PXCM_STATUS_NO_ERROR)
        {
            foreach (ObjectPair op in descriptors)
            {
                Marshal.PtrToStructure(op.unmanaged, op.managed);
            }
        }
        descriptors.Clear();
        handlerDIR.Dispose();
        return(sts);
    }
        /**
          @brief	Initialize the SenseManager pipeline for streaming with callbacks. The application must 
          enable raw streams or algorithm modules before this function.
          @param[in] handler				Optional callback instance. 
          @return PXC_STATUS_NO_ERROR		Successful execution.
        */
        public pxcmStatus Init(Handler handler)
        {
            if (handler == null) return PXCMSenseManager_Init(instance, IntPtr.Zero);

            if (handlerDIR != null) handlerDIR.Dispose();
            handlerDIR = new HandlerDIR(this, handler);
            return PXCMSenseManager_Init(instance, handlerDIR.dirUnmanaged);
        }
 /**
     @brief	The function locates an I/O device that meets any module input needs previously specified
     by the RequestStreams function. The device and its streams are configured upon a successful return.
     @param[in]	handler				The optional handler instance for callbacks during the device match.
     @return PXCM_STATUS_NO_ERROR	Successful executation.
 */
 public pxcmStatus LocateStreams(Handler handler)
 {
     HandlerDIR handlerDIR = new HandlerDIR(handler);
     pxcmStatus sts = PXCMCaptureManager_LocateStreams(instance, handlerDIR.dirUnmanaged);
     if (sts >= pxcmStatus.PXCM_STATUS_NO_ERROR)
     {
         foreach (ObjectPair op in descriptors)
         {
             Marshal.PtrToStructure(op.unmanaged, op.managed);
         }
     }
     descriptors.Clear();
     handlerDIR.Dispose();
     return sts;
 }
 public pxcmStatus StartRecINT(IntPtr source, Handler handler)
 {
     if (handlerDIR != null) handlerDIR.Dispose();
     handlerDIR = new HandlerDIR(handler);
     return PXCMSpeechRecognition_StartRec(instance, source, handlerDIR.dirUnmanaged);
 }