设置AudioTrack时,SessionDescription为NULL

时间:2017-06-09 09:27:28

标签: android webrtc

我正在尝试构建一个WebRTC应用程序。

现在,我有这个:

Set failure SessionDescription is NULL.

这会失败并显示以下日志:

SessionDescription

但是,null绝对不是v=0 o=- 1671888432286839529 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE audio a=msid-semantic: WMS Test Local Media Stream m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126 c=IN IP4 0.0.0.0 a=rtcp:9 IN IP4 0.0.0.0 a=ice-ufrag:wxDK a=ice-pwd:VlshLQuefuFgJ244f8Oxn+00 a=ice-options:trickle renomination a=fingerprint:sha-256 3E:A3:12:2D:2B:A4:A3:8E:F8:81:49:7D:1A:8B:30:32:EE:16:F4:C2:3E:60:53:28:70:F3:F9:5C:B6:1D:3F:FB a=setup:actpass a=mid:audio a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level 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:104 ISAC/32000 a=rtpmap:9 G722/8000 a=rtpmap:102 ILBC/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:106 CN/32000 a=rtpmap:105 CN/16000 a=rtpmap:13 CN/8000 a=rtpmap:110 telephone-event/48000 a=rtpmap:112 telephone-event/32000 a=rtpmap:113 telephone-event/16000 a=rtpmap:126 telephone-event/8000 a=ssrc:509420374 cname:x453Wkh4ZHn5LRuV a=ssrc:509420374 msid:Test Local Media Stream Test Audio Track a=ssrc:509420374 mslabel:Test Local Media Stream a=ssrc:509420374 label:Test Audio Track

v=0
o=- 3918440358463799408 2 IN IP4 127.0.0.1
s=-
t=0 0
a=msid-semantic: WMS

但是当我删除音频内容或整个MediaStream时,描述就变成了这样:

{{1}}

它有效。

知道可能出现什么问题吗?

2 个答案:

答案 0 :(得分:0)

AudioTrackMediaStream ID不得包含空格!

可能是因为this

答案 1 :(得分:0)

出现相同的错误:

D/PCRTCClient: Set local SDP from OFFER
I/webrtc_sdp.cc: (line 3266): Ignored line: a=rtcp:9 IN IP4 0.0.0.0
    (line 3266): Ignored line: a=rtcp:9 IN IP4 0.0.0.0
E/webrtc_sdp.cc: (line 396): Failed to parse: "". Reason: Invalid SDP line.
    v=0
    o=- 8221549596792311738 2 IN IP4 127.0.0.1
    s=-
    t=0 0
    a=group:BUNDLE 0 1
    a=msid-semantic: WMS ARDAMS
    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:5yRJ
    a=ice-pwd:G5vs9s0f0wKpEfHuy7TaQvmm
    a=ice-options:trickle renomination
    a=fingerprint:sha-256 6E:0C:8C:5C:AB:78:EB:EC:96:F2:2A:95:7C:63:52:14:3E:60:1B:62:71:56:63:A3:9B:0B:CE:D7:9B:64:E1:88
    a=setup:actpass
    a=mid:0
    a=extmap:1 urn:ietf:params:rtp-hdrext:toffset
    a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
    a=extmap:3 urn:3gpp:video-orientation
    a=extmap:4 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://www.webrtc.org/experiments/rtp-hdrext/color-space
    a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
    a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
    a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
    a=sendrecv
    a=msid:ARDAMS ARDAMSv0
    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 358933661 62941795
    a=ssrc:358933661 cname:oCVrfhRk9AucLV4i
    a=ssrc:358933661 msid:ARDAMS ARDAMSv0
    a=ssrc:358933661 mslabel:ARDAMS
    a=ssrc:358933661 label:ARDAMSv0
    a=ssrc:62941795 cname:oCVrfhRk9AucLV4i
    a=ssrc:62941795 msid:ARDAMS ARDAMSv0
    a=ssrc:62941795 mslabel:ARDAMS
    a=ssrc:62941795 label:ARDAMSv0
    m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126
    c=IN IP4 0.0.0.0
    a=rtcp:9 IN IP4 0.0.0.0
    a=ice-ufrag:5yRJ
    a=ice-pwd:G5vs9s0f0wKpEfHuy7TaQvmm
    a=ice-options:trickle renomination
    a=fingerprint:sha-256 6E:0C:8C:5C:AB:78:EB:EC:96:F2:2A:95:7C:63:52:14:3E:60:1B:62:71:56:63:A3:9B:0B:CE:D7:9B:64:E1:88
    a=setup:actpass
    a=mid:1
    a=extmap:14 urn:ietf:params:rtp-hdrext:ssrc-audio-level
    a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
    a=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
    a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
    a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
    a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
    a=sendrecv
    a=msid:ARDAMS ARDAMSa0
    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:104 ISAC/32000
    a=rtpmap:9 G722/8000
    a=rtpmap:102 ILBC/8000
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:106 CN/32000
    a=rtpmap:105 CN/16000
    a=rtpmap:13 CN/8000
    a=rtpmap:110 telephone-event/48000
    a=rtpmap:112 telephone-event/32000
    a=rtpmap:113 telephone-event/16000
    a=rtpmap:126 telephone-event/8000
    a=ssrc:2122516110 cname:oCVrfhRk9AucLV4i
    a=ssrc:2122516110 msid:ARDAMS ARDAMSa0
    a=ssrc:2122516110 mslabel:ARDAMS
    a=ssrc:2122516110 label:ARDAMSa0

如果我仅使用音频,则设置没问题:

    v=0
    o=- 445322798220468298 2 IN IP4 127.0.0.1
    s=-
    t=0 0
    a=group:BUNDLE 0
    a=msid-semantic: WMS ARDAMS
    m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126
    c=IN IP4 0.0.0.0
    a=rtcp:9 IN IP4 0.0.0.0
    a=ice-ufrag:8OdI
    a=ice-pwd:/VO9PnZIm51nDtk1qvRRwEW0
    a=ice-options:trickle renomination
    a=fingerprint:sha-256 FB:C0:02:B6:E1:7F:9B:81:26:F8:4E:B4:5A:AD:B2:CE:91:02:BA:B5:26:ED:07:91:52:BF:ED:3F:F0:CC:CF:8B
    a=setup:actpass
    a=mid:0
    a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
    a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
    a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
    a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
    a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
    a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
    a=sendrecv
    a=msid:ARDAMS ARDAMSa0
    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:104 ISAC/32000
    a=rtpmap:9 G722/8000
    a=rtpmap:102 ILBC/8000
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:106 CN/32000
    a=rtpmap:105 CN/16000
    a=rtpmap:13 CN/8000
    a=rtpmap:110 telephone-event/48000
    a=rtpmap:112 telephone-event/32000
    a=rtpmap:113 telephone-event/16000
    a=rtpmap:126 telephone-event/8000
    a=ssrc:1872264350 cname:07rEDU/iq/MyZcQ1
    a=ssrc:1872264350 msid:ARDAMS ARDAMSa0
    a=ssrc:1872264350 mslabel:ARDAMS
    a=ssrc:1872264350 label:ARDAMSa0

它发生在匿名视频聊天https://play.google.com/store/apps/details?id=com.lonje