AnyChat技术支持论坛

标题: 启动本地视频崩溃问题 [打印本页]

作者: william2014    时间: 2014-8-28 17:24
标题: 启动本地视频崩溃问题
你好,在执行   [self StartLocalVideoChat];老是崩溃,帮看下你吧,谢谢~

2014-08-28 17:12:43.373 ESM[3842:60b] Invoke UserCameraControl(userid=-1,bOpen=1)
2014-08-28 17:12:43.375 ESM[3842:60b] Invoke UserSpeakControl(userid=10603,bOpen=1)
2014-08-28 17:12:43.401 ESM[3842:b307] Default Audio Capture Driver()
2014-08-28 17:12:43.403 ESM[3842:60b] Invoke BRAC_SetVideoPos(dwUserId:10603, hWnd:0x89d2800, l:25, t:43, r:269, b:222)
2014-08-28 17:12:43.405 ESM[3842:60b] Invoke UserCameraControl(userid=10603,bOpen=1)
>>17:12:43.406898 [trace] <openAcount> ***视频见证:对方视频网络状态remoteNetworkStatus:5*** - VideoChatController.m:1269
>>17:12:43.407210 [trace] <openAcount> ***对端视频状态GetCameraState:1*** - VideoChatController.m:1273
2014-08-28 17:12:43.408 ESM[3842:b307] Audio Init, error:0, device:0, 1, 16000, 16, capmode:0
2014-08-28 17:12:43.418 ESM[3842:b307] Audio codec init, handle:1, 11, 1, 16000, 16, 15850
2014-08-28 17:12:43.505 ESM[3842:b307] WARNING: -[<AVCaptureConnection: 0x8960cd0> isVideoMinFrameDurationSupported] is deprecated.  Please use AVCaptureDevice activeFormat.videoSupportedFrameRateRanges
2014-08-28 17:12:43.507 ESM[3842:b307] WARNING: -[<AVCaptureConnection: 0x8960cd0> setVideoMinFrameDuration:] is deprecated.  Please use AVCaptureDevice setActiveVideoMinFrameDuration
2014-08-28 17:12:43.509 ESM[3842:60b] -[UIImageView OnLocalVideoInit:]: unrecognized selector sent to instance 0x89d2800
>>17:12:43.550455 [fatal] <app_except> CRASH: -[UIImageView OnLocalVideoInit:]: unrecognized selector sent to instance 0x89d2800
Stack Trace: (
0   CoreFoundation                      0x2e60df63 <redacted> + 154
1   libobjc.A.dylib                     0x389226af objc_exception_throw + 38
2   CoreFoundation                      0x2e6118e7 <redacted> + 202
3   CoreFoundation                      0x2e6101cb <redacted> + 706
4   CoreFoundation                      0x2e55f4d8 _CF_forwarding_prep_0 + 24
5   Foundation                          0x2eff1e9b <redacted> + 386
6   CoreFoundation                      0x2e5d9183 <redacted> + 14
7   CoreFoundation                      0x2e5d8653 <redacted> + 206
8   CoreFoundation                      0x2e5d6e47 <redacted> + 622
9   CoreFoundation                      0x2e541c27 CFRunLoopRunSpecific + 522
10  CoreFoundation                      0x2e541a0b CFRunLoopRunInMode + 106
11  GraphicsServices                    0x33231283 GSEventRunModal + 138
12  UIKit                               0x30de5049 UIApplicationMain + 1136
13  EnterpriseStockMaster               0x0053b689 main + 116
14  EnterpriseStockMaster               0x00538f88 start + 40
) - UnCaughtExceptionHandlerForWind.m:28
2014-08-28 17:12:43.666 ESM[3842:9e1f] Audio FX Status: VAD:1, NS:1, AGC:1, AEC:1
>>17:12:44.355288 [trace] <sky> 发送消息->:login:心跳检测 app=10 cmd=161 serNo=141 - SkyMsgSender.m:37
>>17:12:44.390203 [trace] <netChannel> 通道收到消息 - SkyMsg.m:53
>>17:12:44.391501 [trace] <netChannel> 通道收到消息:app=10, cmd=161,ser=141 - SkyMsg.m:89
>>17:12:44.398700 [trace] <sky> 收到消息->:login:心跳检测 app=10 cmd=161 serNo=141 - SkyMsgRecver.m:220
2014-08-28 17:12:44.555 ESM[3842:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView OnLocalVideoInit:]: unrecognized selector sent to instance 0x89d2800'
*** First throw call stack:
(0x2e60df4b 0x389226af 0x2e6118e7 0x2e6101cb 0x2e55f4d8 0x2eff1e9b 0x2e5d9183 0x2e5d8653 0x2e5d6e47 0x2e541c27 0x2e541a0b 0x33231283 0x30de5049 0x53b689 0x538f88)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

