设为首页收藏本站

AnyChat技术支持论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 13369|回复: 13
打印 上一主题 下一主题

IPAD摄像头切换发生的问题

[复制链接]

4

主题

21

帖子

62

积分

注册会员

Rank: 2

积分
62
跳转到指定楼层
楼主
发表于 2014-11-10 12:07:04 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我这里在IPAD AIR和IPAD2都重现了一个摄像头切换的问题。
具体描述如下:
1.先打开前置摄像头,网络对方和我自己都能正确看到我的图像
2.然后切换后摄像头,网络对方看到切换后的画面,但我本机的画面冻结了。
3.随后再反复切换,网络对方都能正确反映切换的画面,但我本机的画面一直冻结不变。
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

249

主题

2967

帖子

9108

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
9108
沙发
发表于 2014-11-10 12:13:00 | 只看该作者
您好,请问您是使用的SDK包里面的标准示例程序测试的,还是用您自己写的程序来测试的?

是否有使用的SDK包src目录下helloAnyChat来验证一下呢?
回复 支持 反对

使用道具 举报

4

主题

21

帖子

62

积分

注册会员

Rank: 2

积分
62
板凳
 楼主| 发表于 2014-11-10 13:15:41 | 只看该作者
我参考helloAnyChat自己写的程序,helloAnyChat没有问题。我也觉得很奇怪,不知道是否有什么因素没有考虑?
回复 支持 反对

使用道具 举报

249

主题

2967

帖子

9108

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
9108
地板
发表于 2014-11-10 13:46:34 | 只看该作者
是否没有更新SDK(.h头文件以及.a库)到最新的版本?
请将SDK输出的相关日志贴上来,我们帮您分析一下,谢谢。
回复 支持 反对

使用道具 举报

4

主题

21

帖子

62

积分

注册会员

Rank: 2

积分
62
5#
 楼主| 发表于 2014-11-10 14:26:38 | 只看该作者
我通过双击进行切换摄像头。这是相关日志:

