WebRTC 客户端在 opensslidentity 上失败为 webrtc 制作证书

WebRTC client failing on opensslidentity make certificate for webrtc


我正在使用 WebRTC 演示应用程序为 android 开发 webrtc 客户端。
虽然我使用 org.webrtc 库开发客户端,但在 运行 我自己的客户端时遇到问题。

当我 运行 我的客户时,下面是 logcat (完整 logcat 的一部分)我得到

2-10 18:32:49.260 7669-9530/org.appspot.apprtc I/libjingle: (opensslidentity.cc:47): Making key pair
02-10 18:32:49.261 7669-9531/org.appspot.apprtc I/libjingle: (peerconnection_jni.cc:1127): Signaling thread JavaCallback
02-10 18:32:49.261 7669-9531/org.appspot.apprtc I/org.webrtc.Logging: PeerConnectionFactory: onSignalingThreadReady
02-10 18:32:49.261 7669-9527/org.appspot.apprtc D/PCRTCClient: Peer connection factory created.
02-10 18:32:49.263 7669-9527/org.appspot.apprtc D/PCRTCClient: Create peer connection.
02-10 18:32:49.264 7669-9527/org.appspot.apprtc D/PCRTCClient: PCConstraints: mandatory: [], optional: [DtlsSrtpKeyAgreement: true]
02-10 18:32:49.264 7669-9527/org.appspot.apprtc D/PCRTCClient: VideoConstraints: mandatory: [minWidth: 1280, maxWidth: 1280, minHeight: 720, maxHeight: 720, minFrameRate: 30, maxFrameRate: 30], optional: []
02-10 18:32:49.264 7669-9527/org.appspot.apprtc D/PCRTCClient: EGLContext: org.webrtc.EglBase14$Context@35e6316b
02-10 18:32:49.264 7669-9527/org.appspot.apprtc I/libjingle: (peerconnection_jni.cc:1382): Set EGL context for HW encoding.
02-10 18:32:49.264 7669-9527/org.appspot.apprtc I/MediaCodecVideo: MediaCodecVideo: MediaCodecVideoEncoderFactory::SetEGLContext
02-10 18:32:49.264 7669-9527/org.appspot.apprtc I/libjingle: (peerconnection_jni.cc:1391): Set EGL context for HW decoding.
02-10 18:32:49.264 7669-9527/org.appspot.apprtc I/MediaCodecVideo: MediaCodecVideo: MediaCodecVideoDecoderFactory::SetEGLContext
02-10 18:32:49.265 7669-9527/org.appspot.apprtc A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 9527 (Thread-13274)




当我 运行 安装 WebRTC 演示应用程序时,我得到以下 logcat:

02-10 18:34:44.849 9621-10486/org.appspot.apprtc D/de.tavendo.autobahn.WebSocketConnection: WebSocket connection created.
02-10 18:34:44.850 9621-9621/org.appspot.apprtc D/CallRTCClient: Creating peer connection, delay=754ms
02-10 18:34:44.858 9621-9621/org.appspot.apprtc D/CallRTCClient: Creating OFFER...
02-10 18:34:45.031 9621-10500/org.appspot.apprtc I/libjingle: (opensslidentity.cc:88): Returning key pair
02-10 18:34:45.031 9621-10500/org.appspot.apprtc I/libjingle: (opensslidentity.cc:95): Making certificate for WebRTC
02-10 18:34:45.034 9621-10500/org.appspot.apprtc I/libjingle: (opensslidentity.cc:143): Returning certificate
02-10 18:34:45.035 9621-10500/org.appspot.apprtc I/libjingle: (peerconnection_jni.cc:1123): Worker thread JavaCallback
02-10 18:34:45.035 9621-10500/org.appspot.apprtc I/org.webrtc.Logging: PeerConnectionFactory: onWorkerThreadReady
02-10 18:34:45.037 9621-10501/org.appspot.apprtc I/libjingle: (peerconnection_jni.cc:1127): Signaling thread JavaCallback
02-10 18:34:45.037 9621-10501/org.appspot.apprtc I/org.webrtc.Logging: PeerConnectionFactory: onSignalingThreadReady
02-10 18:34:45.037 9621-10498/org.appspot.apprtc D/PCRTCClient: Peer connection factory created.
02-10 18:34:45.040 9621-10498/org.appspot.apprtc I/org.webrtc.Logging: MediaCodecVideoEncoder: Found target encoder for mime video/x-vnd.on2.vp8 : OMX.qcom.video.encoder.vp8. Color: 0x15
02-10 18:34:45.040 9621-10498/org.appspot.apprtc D/PCRTCClient: Create peer connection.
02-10 18:34:45.040 9621-10498/org.appspot.apprtc D/PCRTCClient: PCConstraints: mandatory: [], optional: [DtlsSrtpKeyAgreement: true]
02-10 18:34:45.040 9621-10498/org.appspot.apprtc D/PCRTCClient: VideoConstraints: mandatory: [minWidth: 1280, maxWidth: 1280, minHeight: 720, maxHeight: 720], optional: []
02-10 18:34:45.040 9621-10498/org.appspot.apprtc D/PCRTCClient: EGLContext: org.webrtc.EglBase14$Context@322112a
02-10 18:34:45.040 9621-10498/org.appspot.apprtc I/libjingle: (peerconnection_jni.cc:1382): Set EGL context for HW encoding.
02-10 18:34:45.040 9621-10498/org.appspot.apprtc I/MediaCodecVideo: MediaCodecVideo: MediaCodecVideoEncoderFactory::SetEGLContext
02-10 18:34:45.040 9621-10498/org.appspot.apprtc I/libjingle: (peerconnection_jni.cc:1391): Set EGL context for HW decoding.
02-10 18:34:45.040 9621-10498/org.appspot.apprtc I/MediaCodecVideo: MediaCodecVideo: MediaCodecVideoDecoderFactory::SetEGLContext




我的客户端在某个点上崩溃了

02-10 18:32:49.264 7669-9527/org.appspot.apprtc I/MediaCodecVideo: MediaCodecVideo: MediaCodecVideoDecoderFactory::SetEGLContext
02-10 18:32:49.265 7669-9527/org.appspot.apprtc A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 9527 (Thread-13274)

但是 WebRTC 演示 运行 正确。
我观察到的差异如下:
从 logcat.
可以看出,我的客户无法制作 opensslidentity certificate for WebRTC 我的客户卡在

2-10 18:32:49.260 7669-9530/org.appspot.apprtc I/libjingle: (opensslidentity.cc:47): Making key pair


但是,演示应用程序能够做到这一点。


我想知道为什么我的客户无法制作证书?

这个问题是在我没有使用 Ice Server 时发生的。将 Ice Server 传递给 PeerConnection 后,应用程序正常运行