作者: 廖斌    时间: 2014-8-28 17:32
您好,您现在用的是什么ios版本的AnyChat SDK?OnLocalVideoInit的方法有修改吗?还是用标准demo的呢?
作者: william2014    时间: 2014-8-28 17:37
廖斌 发表于 2014-8-28 17:32
您好,您现在用的是什么ios版本的AnyChat SDK?OnLocalVideoInit的方法有修改吗?还是用标准demo的呢?

最新的5.0,视频的这款用的是你们的demo程序。。。
作者: 廖斌    时间: 2014-8-28 17:40
william2014 发表于 2014-8-28 17:37
最新的5.0,视频的这款用的是你们的demo程序。。。

OnLocalVideoInit的方法没有改吗?
作者: chenxs    时间: 2014-8-28 17:54
注意下 内容管理, 你得对象 没初始化或者已被销毁掉了,然后你方法还在调用他.
作者: william2014    时间: 2014-8-28 17:57
廖斌 发表于 2014-8-28 17:40
OnLocalVideoInit的方法没有改吗?

没有任何改动,一直使用都是ok的,今天不知为何出现概率很高。。。。
- (void) StartLocalVideoChat
{
    //本地选择前置摄像头
    [self chooseFrontFacingCamera];
    // open local video
    [AnyChatPlatform SetSDKOptionInt:BRAC_SO_LOCALVIDEO_OVERLAY : 1];
    [AnyChatPlatform UserSpeakControl: -1 : YES];
    [AnyChatPlatform SetVideoPos:-1 : self:0:0:0:0];
    [AnyChatPlatform UserCameraControl:-1 : YES];
   
    [AnyChatPlatform SetSDKOptionInt:BRAC_SO_LOCALVIDEO_AUTOROTATION :0];  //1:允许画面旋转,0:禁止画面旋转
    [AnyChatPlatform UserInfoControl: -1 : BRAC_USERINFO_CTRLCODE_ROTATION : BRAC_ROTATION_FLAGS_MIRRORED : 0 : @""];
    [AnyChatPlatform UserInfoControl: -1 : BRAC_USERINFO_CTRLCODE_ROTATION : BRAC_ROTATION_FLAGS_ROTATION90 : 0 : @""];
}


/*【OnLocalVideoInit】方法会在打开摄像头时由内核主动调用,【OnLocalVideoRelease】方法会在摄像头销毁时由内核主动调用*/
- (void) OnLocalVideoInit:(id) session
{
    self.localVideoSurface = [AVCaptureVideoPreviewLayer layerWithSession: (AVCaptureSession*)session];
    self.localVideoSurface.frame = CGRectMake(24, 312, 136, 114);
    self.localVideoSurface.videoGravity = AVLayerVideoGravityResizeAspectFill;
   
    [self.view.layer addSublayer:self.localVideoSurface];
}

- (void) OnLocalVideoRelease:(id)sender
{
    if(self.localVideoSurface)
    {
        self.localVideoSurface = nil;
    }
}

作者: william2014    时间: 2014-8-28 18:02
chenxs 发表于 2014-8-28 17:54
注意下 内容管理, 你得对象 没初始化或者已被销毁掉了,然后你方法还在调用他.

你指的是具体哪个对象,能否具体详细点呢?
作者: admin    时间: 2014-8-28 21:51
-[UIImageView OnLocalVideoInit:]: unrecognized selector sent to instance 0x89d2800

从出错提示来看,是“self.localVideoSurface”出现了问题,是否有在其它地方操作“self.localVideoSurface”?

没有任何改动,一直使用都是ok的,今天不知为何出现概率很高

使用我们的标准示例程序,也会存在同样的问题吗?
作者: william2014    时间: 2014-8-29 08:47
admin 发表于 2014-8-28 21:51
从出错提示来看,是“self.localVideoSurface”出现了问题,是否有在其它地方操作“self.localVideoSurfa ...

这一部分基本都是demo程序移植过来的,我们没有进行修改,一直没有问题,我们与对方进行视频通话,有可能是对方进行修改,导致我们这边这种崩溃吗?
作者: 廖斌    时间: 2014-8-29 09:10
william2014 发表于 2014-8-29 08:47
这一部分基本都是demo程序移植过来的,我们没有进行修改,一直没有问题,我们与对方进行视频通话,有可能 ...

有没有涉及到“self.localVideoSurface”的修改呢?
作者: admin    时间: 2014-8-29 09:44
我们没有进行修改,一直没有问题,我们与对方进行视频通话,有可能是对方进行修改,导致我们这边这种崩溃吗?

不会因为对方的原因导致本地视频采集的异常。建议上传完整的日志文件我们帮您分析一下,可以用这个工具获取:http://bbs.anychat.cn/forum.php? ... &extra=page%3D1
作者: william2014    时间: 2014-8-29 11:27
admin 发表于 2014-8-29 09:44
不会因为对方的原因导致本地视频采集的异常。建议上传完整的日志文件我们帮您分析一下,可以用这个工具获 ...

