protected override bool StopDispatchCore()
        {
            _captureLooper.Stop();

            if (_realHandle < 0)
            {
                return(true);
            }

            //停止视频预览
            if (!OfficalAPI.NET_DVR_StopRealPlay(_realHandle))
            {
                WarnDvrSdkFailWithReason("NET_DVR_StopRealPlay");
                return(false);
            }
            this.InfoSuccess("NET_DVR_StopRealPlay");

            _realHandle = InvalidRealHandle;

            if (_playPort == InvalidPlayPort)
            {
                return(true);
            }

            // 停止解码
            if (!OfficalAPI.PlayM4_Stop(_playPort))
            {
                WarnPlaySdkFailWithReason("PlayM4_Stop");
                return(false);
            }
            this.InfoSuccess("PlayM4_Stop");


            //关闭流, 回收源数据缓冲
            if (!OfficalAPI.PlayM4_CloseStream(_playPort))
            {
                WarnPlaySdkFailWithReason("PlayM4_CloseStream");
                return(false);
            }
            this.InfoSuccess("PlayM4_CloseStream");

            //释放播放库端口号
            if (!OfficalAPI.PlayM4_FreePort(_playPort))
            {
                WarnPlaySdkFailWithReason("PlayM4_FreePort");
                return(false);
            }
            this.InfoSuccess("PlayM4_FreePort");

            _playPort = InvalidPlayPort;

            return(true);
        }