Esempio n. 1
0
        public bool KernelInit()
        {
            if (IsOpen && !IsKernelInit)
            {
                if (mGetFrameFun == null)
                {
                    mGetFrameFun = new GetFrameFunPtr(OnGetFrameFun);
                }

                if (VideoSourceSDKWrap.CreateVideoSource(Name, mGetFrameFun))
                {
                    IsKernelInit = true;

                    if (mVideoSourceKernelStateChanged == null)
                    {
                        mVideoSourceKernelStateChanged = new VideoSourceKernelStateChanged(DoVideoSourceKernelStateChanged);
                    }

                    VideoSourceSDKWrap.SetVideoSourceStateChangedCallback(Name, mVideoSourceKernelStateChanged);

                    VideoSourceSDKWrap.SetVideoSourceParams(Name, mConfig.FPS, (int)mConfig.RunMode, mConfig.IsAutoTune, mConfig.CPU);
                }
            }
            return(IsKernelInit);
        }
Esempio n. 2
0
 public static extern bool CreateVideoSource(string name, GetFrameFunPtr getFrame);