2014-11-10 14:18:24.113 CVNetVideo[365:214535] Invoke        EnterRoom(strongs)
2014-11-10 14:18:24.115 CVNetVideo[365:214535] Invoke        AudioGetVolume(device:0, dwVolume:50)=0
2014-11-10 14:18:24.118 CVNetVideo[365:214535] Invoke        AudioGetVolume(device:1, dwVolume:50)=0
2014-11-10 14:18:24.124 CVNetVideo[365:214535] Invoke        BRAC_SetVideoPos(dwUserId:-1, hWnd:0x4e68720, l:0, t:0, r:0, b:0)
2014-11-10 14:18:24.128 CVNetVideo[365:214535] Invoke        UserCameraControl(userid=-1,bOpen=0)
2014-11-10 14:18:24.418 CVNetVideo[365:214593] Message        OnEnterRoom(roomid=355,errorcode=0,siteindex=0)
2014-11-10 14:18:24.534 CVNetVideo[365:214593] Audio Playback Device Init(0, 1, 16000, 16), ios Playback Driver
2014-11-10 14:18:24.537 CVNetVideo[365:214593] Message        OnReceiveOnlineUser(count=1,roomid=355)
2014-11-10 14:18:24.540 CVNetVideo[365:214535] 成功进入房间'strongs'(355)
2014-11-10 14:18:24.543 CVNetVideo[365:214535] Invoke        UserCameraControl(userid=-1,bOpen=0)
2014-11-10 14:18:24.547 CVNetVideo[365:214535] Invoke        UserSpeakControl(userid=-1,bOpen=0)
2014-11-10 14:18:40.629 CVNetVideo[365:214535] Invoke        UserCameraControl(userid=-1,bOpen=1)
2014-11-10 14:18:40.634 CVNetVideo[365:214535] Invoke        UserCameraControl(userid=-1,bOpen=1)
2014-11-10 14:18:40.748 CVNetVideo[365:214597] WARNING: -[<AVCaptureConnection: 0x13e393c0> isVideoMinFrameDurationSupported] is deprecated.  Please use AVCaptureDevice activeFormat.videoSupportedFrameRateRanges
2014-11-10 14:18:40.749 CVNetVideo[365:214597] WARNING: -[<AVCaptureConnection: 0x13e393c0> setVideoMinFrameDuration:] is deprecated.  Please use AVCaptureDevice setActiveVideoMinFrameDuration
2014-11-10 14:18:41.331 CVNetVideo[365:214597] video init finish: 480x360, 25fps, fmt:106, ret:0
2014-11-10 14:18:41.334 CVNetVideo[365:214597] video init finish:480x360, NV12, fps:25
[libx264 @ 0x2220c10] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x2220c10] profile High, level 2.1
2014-11-10 14:18:41.418 CVNetVideo[365:214559] video codec init:codec:1, 15fps, 480x360, bitrate:90kbps, quality:3, preset:3, gop:30, handle:1
2014-11-10 14:18:44.737 CVNetVideo[365:214535] handleDoubleTap::当前设置的摄像头:1-Back Facing Camera
2014-11-10 14:18:44.844 CVNetVideo[365:214597] WARNING: -[<AVCaptureConnection: 0x13e93160> isVideoMinFrameDurationSupported] is deprecated.  Please use AVCaptureDevice activeFormat.videoSupportedFrameRateRanges
2014-11-10 14:18:44.845 CVNetVideo[365:214597] WARNING: -[<AVCaptureConnection: 0x13e93160> setVideoMinFrameDuration:] is deprecated.  Please use AVCaptureDevice setActiveVideoMinFrameDuration
2014-11-10 14:18:44.997 CVNetVideo[365:214597] video init finish: 480x360, 25fps, fmt:106, ret:0
2014-11-10 14:18:45.003 CVNetVideo[365:214597] video init finish:480x360, NV12, fps:25
[libx264 @ 0x222fa10] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x222fa10] profile High, level 2.1
2014-11-10 14:18:45.058 CVNetVideo[365:214559] video codec init:codec:1, 15fps, 480x360, bitrate:90kbps, quality:3, preset:3, gop:30, handle:2
回复 支持 反对

使用道具 举报

249

主题

2967

帖子

9108

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
9108
6#
发表于 2014-11-10 14:31:56 | 只看该作者
日志好象不全,前面部分呢?有加载库、初始化什么的,麻烦提供一下,谢谢。
回复 支持 反对

使用道具 举报

4

主题

21

帖子

62

积分

注册会员

Rank: 2

积分
62
7#
 楼主| 发表于 2014-11-10 14:44:29 | 只看该作者
