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); }
public static extern bool CreateVideoSource(string name, GetFrameFunPtr getFrame);