对端(B)只是进行了视频服务器升级为4115,我这边(A)也是最新的sdk,以前测试时都没有问题,今天测试突然都出了问题,感觉很奇怪,代码程序一直没有动过。而且做了一下验证测试,进一步发现:
(1)注释掉  [self StartLocalVideoChat];依然崩溃;说明不是本地造成的崩溃,我初次发现有误。
(2)StartRemoteVideoChat 中注释掉[AnyChatPlatform SetVideoPos: userid : self.remoteVideoSurface:25:43:269:222];后,不会再崩溃;
以下为一次前段日志:

2014-08-29 11:22:21.080 EnterpriseStockMaster[491:92891] Load libmediautil.so success!(V4.9 Build Time:May  7 2014 09:38:32)
2014-08-29 11:22:21.085 EnterpriseStockMaster[491:92891] Load libmediashow.so success!(V4.9 Build Time:May  7 2014 09:38:28)
2014-08-29 11:22:21.089 EnterpriseStockMaster[491:92891] Load libmediacore.so success!(V4.9 Build Time:May  7 2014 09:38:25)
2014-08-29 11:22:21.100 EnterpriseStockMaster[491:92573] Invoke        BRAC_SetSDKOption(BRAC_SO_NETWORK_P2PPOLITIC=0)
2014-08-29 11:22:21.102 EnterpriseStockMaster[491:92573] Apply video parameter:352x288, bitrate:150000, quality:3, gop:24, fps:10, preset:2, codec:0
2014-08-29 11:22:21.104 EnterpriseStockMaster[491:92573] Invoke        EnterRoom(roomid=10010522)
2014-08-29 11:22:21.152 EnterpriseStockMaster[491:92891] Connection to streaming media server successfully!(udp delay:29ms)
2014-08-29 11:22:21.255 EnterpriseStockMaster[491:92891] Message        OnEnterRoom(roomid=10010522,errorcode=0,siteindex=1)
2014-08-29 11:22:21.585 EnterpriseStockMaster[491:92891] Audio Playback Device Init(0, 1, 16000, 16), ios Playback Driver
2014-08-29 11:22:21.590 EnterpriseStockMaster[491:92891] Message        OnReceiveOnlineUser(count=2,roomid=10010522)
2014-08-29 11:22:21.599 EnterpriseStockMaster[491:92573] Invoke        UserSpeakControl(userid=-1,bOpen=1)
2014-08-29 11:22:21.601 EnterpriseStockMaster[491:92573] Audio record control:1, result:-1
2014-08-29 11:22:21.604 EnterpriseStockMaster[491:92573] Invoke        BRAC_SetVideoPos(dwUserId:-1, hWnd:0x32aa800, l:0, t:0, r:0, b:0)
2014-08-29 11:22:21.606 EnterpriseStockMaster[491:92573] Invoke        UserCameraControl(userid=-1,bOpen=1)
2014-08-29 11:22:21.608 EnterpriseStockMaster[491:92573] Invoke        UserSpeakControl(userid=10522,bOpen=1)
2014-08-29 11:22:21.653 EnterpriseStockMaster[491:92895] Default Audio Capture Driver()
2014-08-29 11:22:21.656 EnterpriseStockMaster[491:92573] Invoke        BRAC_SetVideoPos(dwUserId:10522, hWnd:0xacbcc20, l:25, t:43, r:269, b:222)
2014-08-29 11:22:21.658 EnterpriseStockMaster[491:92895] Audio Init, error:0, device:0, 1, 16000, 16, capmode:0
2014-08-29 11:22:21.661 EnterpriseStockMaster[491:92573] Invoke        UserCameraControl(userid=10522,bOpen=1)
2014-08-29 11:22:21.664 EnterpriseStockMaster[491:92895] Audio codec init, handle:1, 11, 1, 16000, 16, 15850
>>11:22:21.665445 [trace] <openAcount> ***视频见证:对方视频网络状态remoteNetworkStatus:5*** - VideoChatController.m:1270
>>11:22:21.665765 [trace] <openAcount> ***对端视频状态GetCameraState:1*** - VideoChatController.m:1274
2014-08-29 11:22:21.772 EnterpriseStockMaster[491:92895] WARNING: -[<AVCaptureConnection: 0xacd11d0> isVideoMinFrameDurationSupported] is deprecated.  Please use AVCaptureDevice activeFormat.videoSupportedFrameRateRanges
2014-08-29 11:22:21.775 EnterpriseStockMaster[491:92895] WARNING: -[<AVCaptureConnection: 0xacd11d0> setVideoMinFrameDuration:] is deprecated.  Please use AVCaptureDevice setActiveVideoMinFrameDuration
2014-08-29 11:22:21.778 EnterpriseStockMaster[491:92573] -[UIImageView OnLocalVideoInit:]: unrecognized selector sent to instance 0xacbcc20
2014-08-29 11:22:21.923 EnterpriseStockMaster[491:92924] Audio FX Status: VAD:1, NS:1, AGC:1, AEC:1
>>11:22:21.948525 [fatal] <(null)> CRASH: -[UIImageView OnLocalVideoInit:]: unrecognized selector sent to instance 0xacbcc20
Stack Trace: (
        0   CoreFoundation                      0x25f2cf8f <redacted> + 150
        1   libobjc.A.dylib                     0x33077c77 objc_exception_throw + 38
        2   CoreFoundation                      0x25f3236d <redacted> + 0
        3   CoreFoundation                      0x25f30249 <redacted> + 712
        4   CoreFoundation                      0x25e61d58 _CF_forwarding_prep_0 + 24
        5   Foundation                          0x26ca52af <redacted> + 386
        6   CoreFoundation                      0x25ef37f7 <redacted> + 14
        7   CoreFoundation                      0x25ef2c0b <redacted> + 222
        8   CoreFoundation                      0x25ef1289 <redacted> + 768
        9   CoreFoundation                      0x25e3eda1 CFRunLoopRunSpecific + 476
        10  CoreFoundation                      0x25e3ebb3 CFRunLoopRunInMode + 106
        11  GraphicsServices                    0x2d36c051 GSEventRunModal + 136
        12  UIKit                               0x29566c41 UIApplicationMain + 1440
        13  EnterpriseStockMaster               0x0053b349 main + 116
        14  EnterpriseStockMaster               0x00538c48 start + 40
) - UnCaughtExceptionHandlerForWind.m:28
connect time out
2014-08-29 11:22:22.248 EnterpriseStockMaster[491:92866] Capture pixel format=NV12
2014-08-29 11:22:22.959 EnterpriseStockMaster[491:92573] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView OnLocalVideoInit:]: unrecognized selector sent to instance 0xacbcc20'
*** First throw call stack:
(0x25f2cf77 0x33077c77 0x25f3236d 0x25f30249 0x25e61d58 0x26ca52af 0x25ef37f7 0x25ef2c0b 0x25ef1289 0x25e3eda1 0x25e3ebb3 0x2d36c051 0x29566c41 0x53b349 0x538c48)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
作者: admin    时间: 2014-8-29 11:33
Load libmediautil.so success!(V4.9 Build Time:May  7 2014 09:38:32)

