2

我正在android平台上开发webRTC。它与 libjingle 对等连接库和 planB 语义计划一起使用。但现在我从这里https://bintray.com/google/webrtc/google-webrtc用最新的 webRTC 版本更新 apprtc 代码。

我想了解如何获取远程视频,因为 onAddStream 没有在统一语义计划中调用。onAddStream 正在使用 planB 语义

我通过以下代码片段使用统一计划

PeerConnection.RTCConfiguration rtcConfig = new PeerConnection.RTCConfiguration(signalingParameters.iceServers);
rtcConfig.tcpCandidatePolicy = PeerConnection.TcpCandidatePolicy.DISABLED;
rtcConfig.bundlePolicy = PeerConnection.BundlePolicy.MAXBUNDLE;
rtcConfig.rtcpMuxPolicy = PeerConnection.RtcpMuxPolicy.REQUIRE;
rtcConfig.continualGatheringPolicy = PeerConnection.ContinualGatheringPolicy.GATHER_CONTINUALLY;
rtcConfig.keyType = PeerConnection.KeyType.ECDSA;
rtcConfig.enableDtlsSrtp = !peerConnectionParameters.loopback;

rtcConfig.sdpSemantics = PeerConnection.SdpSemantics.UNIFIED_PLAN;

PeerConnection peerConnection = factory.createPeerConnection(rtcConfig, pcObserver);

而且我还在对等连接上添加音轨和视频轨道

List<String> mediaStreamLabels = Collections.singletonList("ARDAMS");



peerConnection.addTrack(createVideoTrack(videoCapturer), mediaStreamLabels);
peerConnection.addTrack(createAudioTrack(), mediaStreamLabels);

但不知何故,我的应用程序崩溃了。所有回溯都如下

