|
第一次连接断开代码:
// 用户视频分辨率改变消息
- (void) OnAnyChatVideoSizeChg:(int) dwUserId : (int) dwWidth : (int) dwHeight
{
}
// 用户退出房间消息
- (void) OnAnyChatUserLeaveRoom:(int) dwUserId
{
if ((dwUserId == _currentUserId || dwUserId == _dwUserId)) {
[self FinishVideoChat];
}
}
// 网络断开消息
- (void) OnAnyChatLinkClose:(int) dwErrorCode
{
[self FinishVideoChat];
//[AnyChatPlatform Logout];
}
- (void) FinishVideoChat
{
[AnyChatPlatform UserSpeakControl: -1 : NO];
[AnyChatPlatform UserCameraControl: -1 : NO];
[AnyChatPlatform UserSpeakControl: self->iRemoteUserId : NO];
[AnyChatPlatform UserCameraControl: self->iRemoteUserId : NO];
self->iRemoteUserId = -1;
[AnyChatPlatform LeaveRoom: -1];
if(self.localVideoSurface){
self.localVideoSurface = nil;
}
[AnyChatPlatform Logout];
[AnyChatPlatform Release];
[self.parentViewController dismissViewControllerAnimated:NO completion:nil];
}
以下为第二次连接log:
2014-07-22 18:56:54.922 PadBotIPad[2814:60b] ---------------------------AnyChat Platform Core SDK Client Log---------------------------
2014-07-22 18:56:54.927 PadBotIPad[2814:60b] Load libanychatcore.so success!(V5.0 Build Time:Jun 26 2014 10:47:00)
2014-07-22 18:56:54.932 PadBotIPad[2814:60b] Load libmediautil.so success!(V5.0 Build Time:Jun 26 2014 10:47:17)
2014-07-22 18:56:54.936 PadBotIPad[2814:60b] Load libmediashow.so success!(V5.0 Build Time:Jun 26 2014 10:47:13)
2014-07-22 18:56:54.939 PadBotIPad[2814:60b] Load libmediacore.so success!(V5.0 Build Time:Jun 26 2014 10:47:10)
2014-07-22 18:56:54.941 PadBotIPad[2814:60b] videoDisabledButton retainCount is 2
2014-07-22 18:56:54.963 PadBotIPad[2814:60b] =============== 1
2014-07-22 18:56:54.964 PadBotIPad[2814:60b] ********** device type is iPad4,2
2014-07-22 18:56:54.967 PadBotIPad[2814:60b] Invoke BRAC_Connect(st.padbot.cn,8906)=0
2014-07-22 18:56:54.970 PadBotIPad[2814:60b] Invoke LoginServer(username=happy)
2014-07-22 18:56:54.980 PadBotIPad[2814:60b] callingSendViewController dealloc
2014-07-22 18:56:55.040 PadBotIPad[2814:a313] CheckClientSocketLink Connect(ip=112.124.29.195,port=8906)
2014-07-22 18:56:55.247 PadBotIPad[2814:a313] Server version: V5.0(Build Time:2014-07-03 17:13:18, Server OS:Windows)
2014-07-22 18:56:55.294 PadBotIPad[2814:a313] Message OnConnect(bSuccess:1, errorcode=0)
2014-07-22 18:56:55.726 PadBotIPad[2814:a313] Message OnLoginSystem(userid=239,errorcode=0,username=happy), msg deliver worked(0)
2014-07-22 18:56:55.729 PadBotIPad[2814:a313] Load libmediautil.so success!(V5.0 Build Time:Jun 26 2014 10:47:17)
2014-07-22 18:56:55.732 PadBotIPad[2814:a313] Load libmediashow.so success!(V5.0 Build Time:Jun 26 2014 10:47:13)
2014-07-22 18:56:55.735 PadBotIPad[2814:a313] Load libmediacore.so success!(V5.0 Build Time:Jun 26 2014 10:47:10)
2014-07-22 18:56:55.743 PadBotIPad[2814:60b] Invoke EnterRoom(happy)
2014-07-22 18:56:55.743 PadBotIPad[2814:60b] ********** device type is iPad4,2
2014-07-22 18:56:55.749 PadBotIPad[2814:60b] Invoke BRAC_SetSDKOption(BRAC_SO_NETWORK_P2PPOLITIC=1)
2014-07-22 18:56:55.753 PadBotIPad[2814:60b] Invoke SetSDKOption(BRAC_SO_AUDIO_NSCTRL,1)
2014-07-22 18:56:55.757 PadBotIPad[2814:60b] Invoke SetSDKOption(BRAC_SO_AUDIO_ECHOCTRL,1)
2014-07-22 18:56:55.761 PadBotIPad[2814:60b] Apply video parameter:640x480, bitrate:800000, quality:2, gop:24, fps:20, preset:1, codec:0
2014-07-22 18:56:55.763 PadBotIPad[2814:60b] Invoke EnterRoom(happy)
2014-07-22 18:56:55.763 PadBotIPad[2814:60b] ********** device type is iPad4,2
2014-07-22 18:56:55.767 PadBotIPad[2814:60b] Invoke BRAC_SetSDKOption(BRAC_SO_NETWORK_P2PPOLITIC=1)
2014-07-22 18:56:55.770 PadBotIPad[2814:60b] Invoke SetSDKOption(BRAC_SO_AUDIO_NSCTRL,1)
2014-07-22 18:56:55.773 PadBotIPad[2814:60b] Invoke SetSDKOption(BRAC_SO_AUDIO_ECHOCTRL,1)
2014-07-22 18:56:55.777 PadBotIPad[2814:60b] Apply video parameter:640x480, bitrate:800000, quality:2, gop:24, fps:20, preset:1, codec:0
2014-07-22 18:56:55.783 PadBotIPad[2814:a313] Connection to streaming media server successfully!(udp delay:22ms)
2014-07-22 18:56:55.896 PadBotIPad[2814:a313] Message OnEnterRoom(roomid=366,errorcode=0,siteindex=0)
2014-07-22 18:56:55.931 PadBotIPad[2814:a313] Audio Playback Device Init(0, 1, 16000, 16), ios Playback Driver
2014-07-22 18:56:55.934 PadBotIPad[2814:a313] Message OnReceiveOnlineUser(count=1,roomid=366)
每次连接之后,第二次打开视频的总是无法显示视频画面,所有ios设备都是一样的 |
|