CgwMonitorManage.Tiandy.TiandySdkClient.StopReceiveVideo C# (CSharp) Méthode

StopReceiveVideo() public méthode

停止预览
public StopReceiveVideo ( int playfd ) : bool
playfd int 设备ID
Résultat bool
        public bool StopReceiveVideo(int playfd)
        {
            NLogEx.LoggerEx logEx = new NLogEx.LoggerEx(log);
            logEx.Trace("Enter: TiandySdkClient.StopReceiveVideo({0}).", playfd);
            try
            {
                //调用SDK接口,停止预览,回调设置为空
                client_sdk_set_h264_callback(playfd, null, 0);
                if (client_sdk_stop_realplay(playfd))
                {
                    if (this.handelOperateLock.TryEnterWriteLock(CgwConst.ENTER_LOCK_WAIT_TIME))
                    {
                        try
                        {
                            this.receiveSuccHandle.Remove(playfd);
                        }
                        finally
                        {
                            this.handelOperateLock.ExitWriteLock();
                        }
                    }
                    logEx.Info("Call Tiandy sdk function client_sdk_stop_realplay success.playfd:{0}.", playfd);
                    return true;
                }
                else
                {
                    logEx.Error("Call Tiandy sdk function client_sdk_stop_realplay failed. playfd:{0}.", playfd);
                    return false;
                }
            }
            catch (Exception e)
            {
                logEx.Error("Stop Receive camera video data failed.Exception message:{0}.", e.Message);
                return false;
            }
        }