AnyChat技术支持论坛

标题: Anychat 被强行退出房间的问题. [打印本页]

作者: JavaKing    时间: 2014-12-30 15:48
标题: Anychat 被强行退出房间的问题.
              各位好,今天在做AnyChat android移植时遇到一个问题。A和B进行视频通话,视频和音频都正常。通话结束后,B能再次登录并进入房间,但A在进入房间后马上会被anychat强制退出房间(Invoke    LeaveRoom),如果重启下A 问题会得到解决。各位有谁遇到过这个问题吗? 以下是日志.
12-30 15:44:00.019: W/ResourceType(678): No known package when getting value for resource number 0xffffffff
12-30 15:44:00.039: I/CityTimeView(921): mediumWeatherClock =
12-30 15:44:03.079: I/ANYCHAT(25190): 15:44:03(90)    Invoke    UserCameraControl(userid=-4,bOpen=0)
12-30 15:44:03.089: I/ANYCHAT(25190): 15:44:03(94)    Invoke    UserSpeakControl(userid=-4,bOpen=0)
12-30 15:44:03.089: I/ANYCHAT(25190): 15:44:03(97)    Invoke    UserCameraControl(userid=-1,bOpen=0)
12-30 15:44:03.089: I/ANYCHAT(25190): 15:44:03(97)    Invoke    UserSpeakControl(userid=-1,bOpen=0)
12-30 15:44:03.099: W/ResourceType(678): No known package when getting value for resource number 0xffffffff
12-30 15:44:03.109: I/ANYCHAT(25190): 15:44:03(113)    Apply video parameter:320x240, bitrate:150000, quality:3, gop:40, fps:10, preset:3, codec:1
12-30 15:44:03.109: I/ANYCHAT(25190): 15:44:03(114)    Invoke    BRAC_SetSDKOption(BRAC_SO_NETWORK_P2PPOLITIC=1)
12-30 15:44:03.109: I/ANYCHAT(25190): 15:44:03(114)    Invoke    SetSDKOption(BRAC_SO_AUDIO_ECHOCTRL,1)
12-30 15:44:03.109: I/ANYCHAT(25190): 15:44:03(115)    Invoke    BRAC_SetSDKOption(BRAC_SO_CORESDK_USEHWCODEC=0)
12-30 15:44:03.109: I/ANYCHAT(25190): 15:44:03(117)    Invoke    BRAC_Connect(192.168.1.100,8906)=0
12-30 15:44:03.109: I/ANYCHAT(25190): 15:44:03(118)    Invoke    EnterRoom(roomid=1)
12-30 15:44:03.109: I/CordovaLog(25190): Changing log level to DEBUG(3)
12-30 15:44:03.119: I/CordovaLog(25190): Found start page location: index.html
12-30 15:44:03.119: I/android.media.AudioRecord(25190): stopRecording
12-30 15:44:03.119: E/AudioRecord(25190): obtainBuffer cant get buffer err=-4
12-30 15:44:03.139: I/AudioRecord(25190): sendStateChangedIntent, state=1
12-30 15:44:03.139: I/AudioService(619): sendAudioRecordStateChangedIntent
12-30 15:44:03.139: I/android.media.AudioRecord(25190): stopRecording
12-30 15:44:03.139: I/AudioRecord(25190): sendStateChangedIntent, state=1
12-30 15:44:03.149: I/AudioService(619): sendAudioRecordStateChangedIntent
12-30 15:44:03.149: I/karaokeeffect.IntentReceiver(14275): Intent received, action=android.media.AUDIO_RECORD_STATE_CHANGED_ACTION
12-30 15:44:03.149: W/MemoryDealer(254): madvise(0x434d4000, 4096, MADV_REMOVE) returned Operation not supported on transport endpoint
12-30 15:44:03.159: I/KaraokeEffectService(14275): onStartCommand
12-30 15:44:03.159: I/KaraokeEffectService(14275): audio record state changed, recorder=AudioRecord state=1
12-30 15:44:03.159: I/KaraokeEffectService(14275): stopReverberation, current reverb activity=null
12-30 15:44:03.159: I/KaraokeEffectService(14275): service stopped due to record stop
12-30 15:44:03.159: I/karaokeeffect.IntentReceiver(14275): Intent received, action=android.media.AUDIO_RECORD_STATE_CHANGED_ACTION
12-30 15:44:03.169: I/KaraokeEffectService(14275): onDestroy
12-30 15:44:03.179: I/AudioAlgoService(14292): onDestroy() called
12-30 15:44:03.179: I/KaraokeEffectService(14275): KaraokeEffectService onCreate
12-30 15:44:03.199: W/ContextImpl(14275): Implicit intents with startService are not safe: Intent { act=android.intent.action.AUDIO_PROCESS_ALGO_SERVICE } android.content.ContextWrapper.bindService:517 com.huawei.android.karaokeeffect.AudioProcessPortal.<init>:70 com.huawei.android.karaokeeffect.KaraokeEffectService.onCreate:79
12-30 15:44:03.209: I/AudioAlgoService(14292): onCreate() called
12-30 15:44:03.209: I/KaraokeEffectService(14275): onStartCommand
12-30 15:44:03.219: I/AudioAlgoService(14292): onBind() called
12-30 15:44:03.219: I/KaraokeEffectService(14275): audio record state changed, recorder=AudioRecord state=1
12-30 15:44:03.219: I/KaraokeEffectService(14275): stopReverberation, current reverb activity=null
12-30 15:44:03.219: I/KaraokeEffectService(14275): service stopped due to record stop
12-30 15:44:03.229: I/KaraokeEffectService(14275): stopReverberation, current reverb activity=null
12-30 15:44:03.229: I/karaokeeffect.AudioProcessPortal(14275): onServiceConnected() called
12-30 15:44:03.229: I/karaokeeffect.AudioProcessPortal(14275): AudioAlgo get OK
12-30 15:44:03.229: I/KaraokeEffectService(14275): onDestroy
12-30 15:44:03.229: I/AudioAlgoService(14292): onDestroy() called
12-30 15:44:03.549: I/ANYCHAT(25190): 15:44:03(553)    Invoke    LeaveRoom(roomid=1)    Elapse:100 ms
12-30 15:44:04.029: W/audio_hw_primary(254): out_set_parameters : unknown parameter close_pa=true
12-30 15:44:05.209: I/System.out(619): [CDS][DNS]Unable to resolve host "2.android.pool.ntp.org": No address associated with hostname
12-30 15:44:05.209: I/System.out(619): [CDS]close[34281]
12-30 15:44:06.519: E/HISI_6401_SPK_CTL(254): hisi_6401_spk_set_status = 1074034113
12-30 15:44:15.219: I/System.out(619): [CDS][DNS]Unable to resolve host "2.android.pool.ntp.org": No address associated with hostname



