AnyChat技术支持论坛

标题: 第一次请求没有视频和声音 [打印本页]

作者: yuguangguang    时间: 2016-3-17 16:31
标题: 第一次请求没有视频和声音
AnyChatCallCenter和HelloAnyChat整合,实现特定房间的呼叫视频通话,但运行出的效果是 第一次请求没有视频和声音,调试了很久也没找到原因
作者: 佰锐科技-陈伟    时间: 2016-3-17 16:39
您好 请把日志发来上来我们分析下
作者: yuguangguang    时间: 2016-3-17 17:04
佰锐科技-陈伟 发表于 2016-3-17 16:39
您好 请把日志发来上来我们分析下
  1. [2016-03-17 16:58:52(860)]        Invoke        Connect(demo.anychat.cn,8906)=0
  2. [2016-03-17 16:58:52(862)]        Invoke        Login(username:456)=0
  3. [2016-03-17 16:58:52(947)]        Create anychatdnsserver connect:121.199.51.198(8906)
  4. [2016-03-17 16:58:53(227)]        On pre-connection result, errorcode:0, anychatcoreserver, 121.199.51.198(8906, tcp:1)
  5. [2016-03-17 16:58:53(258)]        CheckClientSocketLink         Connect(ip=121.199.51.198,port=8906)
  6. [2016-03-17 16:58:53(461)]        Server version: V5.3(Build Time:2016-01-21 10:24:30, Server OS:Windows)
  7. [2016-03-17 16:58:53(558)]        Message        OnConnect(bSuccess:1, errorcode=0)
  8. [2016-03-17 16:58:53(792)]        Message        OnLoginSystem(userid=-95460,errorcode=0,username=456), msg deliver worked(0)
  9. [2016-03-17 16:58:53(793)]        Server running time: 56 days, 1 hours, 59 minutes, license mode:1
  10. [2016-03-17 16:58:53(851)]        Invoke        EnterRoom(roomid=1)
  11. [2016-03-17 16:58:53(970)]        Connection to streaming media server successfully!(udp delay:88ms)
  12. [2016-03-17 16:58:54(094)]        Message        OnEnterRoom(roomid=1,errorcode=0,siteindex=5)
  13. [2016-03-17 16:58:54(095)]        Audio Playback Device Init(0, 1, 16000, 16), Default Playback Driver
  14. [2016-03-17 16:58:54(105)]        Message        OnReceiveOnlineUser(count=6,roomid=1)
  15. [2016-03-17 16:58:56(873)]        Invoke        VideoCallControl(EventType:1, UserId:-95458, ErrorCode:0, dwFlags:0, dwParam:0, UserStr:)=0
  16. [2016-03-17 16:58:56(973)]        Message        OnVideoCallEvent(EventType:2, UserId:-95458, ErrorCode:0, dwFlags:0x0, dwParam:0
  17. [2016-03-17 16:58:59(109)]        Message        OnVideoCallEvent(EventType:3, UserId:-95458, ErrorCode:0, dwFlags:0x0, dwParam:1
  18. [2016-03-17 16:58:59(443)]        Invoke        EnterRoom(roomid=1)
  19. [2016-03-17 16:59:02(165)]        APPLOG        Camera Preview size: 1280 x 720
  20. [2016-03-17 16:59:02(166)]        APPLOG        Camera Preview size: 960 x 720
  21. [2016-03-17 16:59:02(167)]        APPLOG        Camera Preview size: 864 x 480
  22. [2016-03-17 16:59:02(167)]        APPLOG        Camera Preview size: 800 x 480
  23. [2016-03-17 16:59:02(168)]        APPLOG        Camera Preview size: 768 x 432
  24. [2016-03-17 16:59:02(168)]        APPLOG        Camera Preview size: 720 x 480
  25. [2016-03-17 16:59:02(168)]        APPLOG        Camera Preview size: 640 x 480
  26. [2016-03-17 16:59:02(169)]        APPLOG        Camera Preview size: 576 x 432
  27. [2016-03-17 16:59:02(169)]        APPLOG        Camera Preview size: 480 x 320
  28. [2016-03-17 16:59:02(170)]        APPLOG        Camera Preview size: 384 x 288
  29. [2016-03-17 16:59:02(170)]        APPLOG        Camera Preview size: 352 x 288
  30. [2016-03-17 16:59:02(171)]        APPLOG        Camera Preview size: 320 x 240
  31. [2016-03-17 16:59:02(171)]        APPLOG        Camera FrameRate: 10000 , 30000
  32. [2016-03-17 16:59:02(262)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=1)
  33. [2016-03-17 16:59:02(263)]        Invoke        SetInputVideoFormat(pixfmt:8, 320x240, 30fps, flags:0)
  34. [2016-03-17 16:59:02(325)]        video init finish:320x240, NV21, fps:30, codecid:1
  35. [2016-03-17 16:59:03(538)]        Message        OnP2PConnectState(userid=-95418, state=2)
  36. [2016-03-17 16:59:07(245)]        Invoke        VideoCallControl(EventType:4, UserId:-95458, ErrorCode:0, dwFlags:0, dwParam:-95460, UserStr:)=0
  37. [2016-03-17 16:59:07(393)]        Message        OnVideoCallEvent(EventType:4, UserId:-95458, ErrorCode:0, dwFlags:0x0, dwParam:-95460
  38. [2016-03-17 16:59:08(075)]        Invoke        UserCameraControl(userid=-1, bOpen=0, stream=0)
  39. [2016-03-17 16:59:08(075)]        Invoke        UserSpeakControl(userid=-1,bOpen=0)
  40. [2016-03-17 16:59:08(076)]        Invoke        UserSpeakControl(userid=-95458,bOpen=0)
  41. [2016-03-17 16:59:08(076)]        Invoke        UserCameraControl(userid=-95458, bOpen=0, stream=0)
  42. [2016-03-17 16:59:08(177)]        Invoke        LeaveRoom(roomid=-1)        Elapse:100 ms
  43. [2016-03-17 16:59:08(190)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=0)
  44. [2016-03-17 16:59:10(104)]        Invoke        VideoCallControl(EventType:1, UserId:-95458, ErrorCode:0, dwFlags:0, dwParam:0, UserStr:)=0
  45. [2016-03-17 16:59:10(218)]        Message        OnVideoCallEvent(EventType:2, UserId:-95458, ErrorCode:0, dwFlags:0x0, dwParam:0
  46. [2016-03-17 16:59:13(144)]        Message        OnVideoCallEvent(EventType:3, UserId:-95458, ErrorCode:0, dwFlags:0x0, dwParam:1
  47. [2016-03-17 16:59:13(419)]        Invoke        EnterRoom(roomid=1)
  48. [2016-03-17 16:59:13(549)]        Message        OnEnterRoom(roomid=1,errorcode=0,siteindex=5)
  49. [2016-03-17 16:59:13(549)]        Audio Playback Device Init(0, 1, 16000, 16), Default Playback Driver
  50. [2016-03-17 16:59:13(601)]        Message        OnReceiveOnlineUser(count=6,roomid=1)
  51. [2016-03-17 16:59:13(834)]        APPLOG        Camera Preview size: 1280 x 720
  52. [2016-03-17 16:59:13(835)]        APPLOG        Camera Preview size: 960 x 720
  53. [2016-03-17 16:59:13(835)]        APPLOG        Camera Preview size: 864 x 480
  54. [2016-03-17 16:59:13(836)]        APPLOG        Camera Preview size: 800 x 480
  55. [2016-03-17 16:59:13(836)]        APPLOG        Camera Preview size: 768 x 432
  56. [2016-03-17 16:59:13(842)]        APPLOG        Camera Preview size: 720 x 480
  57. [2016-03-17 16:59:13(842)]        APPLOG        Camera Preview size: 640 x 480
  58. [2016-03-17 16:59:13(843)]        APPLOG        Camera Preview size: 576 x 432
  59. [2016-03-17 16:59:13(843)]        APPLOG        Camera Preview size: 480 x 320
  60. [2016-03-17 16:59:13(843)]        APPLOG        Camera Preview size: 384 x 288
  61. [2016-03-17 16:59:13(844)]        APPLOG        Camera Preview size: 352 x 288
  62. [2016-03-17 16:59:13(845)]        APPLOG        Camera Preview size: 320 x 240
  63. [2016-03-17 16:59:13(845)]        APPLOG        Camera FrameRate: 10000 , 30000
  64. [2016-03-17 16:59:13(941)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=1)
  65. [2016-03-17 16:59:13(942)]        Invoke        SetInputVideoFormat(pixfmt:8, 320x240, 30fps, flags:0)
  66. [2016-03-17 16:59:13(988)]        video init finish:320x240, NV21, fps:30, codecid:1
  67. [2016-03-17 16:59:14(036)]        Invoke        UserCameraControl(userid=-1, bOpen=1, stream=0)
  68. [2016-03-17 16:59:14(036)]        Invoke        UserSpeakControl(userid=-1,bOpen=1)
  69. [2016-03-17 16:59:14(037)]        Invoke        UserCameraControl(userid=-95458, bOpen=1, stream=0)
  70. [2016-03-17 16:59:14(037)]        Invoke        UserSpeakControl(userid=-95458,bOpen=1)
  71. [2016-03-17 16:59:14(059)]        On Remote UserCameraControl(dwUserId:-95458, bOpen:1)
  72. [2016-03-17 16:59:14(085)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=1)
  73. [2016-03-17 16:59:14(097)]        Invoke        SetInputVideoFormat(pixfmt:8, 320x240, 30fps, flags:0)
  74. [2016-03-17 16:59:14(122)]        On Remote UserSpeakControl(dwUserId:-95458, bOpen:1)
  75. [2016-03-17 16:59:14(145)]        video init finish:320x240, NV21, fps:30, codecid:1
  76. [2016-03-17 16:59:14(150)]        Invoke        SetInputAudioFormat(1, 16000, 16, flags:0)
  77. [2016-03-17 16:59:14(150)]        Audio Init, error:0, device:-1, 1, 16000, 16, capmode:0
  78. [2016-03-17 16:59:14(151)]        Audio codec init, handle:4, 11, 1, 16000, 16, 15850
  79. [2016-03-17 16:59:14(233)]        video codec init:codec:1, 10fps, 320x240, bitrate:150kbps, quality:3, preset:3, gop:40, handle:5
  80. [2016-03-17 16:59:14(306)]        userid(-95458) audio decode, codec:11, 1 channel, 16000Hz
  81. [2016-03-17 16:59:17(115)]        userid(-95458) video decode, codec:1, 320x240, delay:9ms
  82. [2016-03-17 16:59:17(540)]        Audio FX Status: VAD:1, NS:1, AGC:1, AEC:1
  83. [2016-03-17 16:59:22(806)]        Invoke        VideoCallControl(EventType:4, UserId:-95458, ErrorCode:0, dwFlags:0, dwParam:-95460, UserStr:)=0
  84. [2016-03-17 16:59:23(592)]        Invoke        UserCameraControl(userid=-1, bOpen=0, stream=0)
  85. [2016-03-17 16:59:23(593)]        Invoke        UserSpeakControl(userid=-1,bOpen=0)
  86. [2016-03-17 16:59:23(595)]        Invoke        UserSpeakControl(userid=-95458,bOpen=0)
  87. [2016-03-17 16:59:23(598)]        Invoke        UserCameraControl(userid=-95458, bOpen=0, stream=0)
  88. [2016-03-17 16:59:23(703)]        Invoke        LeaveRoom(roomid=-1)        Elapse:102 ms
  89. [2016-03-17 16:59:23(718)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=0)
  90. [2016-03-17 16:59:23(799)]        Message        OnVideoCallEvent(EventType:4, UserId:-95458, ErrorCode:0, dwFlags:0x0, dwParam:-95460
  91. [2016-03-17 16:59:33(927)]        Invoke        LogoutServer(userid=-95460)        Elapse:47 ms
  92. [2016-03-17 16:59:33(988)]        Invoke        BRAC_Release        Elapse:60 ms
复制代码

作者: 佰锐科技-江裕    时间: 2016-3-17 17:16
yuguangguang 发表于 2016-3-17 17:04

您好,第一次呼叫完成后,日志没有看到打开本地视频和请求对方视频的接口,第二次是正常的。
作者: 佰锐科技-邵光清    时间: 2016-3-17 17:20
本帖最后由 佰锐科技-邵光清 于 2016-3-17 17:33 编辑

您好,是在房间内呼叫对方吗?
[2016-03-17 16:58:59(109)]        Message        OnVideoCallEvent(EventType:3, UserId:-95458, ErrorCode:0, dwFlags:0x0, dwParam:1
[2016-03-17 16:58:59(443)]        Invoke        EnterRoom(roomid=1)

进入房间后,第一次呼叫对方,就不需要再次调用enterroom了;

另外,第二次呼叫时,并不是在房间内呼叫,已经离开了房间:
[2016-03-17 16:59:08(177)]        Invoke        LeaveRoom(roomid=-1)        Elapse:100 ms


作者: yuguangguang    时间: 2016-3-17 17:22
这是将vedioActivity的enterroom注释之后,运行的效果,无论请求多少次都没有音频和视频
===================================
[2016-03-17 17:17:32(045)]        Invoke        Connect(demo.anychat.cn,8906)=0
[2016-03-17 17:17:32(047)]        Invoke        Login(username:321)=0
[2016-03-17 17:17:32(098)]        Create anychatdnsserver connect:121.199.51.198(8906)
[2016-03-17 17:17:32(394)]        On pre-connection result, errorcode:0, anychatcoreserver, 121.199.51.198(8906, tcp:1)
[2016-03-17 17:17:32(406)]        CheckClientSocketLink         Connect(ip=121.199.51.198,port=8906)
[2016-03-17 17:17:32(609)]        Server version: V5.3(Build Time:2016-01-21 10:24:30, Server OS:Windows)
[2016-03-17 17:17:32(703)]        Message        OnConnect(bSuccess:1, errorcode=0)
[2016-03-17 17:17:32(937)]        Message        OnLoginSystem(userid=-95561,errorcode=0,username=321), msg deliver worked(0)
[2016-03-17 17:17:32(939)]        Server running time: 56 days, 2 hours, 18 minutes, license mode:1
[2016-03-17 17:17:33(023)]        Invoke        EnterRoom(roomid=1)
[2016-03-17 17:17:33(208)]        Connection to streaming media server successfully!(udp delay:135ms)
[2016-03-17 17:17:33(331)]        Message        OnEnterRoom(roomid=1,errorcode=0,siteindex=4)
[2016-03-17 17:17:33(332)]        Audio Playback Device Init(0, 1, 16000, 16), Default Playback Driver
[2016-03-17 17:17:33(332)]        Message        OnReceiveOnlineUser(count=5,roomid=1)
[2016-03-17 17:17:38(234)]        Message        OnUserLeaveRoom(userid=-95559,siteindex=3)
[2016-03-17 17:17:39(049)]        Invoke        LeaveRoom(roomid=-1)        Elapse:102 ms
[2016-03-17 17:17:39(110)]        Invoke        LogoutServer(userid=-95561)        Elapse:61 ms
[2016-03-17 17:17:47(586)]        Invoke        Connect(demo.anychat.cn,8906)=0
[2016-03-17 17:17:47(586)]        Invoke        Login(username:321)=0
[2016-03-17 17:17:47(620)]        Create anychatdnsserver connect:121.199.51.198(8906)
[2016-03-17 17:17:47(895)]        On pre-connection result, errorcode:0, anychatcoreserver, 121.199.51.198(8906, tcp:1)
[2016-03-17 17:17:47(936)]        CheckClientSocketLink         Connect(ip=121.199.51.198,port=8906)
[2016-03-17 17:17:48(129)]        Server version: V5.3(Build Time:2016-01-21 10:24:30, Server OS:Windows)
[2016-03-17 17:17:48(221)]        Message        OnConnect(bSuccess:1, errorcode=0)
[2016-03-17 17:17:48(961)]        Message        OnLoginSystem(userid=-95563,errorcode=0,username=321), msg deliver worked(0)
[2016-03-17 17:17:48(971)]        Load libmediautil_v7.so success!(V6.0 Build Time:Feb 28 2016 09:49:23)
[2016-03-17 17:17:48(993)]        Load libmediashow.so success!(V6.0 Build Time:Feb 28 2016 09:49:07)
[2016-03-17 17:17:49(015)]        Load libmediacore.so success!(V6.0 Build Time:Feb 28 2016 09:49:10)
[2016-03-17 17:17:49(018)]        Server running time: 56 days, 2 hours, 18 minutes, license mode:1
[2016-03-17 17:17:49(025)]        Invoke        EnterRoom(roomid=1)
[2016-03-17 17:17:49(270)]        Connection to streaming media server successfully!(udp delay:125ms)
[2016-03-17 17:17:49(343)]        Message        OnEnterRoom(roomid=1,errorcode=0,siteindex=4)
[2016-03-17 17:17:49(343)]        Audio Playback Device Init(0, 1, 16000, 16), Default Playback Driver
[2016-03-17 17:17:49(394)]        Message        OnReceiveOnlineUser(count=5,roomid=1)
[2016-03-17 17:17:56(623)]        Invoke        VideoCallControl(EventType:1, UserId:-95562, ErrorCode:0, dwFlags:0, dwParam:0, UserStr=0
[2016-03-17 17:17:56(724)]        Message        OnVideoCallEvent(EventType:2, UserId:-95562, ErrorCode:0, dwFlags:0x0, dwParam:0
[2016-03-17 17:17:58(250)]        Message        OnVideoCallEvent(EventType:3, UserId:-95562, ErrorCode:0, dwFlags:0x0, dwParam:1
[2016-03-17 17:18:00(077)]        APPLOG        Camera Preview size: 1280 x 720
[2016-03-17 17:18:00(078)]        APPLOG        Camera Preview size: 960 x 720
[2016-03-17 17:18:00(078)]        APPLOG        Camera Preview size: 864 x 480
[2016-03-17 17:18:00(079)]        APPLOG        Camera Preview size: 800 x 480
[2016-03-17 17:18:00(082)]        APPLOG        Camera Preview size: 768 x 432
[2016-03-17 17:18:00(083)]        APPLOG        Camera Preview size: 720 x 480
[2016-03-17 17:18:00(083)]        APPLOG        Camera Preview size: 640 x 480
[2016-03-17 17:18:00(084)]        APPLOG        Camera Preview size: 576 x 432
[2016-03-17 17:18:00(085)]        APPLOG        Camera Preview size: 480 x 320
[2016-03-17 17:18:00(085)]        APPLOG        Camera Preview size: 384 x 288
[2016-03-17 17:18:00(085)]        APPLOG        Camera Preview size: 352 x 288
[2016-03-17 17:18:00(086)]        APPLOG        Camera Preview size: 320 x 240
[2016-03-17 17:18:00(087)]        APPLOG        Camera FrameRate: 10000 , 30000
[2016-03-17 17:18:00(177)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=1)
[2016-03-17 17:18:00(177)]        Invoke        SetInputVideoFormat(pixfmt:8, 320x240, 30fps, flags:0)
[2016-03-17 17:18:00(227)]        video init finish:320x240, NV21, fps:30, codecid:1
[2016-03-17 17:18:07(763)]        Invoke        VideoCallControl(EventType:4, UserId:-95562, ErrorCode:0, dwFlags:0, dwParam:-95563, UserStr=0
[2016-03-17 17:18:07(848)]        Message        OnVideoCallEvent(EventType:4, UserId:-95562, ErrorCode:0, dwFlags:0x0, dwParam:-95563
[2016-03-17 17:18:08(461)]        Invoke        UserCameraControl(userid=-1, bOpen=0, stream=0)
[2016-03-17 17:18:08(462)]        Invoke        UserSpeakControl(userid=-1,bOpen=0)
[2016-03-17 17:18:08(462)]        Invoke        UserSpeakControl(userid=-95562,bOpen=0)
[2016-03-17 17:18:08(462)]        Invoke        UserCameraControl(userid=-95562, bOpen=0, stream=0)
[2016-03-17 17:18:08(563)]        Invoke        LeaveRoom(roomid=-1)        Elapse:100 ms
[2016-03-17 17:18:08(573)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=0)
[2016-03-17 17:18:13(001)]        Invoke        VideoCallControl(EventType:1, UserId:-95562, ErrorCode:0, dwFlags:0, dwParam:0, UserStr=0
[2016-03-17 17:18:13(134)]        Message        OnVideoCallEvent(EventType:2, UserId:-95562, ErrorCode:0, dwFlags:0x0, dwParam:0
[2016-03-17 17:18:14(365)]        Message        OnVideoCallEvent(EventType:3, UserId:-95562, ErrorCode:0, dwFlags:0x0, dwParam:1
[2016-03-17 17:18:14(920)]        APPLOG        Camera Preview size: 1280 x 720
[2016-03-17 17:18:14(921)]        APPLOG        Camera Preview size: 960 x 720
[2016-03-17 17:18:14(921)]        APPLOG        Camera Preview size: 864 x 480
[2016-03-17 17:18:14(924)]        APPLOG        Camera Preview size: 800 x 480
[2016-03-17 17:18:14(924)]        APPLOG        Camera Preview size: 768 x 432
[2016-03-17 17:18:14(925)]        APPLOG        Camera Preview size: 720 x 480
[2016-03-17 17:18:14(925)]        APPLOG        Camera Preview size: 640 x 480
[2016-03-17 17:18:14(926)]        APPLOG        Camera Preview size: 576 x 432
[2016-03-17 17:18:14(926)]        APPLOG        Camera Preview size: 480 x 320
[2016-03-17 17:18:14(926)]        APPLOG        Camera Preview size: 384 x 288
[2016-03-17 17:18:14(927)]        APPLOG        Camera Preview size: 352 x 288
[2016-03-17 17:18:14(927)]        APPLOG        Camera Preview size: 320 x 240
[2016-03-17 17:18:14(928)]        APPLOG        Camera FrameRate: 10000 , 30000
[2016-03-17 17:18:15(017)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=1)
[2016-03-17 17:18:15(018)]        Invoke        SetInputVideoFormat(pixfmt:8, 320x240, 30fps, flags:0)
[2016-03-17 17:18:15(066)]        video init finish:320x240, NV21, fps:30, codecid:1
[2016-03-17 17:18:22(357)]        Invoke        VideoCallControl(EventType:4, UserId:-95562, ErrorCode:0, dwFlags:0, dwParam:-95563, UserStr=0
[2016-03-17 17:18:22(445)]        Message        OnVideoCallEvent(EventType:4, UserId:-95562, ErrorCode:0, dwFlags:0x0, dwParam:-95563
[2016-03-17 17:18:22(912)]        Invoke        UserCameraControl(userid=-1, bOpen=0, stream=0)
[2016-03-17 17:18:22(912)]        Invoke        UserSpeakControl(userid=-1,bOpen=0)
[2016-03-17 17:18:22(913)]        Invoke        UserSpeakControl(userid=-95562,bOpen=0)
[2016-03-17 17:18:22(913)]        Invoke        UserCameraControl(userid=-95562, bOpen=0, stream=0)

作者: yuguangguang    时间: 2016-3-17 17:38
佰锐科技-江裕 发表于 2016-3-17 17:16
您好,第一次呼叫完成后,日志没有看到打开本地视频和请求对方视频的接口,第二次是正常的。

VedioActivity实现了AnyChatVideoCallEvent接口,在ChatVideoCallEvent()方法中只是做了finish()操作,所有的呼叫接收请求都应该是在mainactivity类的服务器返回方法VideoCallEvent()里实现的吧,还是不懂为什么
作者: 佰锐科技-邵光清    时间: 2016-3-17 17:42
Message        OnVideoCallEvent(EventType:3, UserId:-95562, ErrorCode:0, dwFlags:0x0, dwParam:1


您好,在收到服务器开始通话的事件之后,需要调用用 UserCameraControl、UserSpeakControl来打开自己的音视频,并请求别人的音视频。






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