Example #1
0
        public static void CloseVideoToWallForDVCS2(Camera camera)
        {
            if (PublicParams.arrayOpenedVideosDVCS2[0] == null)
            {
                return;
            }
            try
            {
                if (camera.Name == PublicParams.arrayOpenedVideosDVCS2[0].Name)
                {
                    if (PublicParams.arrayOpenedVideosDVCS2[0].WinID != 0)
                    {
                        int dvcs2WinID = PublicParams.arrayOpenedVideosDVCS2[0].WinID;
                        PublicParams.dvcsServer2.SendCMD(DVCSAgreement.CloseWin(dvcs2WinID));
                        PublicParams.arrayOpenedVideosDVCS2[0] = null;
                        //LogHelper.WriteLog(string.Format("已发送指令,关闭WinID:{0}的视频--{1}", dvcs2WinID.ToString(), PublicParams.dvcsServer2Name));
                    }
                }
            }
            catch (Exception ex)
            {
                LogHelper.WriteLog("关闭DVCS2视频出现错误--CloseVideoToWallForDVCS2--" + ex.Message);
            }


            RefreshOpenedVideos();
        }
Example #2
0
 /// <summary>
 /// 关闭大屏上的视频
 /// </summary>
 /// <param name="camera"></param>
 public static void ClosePoliceCarVideoToWall(Camera camera)
 {
     if (PublicParams.bigScreenCamera == null)
     {
         return;
     }
     PublicParams.dvcsServerMain.SendCMD(DVCSAgreement.CloseWin(camera.WinID));
     PublicParams.bigScreenCamera = null;
     CloseVideoToWallForDVCS2(camera);
 }
Example #3
0
        public static void OpenVideoToWallForDVCS2(Camera camera)
        {
            //add by LPY 开视频同时向第二DVCS服务器发送开视频指令
            if (PublicParams.arrayOpenedVideosDVCS2[0] != null)
            {
                if (PublicParams.arrayOpenedVideosDVCS2[0].WinID != 0)
                {
                    PublicParams.dvcsServer2.SendCMD(DVCSAgreement.CloseWin(PublicParams.arrayOpenedVideosDVCS2[0].WinID));
                }
            }
            PublicParams.arrayOpenedVideosDVCS2[0] = new Camera(camera);
            PublicParams.dvcsServer2.SendCMD(DVCSAgreement.OpenWin(PublicParams.dvcs2wallID, 0, DVCSAgreement.GetByteListByString(camera.MAC, false), camera.ChannelID, PublicParams.dvcs2x1, PublicParams.dvcs2y1, PublicParams.dvcs2w, PublicParams.dvcs2h, PublicParams.zindex));

            RefreshOpenedVideos();
        }