您iOS平台的SDK还是较早期的老版本,建议升级到最新版本

Invoke        UserCameraControl(userid=-1,bOpen=1)

从Log来看,您还是有打开本地的视频,请将注释掉  [self StartLocalVideoChat];之后依然崩溃时的log再贴上来,谢谢。
作者: william2014    时间: 2014-8-29 11:41
admin 发表于 2014-8-29 11:33
您iOS平台的SDK还是较早期的老版本,建议升级到最新版本

(1)奇怪了,我直接用你们5.0 demo中的sdk文件夹替换了我们的sdk文件夹,为何升级不成功?
(2)注掉之后的日志如下:
2014-08-29 11:38:54.710 EnterpriseStockMaster[518:96616] Server version: V5.0(Build Time:2014-08-01 17:30:24, Server OS:Linux)
2014-08-29 11:38:54.740 EnterpriseStockMaster[518:96616] Message        OnConnect(bSuccess:1, errorcode=0)
2014-08-29 11:38:54.752 EnterpriseStockMaster[518:96403] Invoke        LoginServer(username=user10522)
2014-08-29 11:38:55.088 EnterpriseStockMaster[518:96616] Message        OnLoginSystem(userid=10522,errorcode=0,username=user10522), msg deliver worked(0)
2014-08-29 11:38:55.092 EnterpriseStockMaster[518:96616] Load libmediautil.so success!(V4.9 Build Time:May  7 2014 09:38:32)
2014-08-29 11:38:55.094 EnterpriseStockMaster[518:96616] Load libmediashow.so success!(V4.9 Build Time:May  7 2014 09:38:28)
2014-08-29 11:38:55.096 EnterpriseStockMaster[518:96616] Load libmediacore.so success!(V4.9 Build Time:May  7 2014 09:38:25)
2014-08-29 11:38:55.112 EnterpriseStockMaster[518:96403] Invoke        BRAC_SetSDKOption(BRAC_SO_NETWORK_P2PPOLITIC=0)
2014-08-29 11:38:55.114 EnterpriseStockMaster[518:96403] Apply video parameter:352x288, bitrate:150000, quality:3, gop:24, fps:10, preset:2, codec:0
2014-08-29 11:38:55.116 EnterpriseStockMaster[518:96403] Invoke        EnterRoom(roomid=10010522)
2014-08-29 11:38:55.143 EnterpriseStockMaster[518:96616] Connection to streaming media server successfully!(udp delay:18ms)
2014-08-29 11:38:55.185 EnterpriseStockMaster[518:96616] Message        OnEnterRoom(roomid=10010522,errorcode=0,siteindex=0)
2014-08-29 11:38:55.589 EnterpriseStockMaster[518:96616] Audio Playback Device Init(0, 1, 16000, 16), ios Playback Driver
2014-08-29 11:38:55.591 EnterpriseStockMaster[518:96616] Message        OnReceiveOnlineUser(count=1,roomid=10010522)
2014-08-29 11:38:55.605 EnterpriseStockMaster[518:96403] Invoke        UserSpeakControl(userid=-1,bOpen=1)
2014-08-29 11:38:55.607 EnterpriseStockMaster[518:96403] Audio record control:1, result:-1
2014-08-29 11:38:55.610 EnterpriseStockMaster[518:96403] Invoke        BRAC_SetVideoPos(dwUserId:-1, hWnd:0x3152600, l:0, t:0, r:0, b:0)
2014-08-29 11:38:55.612 EnterpriseStockMaster[518:96403] Invoke        UserCameraControl(userid=-1,bOpen=1)
>>11:38:55.613343 [trace] <openAcount> ***视频见证:anychat对端id获取失败userid(坐席未进入房间,用户提前进入房间,等待30s再提示异常):10522*** - VideoChatController.m:1139
2014-08-29 11:38:55.616 EnterpriseStockMaster[518:96403] Invoke        UserSpeakControl(userid=-1,bOpen=1)
2014-08-29 11:38:55.704 EnterpriseStockMaster[518:96620] Default Audio Capture Driver()
2014-08-29 11:38:55.706 EnterpriseStockMaster[518:96403] Invoke        BRAC_SetVideoPos(dwUserId:-1, hWnd:0x3152600, l:0, t:0, r:0, b:0)
2014-08-29 11:38:55.709 EnterpriseStockMaster[518:96620] Audio Init, error:0, device:0, 1, 16000, 16, capmode:0
2014-08-29 11:38:55.713 EnterpriseStockMaster[518:96403] Invoke        UserCameraControl(userid=-1,bOpen=1)
2014-08-29 11:38:55.718 EnterpriseStockMaster[518:96620] Audio codec init, handle:1, 11, 1, 16000, 16, 15850
2014-08-29 11:38:55.952 EnterpriseStockMaster[518:96620] WARNING: -[<AVCaptureConnection: 0x24d8a50> isVideoMinFrameDurationSupported] is deprecated.  Please use AVCaptureDevice activeFormat.videoSupportedFrameRateRanges
2014-08-29 11:38:55.965 EnterpriseStockMaster[518:96620] WARNING: -[<AVCaptureConnection: 0x24d8a50> setVideoMinFrameDuration:] is deprecated.  Please use AVCaptureDevice setActiveVideoMinFrameDuration
2014-08-29 11:38:55.975 EnterpriseStockMaster[518:96656] Audio FX Status: VAD:1, NS:1, AGC:1, AEC:1
2014-08-29 11:38:56.620 EnterpriseStockMaster[518:96586] Capture pixel format=NV12
2014-08-29 11:38:56.622 EnterpriseStockMaster[518:96620] video init finish: 352x288, 25fps, fmt:100, ret:0
2014-08-29 11:38:56.624 EnterpriseStockMaster[518:96620] video init finish:352x288, YUV420, fps:25
2014-08-29 11:38:56.684 EnterpriseStockMaster[518:96616] Message        OnUserEnterRoom(userid=20000144,nickname=emp20000144,siteindex=1)
2014-08-29 11:38:56.704 EnterpriseStockMaster[518:96403] Invoke        UserSpeakControl(userid=10522,bOpen=1)
2014-08-29 11:38:56.707 EnterpriseStockMaster[518:96403] Invoke        UserCameraControl(userid=10522,bOpen=1)
2014-08-29 11:38:56.709 EnterpriseStockMaster[518:96403] Invoke        UserSpeakControl(userid=-1,bOpen=1)
[libx264 @ 0x31c4000] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x31c4000] profile Main, level 3.0
2014-08-29 11:38:56.787 EnterpriseStockMaster[518:96586] video codec init:codec:1, 10fps, 352x288, bitrate:150000, quality:3, preset:2, gop:24, handle:2
2014-08-29 11:38:56.792 EnterpriseStockMaster[518:96403] Invoke        BRAC_SetVideoPos(dwUserId:-1, hWnd:0x3152600, l:0, t:0, r:0, b:0)
2014-08-29 11:38:56.794 EnterpriseStockMaster[518:96403] Invoke        UserCameraControl(userid=-1,bOpen=1)
>>11:38:56.795975 [trace] <openAcount> ***视频见证:进入房间消息,OnAnyChatUserEnterRoom*** - VideoChatController.m:1204
connect time out
2014-08-29 11:38:58.085 EnterpriseStockMaster[518:96403] Received memory warning.