Build fingerprint: 'xiaomi/lavender/lavender:9/PKQ1.180904.001/V10.3.7.0.PFGINXM:user/release-keys'
2020-04-21 23:04:56.919 31427-31427/? A/DEBUG: Revision: '0'
2020-04-21 23:04:56.919 31427-31427/? A/DEBUG: ABI: 'arm64'
2020-04-21 23:04:56.919 31427-31427/? A/DEBUG: pid: 31294, tid: 31403, name: worker_thread -  >>> org.appspot.apprtc <<<
2020-04-21 23:04:56.919 31427-31427/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8c
2020-04-21 23:04:56.919 31427-31427/? A/DEBUG: Cause: null pointer dereference
2020-04-21 23:04:56.919 31427-31427/? A/DEBUG:     x0  00000079959effd0  x1  00000079959effe8  x2  0000000000000000  x3  0000000000000003
2020-04-21 23:04:56.919 31427-31427/? A/DEBUG:     x4  0000000000000080  x5  8000000000000000  x6  ff63646a6e756471  x7  7f7f7f7f7f7f7f7f
2020-04-21 23:04:56.919 31427-31427/? A/DEBUG:     x8  0000000000000000  x9  83e2b5e6b5cd3627  x10 0000000000000000  x11 00000079959effe8
2020-04-21 23:04:56.919 31427-31427/? A/DEBUG:     x12 00000000ffffffff  x13 00000000ffffff80  x14 0000000000000500  x15 aaaaaaaaaaaaaaab
2020-04-21 23:04:56.919 31427-31427/? A/DEBUG:     x16 00000079965aa068  x17 0000007a333926e0  x18 0000000000000010  x19 0000007994251c00
2020-04-21 23:04:56.919 31427-31427/? A/DEBUG:     x20 0000000000000000  x21 0000007994251e58  x22 0000007997927f30  x23 00000079978565a8
2020-04-21 23:04:56.919 31427-31427/? A/DEBUG:     x24 0000000000000000  x25 0000007994251cfc  x26 0000007994251e40  x27 000000799699a800
2020-04-21 23:04:56.919 31427-31427/? A/DEBUG:     x28 000000000a758072  x29 00000079959f0040
2020-04-21 23:04:56.919 31427-31427/? A/DEBUG:     sp  00000079959effd0  lr  000000799644517c  pc  0000007996445180
2020-04-21 23:04:56.921 31427-31427/? A/DEBUG: backtrace:
2020-04-21 23:04:56.921 31427-31427/? A/DEBUG:     #00 pc 000000000053e180  /data/app/org.appspot.apprtc-zxKe2dBj5HFCdHK0GVM9xw==/lib/arm64/libjingle_peerconnection_so.so
2020-04-21 23:04:56.922 31427-31427/? A/DEBUG:     #01 pc 000000000053d508  /data/app/org.appspot.apprtc-zxKe2dBj5HFCdHK0GVM9xw==/lib/arm64/libjingle_peerconnection_so.so
2020-04-21 23:04:56.922 31427-31427/? A/DEBUG:     #02 pc 0000000000648b08  /data/app/org.appspot.apprtc-zxKe2dBj5HFCdHK0GVM9xw==/lib/arm64/libjingle_peerconnection_so.so
2020-04-21 23:04:56.922 31427-31427/? A/DEBUG:     #03 pc 00000000006496c0  /data/app/org.appspot.apprtc-zxKe2dBj5HFCdHK0GVM9xw==/lib/arm64/libjingle_peerconnection_so.so
2020-04-21 23:04:56.922 31427-31427/? A/DEBUG:     #04 pc 00000000002bdab4  /data/app/org.appspot.apprtc-zxKe2dBj5HFCdHK0GVM9xw==/lib/arm64/libjingle_peerconnection_so.so
2020-04-21 23:04:56.922 31427-31427/? A/DEBUG:     #05 pc 00000000002cf438  /data/app/org.appspot.apprtc-zxKe2dBj5HFCdHK0GVM9xw==/lib/arm64/libjingle_peerconnection_so.so
2020-04-21 23:04:56.922 31427-31427/? A/DEBUG:     #06 pc 00000000002bd2b8  /data/app/org.appspot.apprtc-zxKe2dBj5HFCdHK0GVM9xw==/lib/arm64/libjingle_peerconnection_so.so
2020-04-21 23:04:56.922 31427-31427/? A/DEBUG:     #07 pc 00000000002cf118  /data/app/org.appspot.apprtc-zxKe2dBj5HFCdHK0GVM9xw==/lib/arm64/libjingle_peerconnection_so.so
2020-04-21 23:04:56.922 31427-31427/? A/DEBUG:     #08 pc 00000000002cf024  /data/app/org.appspot.apprtc-zxKe2dBj5HFCdHK0GVM9xw==/lib/arm64/libjingle_peerconnection_so.so
2020-04-21 23:04:56.922 31427-31427/? A/DEBUG:     #09 pc 0000000000090328  /system/lib64/libc.so (__pthread_start(void*)+36)
2020-04-21 23:04:56.922 31427-31427/? A/DEBUG:     #10 pc 0000000000023a28  /system/lib64/libc.so (__start_thread+68)
2020-04-21 23:04:56.929 746-11398/? E/mm-camera: <STATS ><ERROR> 3012: stats_port_check_caps_reserve: Invalid Port capability type!
2020-04-21 23:04:56.929 746-11398/? E/mm-camera: <STATS ><ERROR> 3012: stats_port_check_caps_reserve: Invalid Port capability type!
2020-04-21 23:04:56.933 746-11398/? E/libc: Access denied finding property "ro.camera.req.fmq.size"
2020-04-21 23:04:56.933 746-11398/? E/libc: Access denied finding property "ro.camera.res.fmq.size"
2020-04-21 23:04:56.934 746-31437/? E/mm-camera: <SENSOR><ERROR> 251: module_sensor_offload_init_config: func_tbl for submodule 4 is NULL
2020-04-21 23:04:56.934 746-31437/? E/mm-camera: <SENSOR><ERROR> 253: module_sensor_offload_init_config: failed to get led off frame skip time

伙计们,我真的需要帮助来解决这个问题。

提前致谢。

4

0 回答 0