gpt4 book ai didi

android - Lollipop 设置远程描述错误: rtcp-mux must be enabled when BUNDLE is enabled

转载 作者:行者123 更新时间:2023-11-29 00:54:33 31 4
gpt4 key购买 nike

我尝试制作 Android WebRTC 应用

我在 Android OreoPie 上测试过,该应用运行良好。
但是在 Android LollipopMarshmallow 上,当我调用 setRemoteDescription 函数时抛出错误。

(org.webrtc.SdpObserver::onSetFailure(String))
无法设置远程应答 sdp:启用 BUNDLE 时必须启用 rtcp-mux。

//setRemoteDescription code
String channelId = json.getString("channel_id");
int index = getPeerConnectionIndex(channelId);
JSONObject sdp = json.getJSONObject("sdp");
SessionDescription sdpOffer = new SessionDescription(SessionDescription.Type.fromCanonicalForm(sdp.getString("type")), sdp.getString("sdp"));
Log.d(TAG, sdpOffer.description);
mSDPObserver[index] = new SDPObserverWithId(index);
mSDPObserver[index].setChannelId(channelId);
mPeerConnection[index].setRemoteDescription(mSDPObserver[index], sdpOffer);
local Sdp: 
v=0
o=- 3986057299756726360 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS ARDAMS
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 9 102 0 8 105 13 110 113 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:vAIE
a=ice-pwd:bVq8d3C2jNJ6+Q1Db90xCJxk
a=ice-options:trickle renomination
a=fingerprint:sha-256 B3:31:21:AA:DB:07:DC:F9:CF:BC:4F:86:01:46:C8:AF:BB:B3:65:F0:EC:B2:5A:1A:97:A8:52:CD:6C:4A:58:3F
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:3060595593 cname:tW/usjdUwhcVD9Gk
a=ssrc:3060595593 msid:ARDAMS ARDAMSa0
a=ssrc:3060595593 mslabel:ARDAMS
a=ssrc:3060595593 label:ARDAMSa0
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:vAIE
a=ice-pwd:bVq8d3C2jNJ6+Q1Db90xCJxk
a=ice-options:trickle renomination
a=fingerprint:sha-256 B3:31:21:AA:DB:07:DC:F9:CF:BC:4F:86:01:46:C8:AF:BB:B3:65:F0:EC:B2:5A:1A:97:A8:52:CD:6C:4A:58:3F
a=setup:actpass
a=mid:video
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=extmap:13 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 urn:3gpp:video-orientation
a=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:8 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
a=extmap:9 http://www.webrtc.org/experiments/rtp-hdrext/color-space
a=sendrecv
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 red/90000
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:127 ulpfec/90000
a=ssrc-group:FID 1050899396 3284914966
a=ssrc:1050899396 cname:tW/usjdUwhcVD9Gk
a=ssrc:1050899396 msid:ARDAMS ARDAMSv0
a=ssrc:1050899396 mslabel:ARDAMS
a=ssrc:1050899396 label:ARDAMSv0
a=ssrc:3284914966 cname:tW/usjdUwhcVD9Gk
a=ssrc:3284914966 msid:ARDAMS ARDAMSv0
a=ssrc:3284914966 mslabel:ARDAMS
a=ssrc:3284914966 label:ARDAMSv0
remote Sdp to set: 
v=0
o=- 1555912613504775309 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS 4qgVUFPGGjzM2ZXwOgYUE5BTL0
m=audio 9 UDP/TLS/RTP/SAVPF 111
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=mid:audio
a=setup:active
a=recvonly
a=rtcp-mux
a=rtcp-rsize
a=ice-ufrag:TFH9
a=ice-pwd:Ez2jn6OX7xdufJ58Gd1mbb01
a=ice-options:trickle
a=fingerprint:sha-256 8C:CC:45:9F:17:75:B7:6C:0B:A3:7F:5C:C5:0A:47:D9:6F:88:41:B7:8E:2C:AA:48:01:7F:C2:6C:77:E9:7A:2B
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10;useinbandfec=1
a=ssrc:1732894969 cname:ori8UQ7mdYvrS7eO
a=ssrc:1732894969 msid:4qgVUFPGGjzM2ZXwOgYUE5BTL0 kny6pqktc2YPysWY5MLS8pZW7rPyaqmiDKeS
a=ssrc:1732894969 mslabel:4qgVUFPGGjzM2ZXwOgYUE5BTL0
a=ssrc:1732894969 label:kny6pqktc2YPysWY5MLS8pZW7rPyaqmiDKeS
m=video 9 UDP/TLS/RTP/SAVPF 0
a=ssrc:1542320079 cname:ori8UQ7mdYvrS7eO
a=ssrc:1542320079 msid:4qgVUFPGGjzM2ZXwOgYUE5BTL0 p91hXGGeqs923R0gEMdVpzUGL29j5Q8kPZpB
a=ssrc:1542320079 mslabel:4qgVUFPGGjzM2ZXwOgYUE5BTL0
a=ssrc:1542320079 label:p91hXGGeqs923R0gEMdVpzUGL29j5Q8kPZpB

由于报错,Android 5.0~6.0设备无法推流出视频/音频,无法获取流。

我正在尝试构建用于调试的 native WebRTC 库,这对我来说非常困难...

最佳答案

这对我自己来说是个愚蠢的问题。

问题是服务器只使用 h264,而那些 Android 设备不支持 h264 和 WebRTC。

因此,远程 sdp 缺少视频选项并且 setRemoteDescription() 抛出 rtcp-mux must be enabled 错误。

(Android WebRTC 需要 rtcp-mux 和需要音频和视频的包)

关于android - Lollipop 设置远程描述错误: rtcp-mux must be enabled when BUNDLE is enabled,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55790257/

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