作者: admin    时间: 2014-8-29 11:53
奇怪了,您注释掉了“[self StartLocalVideoChat];”,为什么log中还会提示上层应用打开了本地摄像头的API:Invoke        UserCameraControl(userid=-1,bOpen=1) ?
作者: 廖斌    时间: 2014-8-29 12:08
william2014 发表于 2014-8-29 11:41
(1)奇怪了,我直接用你们5.0 demo中的sdk文件夹替换了我们的sdk文件夹,为何升级不成功?
(2)注掉之 ...

(1)是否还有其他位置的SDK引用呢?看下那个文件的修改时间?
作者: william2014    时间: 2014-8-29 12:35
admin 发表于 2014-8-29 11:53
奇怪了,您注释掉了“[self StartLocalVideoChat];”,为什么log中还会提示上层应用打开了本地摄像头的API ...

(1)不好意思,上一段代码是注掉  [AnyChatPlatform SetVideoPos: userid : self.remoteVideoSurface:25:43:269:222];的日志,(注掉之后不会崩溃)
(2)下面是仅仅注掉StartLocalVideoChat之后的日志,此时也不会崩溃,但是看不到对端视频:
2014-08-29 12:31:49.253 EnterpriseStockMaster[535:101778] Message OnLoginSystem(userid=10522,errorcode=0,username=user10522), msg deliver worked(0)
2014-08-29 12:31:49.256 EnterpriseStockMaster[535:101778] Load libmediautil.so success!(V4.9 Build Time:May  7 2014 09:38:32)
2014-08-29 12:31:49.258 EnterpriseStockMaster[535:101778] Load libmediashow.so success!(V4.9 Build Time:May  7 2014 09:38:28)
2014-08-29 12:31:49.263 EnterpriseStockMaster[535:101778] Load libmediacore.so success!(V4.9 Build Time:May  7 2014 09:38:25)
2014-08-29 12:31:49.278 EnterpriseStockMaster[535:101535] Invoke BRAC_SetSDKOption(BRAC_SO_NETWORK_P2PPOLITIC=0)
2014-08-29 12:31:49.280 EnterpriseStockMaster[535:101535] Apply video parameter:352x288, bitrate:150000, quality:3, gop:24, fps:10, preset:2, codec:0
2014-08-29 12:31:49.282 EnterpriseStockMaster[535:101535] Invoke EnterRoom(roomid=10010522)
2014-08-29 12:31:49.312 EnterpriseStockMaster[535:101778] Connection to streaming media server successfully!(udp delay:22ms)
2014-08-29 12:31:49.342 EnterpriseStockMaster[535:101778] Message OnEnterRoom(roomid=10010522,errorcode=0,siteindex=1)
2014-08-29 12:31:49.394 EnterpriseStockMaster[535:101778] Audio Playback Device Init(0, 1, 16000, 16), ios Playback Driver
2014-08-29 12:31:49.397 EnterpriseStockMaster[535:101778] Message OnReceiveOnlineUser(count=2,roomid=10010522)
2014-08-29 12:31:49.409 EnterpriseStockMaster[535:101535] Invoke UserSpeakControl(userid=10522,bOpen=1)
2014-08-29 12:31:49.412 EnterpriseStockMaster[535:101535] Audio record control:1, result:-1
2014-08-29 12:31:49.415 EnterpriseStockMaster[535:101535] Invoke BRAC_SetVideoPos(dwUserId:10522, hWnd:0x73aa3c0, l:25, t:43, r:269, b:222)
2014-08-29 12:31:49.417 EnterpriseStockMaster[535:101535] Invoke UserCameraControl(userid=10522,bOpen=1)
2014-08-29 12:31:49.440 EnterpriseStockMaster[535:102095] Default Audio Capture Driver()
2014-08-29 12:31:49.442 EnterpriseStockMaster[535:102095] Audio Init, error:0, device:0, 1, 16000, 16, capmode:0
2014-08-29 12:31:49.447 EnterpriseStockMaster[535:102095] Audio codec init, handle:3, 11, 1, 16000, 16, 15850
2014-08-29 12:31:49.531 EnterpriseStockMaster[535:102095] WARNING: -[<AVCaptureConnection: 0xf693ac0> isVideoMinFrameDurationSupported] is deprecated.  Please use AVCaptureDevice activeFormat.videoSupportedFrameRateRanges
2014-08-29 12:31:49.533 EnterpriseStockMaster[535:102095] WARNING: -[<AVCaptureConnection: 0xf693ac0> setVideoMinFrameDuration:] is deprecated.  Please use AVCaptureDevice setActiveVideoMinFrameDuration
2014-08-29 12:31:49.697 EnterpriseStockMaster[535:101828] Audio FX Status: VAD:1, NS:1, AGC:1, AEC:1
2014-08-29 12:31:49.984 EnterpriseStockMaster[535:101755] Capture pixel format=NV12
2014-08-29 12:31:49.990 EnterpriseStockMaster[535:102095] video init finish: 352x288, 25fps, fmt:100, ret:0
2014-08-29 12:31:49.992 EnterpriseStockMaster[535:102095] video init finish:352x288, YUV420, fps:25
[libx264 @ 0x2934c00] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x2934c00] profile Main, level 3.0
2014-08-29 12:31:50.106 EnterpriseStockMaster[535:101756] video codec init:codec:1, 10fps, 352x288, bitrate:150000, quality:3, preset:2, gop:24, handle:4
[swscaler @ 0x1997b000] No accelerated colorspace conversion found from yuv420p to bgra.
[swscaler @ 0x1997b000] No accelerated colorspace conversion found from yuv420p to bgra.
[swscaler @ 0x1997b000] No accelerated colorspace conversion found from yuv420p to bgra.
[swscaler @ 0x1997b000] No accelerated colorspace conversion found from yuv420p to bgra.
[swscaler @ 0x1997b000] No accelerated colorspace conversion found from yuv420p to bgra.
[swscaler @ 0x1997b000] No accelerated colorspace conversion found from yuv420p to bgra.
[swscaler @ 0x1997b000] No accelerated colorspace conversion found from yuv420p to bgra.
[swscaler @ 0x1997b000] No accelerated colorspace conversion found from yuv420p to bgra.
[swscaler @ 0x1997b000] No accelerated colorspace conversion found from yuv420p to bgra.

