gpt4 book ai didi

java - 当我尝试结束通话(关闭连接)时,WebRTC 崩溃

转载 作者:太空宇宙 更新时间:2023-11-04 10:23:33 25 4
gpt4 key购买 nike

WebRTC的android实现中,我检查了多个讨论,所有这些讨论都提到了我什至尝试过使用https://github.com/KeepSafe/ReLinker卸载的.so文件。保留这些 .so 文件。

这是该问题的崩溃日志:

E/art: No implementation found for void org.webrtc.voiceengine.WebRtcAudioRecord.nativeDataIsRecorded(int, long) (tried Java_org_webrtc_voiceengine_WebRtcAudioRecord_nativeDataIsRecorded and Java_org_webrtc_voiceengine_WebRtcAudioRecord_nativeDataIsRecorded__IJ)
E/AndroidRuntime: FATAL EXCEPTION: AudioRecordJavaThread
Process: app.lov.com.lov_android_app, PID: 23128
java.lang.UnsatisfiedLinkError: No implementation found for void org.webrtc.voiceengine.WebRtcAudioRecord.nativeDataIsRecorded(int, long) (tried Java_org_webrtc_voiceengine_WebRtcAudioRecord_nativeDataIsRecorded and Java_org_webrtc_voiceengine_WebRtcAudioRecord_nativeDataIsRecorded__IJ)
at org.webrtc.voiceengine.WebRtcAudioRecord.nativeDataIsRecorded(Native Method)
at org.webrtc.voiceengine.WebRtcAudioRecord.access$600(WebRtcAudioRecord.java:26)
at org.webrtc.voiceengine.WebRtcAudioRecord$AudioRecordThread.run(WebRtcAudioRecord.java:90)
E/art: No implementation found for void org.webrtc.voiceengine.WebRtcAudioTrack.nativeGetPlayoutData(int, long) (tried Java_org_webrtc_voiceengine_WebRtcAudioTrack_nativeGetPlayoutData and Java_org_webrtc_voiceengine_WebRtcAudioTrack_nativeGetPlayoutData__IJ)

最佳答案

非常感谢 https://stackoverflow.com/a/30803727/656600 的 Dhilip 。他对他自己的问题(关于 objective-c )的解决方案帮助了我。我在这里引用他的建议:

I was trying to create PeerConnectionFactory and LocalVideoTrack in worker thread! Problem solved when I moved those to main thread.

根据该建议,我将代码更新为:

Handler handler = new Handler(Looper.getMainLooper());
handler.post(() -> {
peerConnectionClient.createPeerConnectionFactory(getActivity(),peerConnectionParameters, this);
});

这为我解决了崩溃问题。我仍在寻找对此的解释。因此,如果您知道,请添加详细信息。

关于java - 当我尝试结束通话(关闭连接)时,WebRTC 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50817743/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com