Ejemplo n.º 1
0
        /// <summary>
        /// 收到对方视频格式事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void aVcommunication1_GetBITMAPINFOHEADER(object sender, AVcommunication.AVEventArgs e)
        {
            if (VD == null)
                VD = new VideoEncoder(e.BITMAPINFOHEADER, false);//创建视频解码器

            if (VR == null)
                VR = new VideoRender(this.cRemote);//创建视频回显组件

            VR.BITMAPINFOHEADER = e.BITMAPINFOHEADER;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 关闭 
        /// </summary>
        public void Close()
        {
            try
            {
                aVcommunicationEx1.closeCommunication();
            }
            catch (Exception)
            {

            }

            try
            {
                aVcommunicationEx1.sockUDP1.CloseSock();
            }
            catch (Exception)
            {

            }

            if (this.VC != null)
            {
                if (VC != null)
                {
                    VC.Close();
                    VC = null;
                }
            }

            if (VR!=null)
            {
                VR = null;
            }

            if (VE!=null)
            {
                VE.Close();
                VE = null;
            }
            if (VD!=null)
            {
                VD.Close();
                VD = null;
            }
            if (AC!=null)
            {
                AC = null;
            }
            if (AR!=null)
            {
                AR = null;
            }
            if (AE!=null)
            {
                AE = null;
            }
        }