作者: admin    时间: 2014-8-29 12:58
您好,上面这份日志好象也不是注释掉“[self StartLocalVideoChat];”之后的,因为依然有打开本地视频API调用的记录:
2014-08-29 12:31:49.417 EnterpriseStockMaster[535:101535] Invoke UserCameraControl(userid=10522,bOpen=1)
因为10522就是本地用户ID:
Message OnLoginSystem(userid=10522,errorcode=0,username=user10522)

请再次确认一下?
作者: william2014    时间: 2014-8-29 13:08
本帖最后由 william2014 于 2014-8-29 13:15 编辑
admin 发表于 2014-8-29 12:58
您好,上面这份日志好象也不是注释掉“[self StartLocalVideoChat];”之后的,因为依然有打开本地视频API调 ...


没错,就是这样子,UserCameraControl(userid=10522,bOpen=1) 这个应该是第一次苹果提示我就打开了,所以就一直开着了~,对端用户就是10522没错。
2014-08-29 13:05:20.124 EnterpriseStockMaster[556:106210] Message        OnLoginSystem(userid=10522,errorcode=0,username=user10522), msg deliver worked(0)
2014-08-29 13:05:20.130 EnterpriseStockMaster[556:106210] Load libmediautil.so success!(V4.9 Build Time:May  7 2014 09:38:32)
2014-08-29 13:05:20.134 EnterpriseStockMaster[556:106210] Load libmediashow.so success!(V4.9 Build Time:May  7 2014 09:38:28)
2014-08-29 13:05:20.136 EnterpriseStockMaster[556:106210] Load libmediacore.so success!(V4.9 Build Time:May  7 2014 09:38:25)
2014-08-29 13:05:20.145 EnterpriseStockMaster[556:106015] Invoke        BRAC_SetSDKOption(BRAC_SO_NETWORK_P2PPOLITIC=0)
2014-08-29 13:05:20.147 EnterpriseStockMaster[556:106015] Apply video parameter:352x288, bitrate:150000, quality:3, gop:24, fps:10, preset:2, codec:0
2014-08-29 13:05:20.149 EnterpriseStockMaster[556:106015] Invoke        EnterRoom(roomid=10010522)
2014-08-29 13:05:20.208 EnterpriseStockMaster[556:106210] Connection to streaming media server successfully!(udp delay:34ms)
2014-08-29 13:05:20.282 EnterpriseStockMaster[556:106210] Message        OnEnterRoom(roomid=10010522,errorcode=0,siteindex=1)
2014-08-29 13:05:20.612 EnterpriseStockMaster[556:106210] Audio Playback Device Init(0, 1, 16000, 16), ios Playback Driver
2014-08-29 13:05:20.616 EnterpriseStockMaster[556:106210] Message        OnReceiveOnlineUser(count=2,roomid=10010522)
2014-08-29 13:05:20.631 EnterpriseStockMaster[556:106015] Invoke        UserSpeakControl(userid=10522,bOpen=1)
2014-08-29 13:05:20.633 EnterpriseStockMaster[556:106015] Audio record control:1, result:-1
2014-08-29 13:05:20.636 EnterpriseStockMaster[556:106015] Invoke        BRAC_SetVideoPos(dwUserId:10522, hWnd:0x730b2b0, l:25, t:43, r:269, b:222)
2014-08-29 13:05:20.638 EnterpriseStockMaster[556:106015] Invoke        UserCameraControl(userid=10522,bOpen=1)
2014-08-29 13:05:20.699 EnterpriseStockMaster[556:106214] Default Audio Capture Driver()
2014-08-29 13:05:20.702 EnterpriseStockMaster[556:106214] Audio Init, error:0, device:0, 1, 16000, 16, capmode:0
2014-08-29 13:05:20.708 EnterpriseStockMaster[556:106214] Audio codec init, handle:1, 11, 1, 16000, 16, 15850
2014-08-29 13:05:20.792 EnterpriseStockMaster[556:106214] WARNING: -[<AVCaptureConnection: 0x2360c10> isVideoMinFrameDurationSupported] is deprecated.  Please use AVCaptureDevice activeFormat.videoSupportedFrameRateRanges
2014-08-29 13:05:20.793 EnterpriseStockMaster[556:106214] WARNING: -[<AVCaptureConnection: 0x2360c10> setVideoMinFrameDuration:] is deprecated.  Please use AVCaptureDevice setActiveVideoMinFrameDuration
2014-08-29 13:05:20.966 EnterpriseStockMaster[556:106279] Audio FX Status: VAD:1, NS:1, AGC:1, AEC:1
connect time out
2014-08-29 13:05:21.258 EnterpriseStockMaster[556:106304] Capture pixel format=NV12
2014-08-29 13:05:21.266 EnterpriseStockMaster[556:106214] video init finish: 352x288, 25fps, fmt:100, ret:0
2014-08-29 13:05:21.268 EnterpriseStockMaster[556:106214] video init finish:352x288, YUV420, fps:25
[libx264 @ 0x316fc00] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x316fc00] profile Main, level 3.0
2014-08-29 13:05:21.420 EnterpriseStockMaster[556:106304] video codec init:codec:1, 10fps, 352x288, bitrate:150000, quality:3, preset:2, gop:24, handle:2
[swscaler @ 0x19e66000] No accelerated colorspace conversion found from yuv420p to bgra.
[swscaler @ 0x19e66000] No accelerated colorspace conversion found from yuv420p to bgra.
作者: admin    时间: 2014-8-29 13:51
对端用户就是10522没错