2014-11-10 14:40:52.093 CVNetVideo[396:219347] ---------------------------AnyChat Platform Core SDK Client Log---------------------------
2014-11-10 14:40:52.097 CVNetVideo[396:219347] Load libanychatcore.so success!(V5.1 Build Time:Oct 14 2014 11:32:15)
2014-11-10 14:40:52.100 CVNetVideo[396:219347] Load libmediautil.so success!(V5.2 Build Time:Oct 14 2014 11:32:54)
2014-11-10 14:40:52.103 CVNetVideo[396:219347] Load libmediashow.so success!(V5.1 Build Time:Oct 14 2014 11:32:48)
2014-11-10 14:40:52.107 CVNetVideo[396:219347] Load libmediacore.so success!(V5.1 Build Time:Oct 14 2014 11:32:42)
2014-11-10 14:40:52.861 CVNetVideo[396:219347] Invoke        BRAC_Connect(demo.anychat.cn,8906)=0
2014-11-10 14:40:52.865 CVNetVideo[396:219347] Invoke        LoginServer(username=strongs111)
2014-11-10 14:40:52.966 CVNetVideo[396:219412] CheckClientSocketLink         Connect(ip=121.199.51.198,port=8906)
2014-11-10 14:40:53.124 CVNetVideo[396:219412] Server version: V5.1(Build Time:2014-09-23 22:23:30, Server OS:Windows)
2014-11-10 14:40:53.149 CVNetVideo[396:219412] Message        OnConnect(bSuccess:1, errorcode=0)
2014-11-10 14:40:53.454 CVNetVideo[396:219347] 当前设置的摄像头:2-Front Facing Camera
2014-11-10 14:40:53.476 CVNetVideo[396:219347] Reachability Flag Status: -R ------d localWiFiStatusForFlags
2014-11-10 14:40:53.558 CVNetVideo[396:219412] Message        OnLoginSystem(userid=-17316,errorcode=0,username=strongs111), msg deliver worked(0)
2014-11-10 14:40:53.562 CVNetVideo[396:219412] Load libmediautil.so success!(V5.2 Build Time:Oct 14 2014 11:32:54)
2014-11-10 14:40:53.566 CVNetVideo[396:219412] Load libmediashow.so success!(V5.1 Build Time:Oct 14 2014 11:32:48)
2014-11-10 14:40:53.573 CVNetVideo[396:219412] Load libmediacore.so success!(V5.1 Build Time:Oct 14 2014 11:32:42)
2014-11-10 14:40:53.691 CVNetVideo[396:219412] Connection to streaming media server successfully!(udp delay:56ms)
2014-11-10 14:40:53.740 CVNetVideo[396:219347] 用户'strongs111'(-17316)登录服务器成功!
2014-11-10 14:40:57.729 CVNetVideo[396:219347] Invoke        EnterRoom(strongs)
2014-11-10 14:40:57.734 CVNetVideo[396:219347] Invoke        AudioGetVolume(device:0, dwVolume:50)=0
2014-11-10 14:40:57.736 CVNetVideo[396:219347] Invoke        AudioGetVolume(device:1, dwVolume:50)=0
2014-11-10 14:40:57.739 CVNetVideo[396:219347] Invoke        BRAC_SetVideoPos(dwUserId:-1, hWnd:0x6b50280, l:0, t:0, r:0, b:0)
2014-11-10 14:40:57.742 CVNetVideo[396:219347] Invoke        UserCameraControl(userid=-1,bOpen=0)
2014-11-10 14:40:58.071 CVNetVideo[396:219412] Message        OnEnterRoom(roomid=357,errorcode=0,siteindex=1)
2014-11-10 14:40:58.185 CVNetVideo[396:219412] Audio Playback Device Init(0, 1, 16000, 16), ios Playback Driver
2014-11-10 14:40:58.190 CVNetVideo[396:219412] Message        OnReceiveOnlineUser(count=2,roomid=357)
2014-11-10 14:40:58.197 CVNetVideo[396:219347] 成功进入房间'strongs'(357)
2014-11-10 14:40:58.201 CVNetVideo[396:219347] Invoke        UserCameraControl(userid=-1,bOpen=0)
2014-11-10 14:40:58.206 CVNetVideo[396:219347] Invoke        UserSpeakControl(userid=-1,bOpen=0)
2014-11-10 14:40:58.210 CVNetVideo[396:219347] Invoke        BRAC_SetVideoPos(dwUserId:-17313, hWnd:0xb67e2e0, l:0, t:0, r:177, b:236)
2014-11-10 14:40:58.213 CVNetVideo[396:219347] Invoke        UserCameraControl(userid=-17313,bOpen=1)
2014-11-10 14:40:58.216 CVNetVideo[396:219347] Invoke        UserSpeakControl(userid=-17313,bOpen=1)
2014-11-10 14:40:58.401 CVNetVideo[396:219412] On Remote UserCameraControl(dwUserId:-17313, bOpen:1)
2014-11-10 14:40:58.441 CVNetVideo[396:219412] On Remote UserSpeakControl(dwUserId:-17313, bOpen:1)
2014-11-10 14:40:58.445 CVNetVideo[396:219412] Message        OnP2PConnectState(userid=-17313, state=1)
2014-11-10 14:40:58.501 CVNetVideo[396:219423] userid(-17313) video decode delay:5ms
2014-11-10 14:40:58.776 CVNetVideo[396:219412] Message        OnP2PConnectState(userid=-17313, state=3)
2014-11-10 14:40:59.995 CVNetVideo[396:219347] Invoke        UserCameraControl(userid=-1,bOpen=1)
2014-11-10 14:40:59.998 CVNetVideo[396:219347] Invoke        UserCameraControl(userid=-1,bOpen=1)
2014-11-10 14:41:00.114 CVNetVideo[396:219416] WARNING: -[<AVCaptureConnection: 0x1c88d2b0> isVideoMinFrameDurationSupported] is deprecated.  Please use AVCaptureDevice activeFormat.videoSupportedFrameRateRanges
2014-11-10 14:41:00.115 CVNetVideo[396:219416] WARNING: -[<AVCaptureConnection: 0x1c88d2b0> setVideoMinFrameDuration:] is deprecated.  Please use AVCaptureDevice setActiveVideoMinFrameDuration
2014-11-10 14:41:00.696 CVNetVideo[396:219416] video init finish: 480x360, 25fps, fmt:106, ret:0
2014-11-10 14:41:00.699 CVNetVideo[396:219416] video init finish:480x360, NV12, fps:25
[libx264 @ 0x222ae10] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x222ae10] profile High, level 2.1
2014-11-10 14:41:00.772 CVNetVideo[396:219380] video codec init:codec:1, 15fps, 480x360, bitrate:90kbps, quality:3, preset:3, gop:30, handle:2
[libx264 @ 0x222ae10] frame I:2     Avg QP:23.32  size:  2498
[libx264 @ 0x222ae10] frame P:17    Avg QP:34.59  size:  1037
[libx264 @ 0x222ae10] mb I  I16..4: 47.4% 49.7%  2.9%
[libx264 @ 0x222ae10] mb P  I16..4: 10.0% 10.2%  0.0%  P16..4: 22.8%  7.7%  1.6%  0.0%  0.0%    skip:47.6%
[libx264 @ 0x222ae10] 8x8 transform intra:50.2% inter:60.9%
[libx264 @ 0x222ae10] coded y,uvDC,uvAC intra: 21.1% 16.1% 0.2% inter: 3.8% 5.5% 0.0%
[libx264 @ 0x222ae10] i16 v,h,dc,p: 41% 26% 18% 15%
[libx264 @ 0x222ae10] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 12% 57%  3%  3%  3%  3%  3%  3%
[libx264 @ 0x222ae10] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 19% 28%  3%  8%  7%  4%  7%  8%
[libx264 @ 0x222ae10] i8c dc,h,v,p: 83%  7%  9%  0%
[libx264 @ 0x222ae10] Weighted P-Frames: Y:47.1% UV:41.2%
[libx264 @ 0x222ae10] kb/s:142.89
2014-11-10 14:41:02.100 CVNetVideo[396:219347] handleDoubleTap::当前设置的摄像头:1-Back Facing Camera
2014-11-10 14:41:02.209 CVNetVideo[396:219416] WARNING: -[<AVCaptureConnection: 0x13d68290> isVideoMinFrameDurationSupported] is deprecated.  Please use AVCaptureDevice activeFormat.videoSupportedFrameRateRanges
2014-11-10 14:41:02.209 CVNetVideo[396:219416] WARNING: -[<AVCaptureConnection: 0x13d68290> setVideoMinFrameDuration:] is deprecated.  Please use AVCaptureDevice setActiveVideoMinFrameDuration
2014-11-10 14:41:02.359 CVNetVideo[396:219416] video init finish: 480x360, 25fps, fmt:106, ret:0
2014-11-10 14:41:02.363 CVNetVideo[396:219416] video init finish:480x360, NV12, fps:25
[libx264 @ 0x2262e10] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x2262e10] profile High, level 2.1
2014-11-10 14:41:02.425 CVNetVideo[396:219392] video codec init:codec:1, 15fps, 480x360, bitrate:90kbps, quality:3, preset:3, gop:30, handle:3
[libx264 @ 0x2262e10] frame I:3     Avg QP:32.45  size:  2096
[libx264 @ 0x2262e10] frame P:76    Avg QP:30.06  size:   771
[libx264 @ 0x2262e10] mb I  I16..4: 50.6% 46.2%  3.2%
[libx264 @ 0x2262e10] mb P  I16..4:  6.3%  4.6%  0.0%  P16..4: 22.7%  5.9%  1.2%  0.0%  0.0%    skip:59.3%
[libx264 @ 0x2262e10] 8x8 transform intra:43.3% inter:40.5%
[libx264 @ 0x2262e10] coded y,uvDC,uvAC intra: 20.6% 15.0% 0.6% inter: 3.0% 4.8% 0.0%
[libx264 @ 0x2262e10] i16 v,h,dc,p: 54% 21% 19%  6%
[libx264 @ 0x2262e10] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 11% 55%  2%  5%  3%  5%  3%  3%
[libx264 @ 0x2262e10] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 18% 31%  2%  6%  2% 15%  5%  2%
[libx264 @ 0x2262e10] i8c dc,h,v,p: 76% 13% 10%  0%
[libx264 @ 0x2262e10] Weighted P-Frames: Y:23.7% UV:14.5%
[libx264 @ 0x2262e10] kb/s:98.60
2014-11-10 14:41:07.869 CVNetVideo[396:219347] handleDoubleTap::当前设置的摄像头:2-Front Facing Camera
2014-11-10 14:41:07.974 CVNetVideo[396:219416] WARNING: -[<AVCaptureConnection: 0x13df5e10> isVideoMinFrameDurationSupported] is deprecated.  Please use AVCaptureDevice activeFormat.videoSupportedFrameRateRanges
2014-11-10 14:41:07.974 CVNetVideo[396:219416] WARNING: -[<AVCaptureConnection: 0x13df5e10> setVideoMinFrameDuration:] is deprecated.  Please use AVCaptureDevice setActiveVideoMinFrameDuration
2014-11-10 14:41:08.143 CVNetVideo[396:219416] video init finish: 480x360, 25fps, fmt:106, ret:0
2014-11-10 14:41:08.148 CVNetVideo[396:219416] video init finish:480x360, NV12, fps:25
[libx264 @ 0x224f810] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x224f810] profile High, level 2.1
2014-11-10 14:41:08.202 CVNetVideo[396:219379] video codec init:codec:1, 15fps, 480x360, bitrate:90kbps, quality:3, preset:3, gop:30, handle:4
回复 支持 反对