作者: admin    时间: 2014-12-30 15:53
您好,请将A、B的日志帖上来,在SD卡根目录下:BRAnyChatCore.log,谢谢。

12-30 15:44:03.229: I/KaraokeEffectService(14275): onDestroy
12-30 15:44:03.229: I/AudioAlgoService(14292): onDestroy() called
12-30 15:44:03.549: I/ANYCHAT(25190): 15:44:03(553)    Invoke    LeaveRoom(roomid=1)    Elapse:100 ms
从上面的log分析,LeaveRoom是在OnDestroy的过程中被调用的,请确认是否有Activity被销毁,或是主动调用了LeaveRoom?Release?

作者: JavaKing    时间: 2014-12-30 16:38
admin 发表于 2014-12-30 15:53
您好,请将A、B的日志帖上来,在SD卡根目录下:BRAnyChatCore.log,谢谢。

从上面的log分析,LeaveRoom ...

          是这样 在 MainActivity  登陆并等待其他用户登陆 (OnAnyChatUserAtRoomMessage),如果有用户登陆,则跳转到VideoActivity开始视频.视频结束后,只会调用        anychat.mSensorHelper.DestroySensor();
然后再回到MainActivity  ,并重新登陆和进入房间.但进入房间后会被调用Invoke        LeaveRoom(roomid=1),
我并没有主动调用退出房间或释放资源的方法。至于Activity 切换后发生的销毁,我也是调用的anychat.mSensorHelper.DestroySensor();不知道这样是不是有问题?
作者: admin    时间: 2014-12-30 18:23
您好,建议参考AnyChatCallCenter的示例代码,里面有多个Activity之间切换(跳转)的应用。


至于Activity 切换后发生的销毁,我也是调用的anychat.mSensorHelper.DestroySensor();不知道这样是不是有问题?

还是建议跟踪一下Activity为什么会销毁。





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