您上传的这份日志信息是本地的,还是对端的?

从日志信息来看,这份日志的本地userid=10522,对方的userid=10010522,同时日志中也显示打开了本地摄像头:
Invoke        UserCameraControl(userid=10522,bOpen=1)

所以,这份日志不像在userid=10522这边屏蔽了“[self StartLocalVideoChat];”之后的日志?
也就是说,如果上层应用屏蔽了“[self StartLocalVideoChat];”之后,则日志不应该出现:
Invoke        UserCameraControl(userid=本地用户ID,bOpen=1)或是:
Invoke        UserCameraControl(userid=-1,bOpen=1)
这两条日志记录,如果屏蔽之后,日志还会出现,则请检查一下代码。

请确认,谢谢。



作者: william2014    时间: 2014-8-29 14:06
admin 发表于 2014-8-29 13:51
您上传的这份日志信息是本地的,还是对端的?

从日志信息来看,这份日志的本地userid=10522,对方的us ...

抱歉,我只是屏蔽了我本地的,对端10522的我是无法屏蔽的。
作者: admin    时间: 2014-8-29 14:15
亲,请上传您本地的日志,我们分析一下。前面我们一直是希望您上传本地(崩溃这一端)的日志喔。
作者: william2014    时间: 2014-8-29 18:12
admin 发表于 2014-8-29 14:15
亲,请上传您本地的日志,我们分析一下。前面我们一直是希望您上传本地(崩溃这一端)的日志喔。

