/// <summary> /// 收到对方音频数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void aVcommunicationEx1_AudioData(object sender, AVcommunication.AVEventArgs e) { if (this.AE != null && this.AR != null) { this.AR.play(this.AE.Decode(e.Data));//将收到的音频数据解码后播放 } }
/// <summary> /// 收到对方的视频数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void aVcommunicationEx1_VideoData(object sender, AVcommunication.AVEventArgs e) { if (e.Data != null) { try { this.BeginInvoke(new VOIDD(renewimg), new object[] { e.Data }); } catch (Exception) { } finally { } //using (MemoryStream ms = new MemoryStream(e.Data, 0, (int)e.Data.Length, true)) //{ // try // { // //Bitmap newimg = new Bitmap(ms); // this.BeginInvoke(new VOIDD(renewimg), new object[] { e.Data }); // } // catch (Exception) // { // } // finally // { // ms.Dispose(); // } //} } }