使用道具 举报

249

主题

2967

帖子

9108

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
9108
8#
发表于 2014-11-10 14:48:21 | 只看该作者
Load libanychatcore.so success!(V5.1 Build Time:Oct 14 2014 11:32:15)
请重新下载SDK包,更新里面的.a库文件,我们在11月份有更新一次。
回复 支持 反对

使用道具 举报

4

主题

21

帖子

62

积分

注册会员

Rank: 2

积分
62
9#
 楼主| 发表于 2014-11-10 16:30:09 | 只看该作者
更新了最新的SDK,还是不行。不过我发现了一个情况就是:
在我进行切换摄像头后,系统先回调了OnLocalVideoRelease但是不知道什么原因没有接着回调OnLocalVideoInit
所以本地窗口没有显示,而网络对方正常切换了画面。
希望这个线索有用。
回复 支持 反对

使用道具 举报

4

主题

21

帖子

62

积分

注册会员

Rank: 2

积分
62
10#
 楼主| 发表于 2014-11-10 16:34:08 | 只看该作者
反复测试就是:
在我进行切换摄像头后,系统先回调了OnLocalVideoRelease但是不知道什么原因没有接着回调OnLocalVideoInit
所以本地窗口没有显示,而网络对方正常切换了画面。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|AnyChat ( 粤ICP备13022410号-1 )  

GMT+8, 2024-11-23 11:04 , Processed in 0.150881 second(s), 22 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表