你好,这个问题我们应该基本解决了,初步定位为anychat请求视频时拿到的对端userid是一个无效的id。我会继续跟踪,十分感谢你们~
作者: liyukun    时间: 2015-8-27 18:58
楼主解决了吗?
作者: liyukun    时间: 2015-8-27 18:58
我这打开麦克风是这种情况
作者: kenshin    时间: 2015-12-24 17:04
本帖最后由 kenshin 于 2015-12-24 17:10 编辑

error

阿大声道.jpg (135.44 KB, 下载次数: 10461)

阿大声道.jpg

作者: kenshin    时间: 2015-12-24 17:10
william2014 发表于 2014-8-29 18:12
你好,这个问题我们应该基本解决了,初步定位为anychat请求视频时拿到的对端userid是一个无效的id。我会 ...

可以一直这样问你问题吗?感觉我快要弄完了。
你好,我又遇到一个问题,我的demo 在视频通讯的时候只显示了我本地的视频,而对方的没有显示。
下面是xcode给出的警告,我是照着官方demo写的。只是在引用全局变量的时候 xcode提示我使用self.xxx,所以我就做了这项修改。


作者: 佰锐科技-陈伟    时间: 2015-12-24 17:37
kenshin 发表于 2015-12-24 17:10
可以一直这样问你问题吗?感觉我快要弄完了。
你好,我又遇到一个问题,我的demo 在视频通讯的时候只显 ...

您好  对方已经有视频过来了,检查下显示对方视频控件是否正常
作者: kenshin    时间: 2015-12-25 09:26
佰锐科技-陈伟 发表于 2015-12-24 17:37
您好  对方已经有视频过来了,检查下显示对方视频控件是否正常

YEAH 问题已经解决了, 我显示远程视频的imageview 初始化的地方写错了




欢迎光临 AnyChat技术支持论坛 (http://bbs.anychat.cn/) Powered by Discuz! X3