public void OnMediaReady(uint mid, WmeDirection direction, WmeSessionType mediaType, MediaTrack pTrack) { if (direction == WmeDirection.WmeDirection_Send) { if (mid > 10) { return; } if (mediaType == WmeSessionType.WmeSessionType_Audio) { mLocalAudio = pTrack; } else if (mediaType == WmeSessionType.WmeSessionType_Video) { mLocalVideo = pTrack; //pTrack.AddRenderWindow(mVideoForm.GetSelfView()); //pTrack.AddRenderWindow(SelfViewPictureBox.Handle); //pTrack.AddImageRender(LocalVideoImage); } else if (mediaType == WmeSessionType.WmeSessionType_ScreenShare) { mLocalShare = pTrack; if (mid == 2) { mLocalShare.AddScreenSource(ScreenSourceManager.Instance.defaultSource()); } } pTrack.Start(false); } else { if (mid < 10) { return; } if (mediaType == WmeSessionType.WmeSessionType_Audio) { mRemoteAudio = pTrack; } else if (mediaType == WmeSessionType.WmeSessionType_Video) { mRemoteVideo = pTrack; pTrack.AddImageRender(RemoteVideoImage1); //pTrack.AddImageRender(RemoteVideoImage2); //pTrack.AddImageRender(RemoteVideoImage3); //pTrack.AddImageRender(RemoteVideoImage4); } else if (mediaType == WmeSessionType.WmeSessionType_ScreenShare) { mRemoteShare = pTrack; if (mid == 2000) { //pTrack.AddRenderWindow(ShareViewPictureBox.Handle); pTrack.AddImageRender(ShareViewImage); } } pTrack.Start(false); } }
public void OnRenderSizeChanged(uint mid, uint vid, WmeDirection direction, WmeVideoSizeInfo sizeInfo) { }