示例#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);
        }
示例#2
0
 public static extern bool SetVideoSourceStateChangedCallback(string name, VideoSourceKernelStateChanged callback);