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>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void aVcommunication1_VideoData(object sender, AVcommunication.AVEventArgs e)
 {
     if (this.VD != null && this.VR != null)
     {
         this.VR.DrawVideo(this.VD.Decode(e.Data));//将收到的视频数据解码后回显
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 收到对方音频数据
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void aVcommunication1_AudioData(object sender, AVcommunication.AVEventArgs e)
 {
     if (this.AE != null && this.AR != null)
     {
         this.AR.play(this.AE.Decode(e.Data));//将收到的音频数据解码后播放
     }
 }