versatica / libmediasoupclient

mediasoup client side C++ library
https://mediasoup.org
ISC License
286 stars 177 forks source link

Duplicate a=mid value '2', what is `Consumer for RTP probation` for ? #83

Closed haiyangwu closed 4 years ago

haiyangwu commented 4 years ago

Recently, I was trying to solve this bug https://github.com/haiyangwu/mediasoup-client-android/issues/23, but found probatorConsumer leads to this error (Duplicate a=mid value '2').

Related code is

from

https://github.com/versatica/libmediasoupclient/blob/cc511b8c4904ab86c82ba7626a1ddcba4e063d80/src/Transport.cpp#L375

to

https://github.com/versatica/libmediasoupclient/blob/cc511b8c4904ab86c82ba7626a1ddcba4e063d80/src/Transport.cpp#L394

The mid for probatorConsumer was 2

a=mid:2
a=sendonly
a=ice-ufrag:ttwmdcuvljp4xqzq
a=ice-pwd:aqd7elz8qkq9y3gr73yofysdndnqnwd4
a=candidate:udpcandidate 1 udp 1076302079 10.83.1.212 40934 typ host
a=end-of-candidates
a=ice-options:renomination
a=ssrc:1234 cname:probator
a=ssrc:1234 msid:probator probator
a=rtcp-mux
a=rtcp-rsize

and it will be deprecated when consumer another one

{"peerId":"u4vhylwg","producerId":"bd4a0e4a-1371-423c-860d-e606ab6945e0","id":"681e4ceb-16e4-48b6-a088-97d1855d8cfc","kind":"audio","rtpParameters":{"codecs":[{"mimeType":"audio\/opus","payloadType":100,"clockRate":48000,"channels":2,"parameters":{"minptime":10,"useinbandfec":1,"sprop-stereo":1,"usedtx":1},"rtcpFeedback":[]}],"headerExtensions":[{"uri":"urn:ietf:params:rtp-hdrext:sdes:mid","id":1,"encrypt":false,"parameters":{}},{"uri":"http:\/\/www.webrtc.org\/experiments\/rtp-hdrext\/abs-send-time","id":4,"encrypt":false,"parameters":{}},{"uri":"urn:ietf:params:rtp-hdrext:ssrc-audio-level","id":10,"encrypt":false,"parameters":{}}],"encodings":[{"ssrc":821039368}],"rtcp":{"cname":"b4KdU1Vyez8SezeG","reducedSize":true,"mux":true},"mid":"2"},"type":"simple","appData":{"peerId":"u4vhylwg"},"producerPaused":false}

@jmillan How can I solve this bug? Any suggestions ? just remove code related to Consumer for RTP probation?

BTW, sorry for opening this issue, I can not visit mediasoup Discourse Group from my network 😔

jmillan commented 4 years ago

Hi @haiyangwu,

Can you please paste here logs with SDP offer/answer so we can see the duplicated mid?

jmillan commented 4 years ago

Or at least tell me the steps to reproduce it so we can test it.

haiyangwu commented 4 years ago

Thx @jmillan,

dup.log This a whole trace log, it's the answer SDP duplication occurs, line 3053 and line 3072 are both a=mid:2, the first one is for probator.

Android client joins a two users room will reproduce it.

ibc commented 4 years ago

Which libmediasoupclient version are you using? v3 branch is not ready yet for a new stable version.

haiyangwu commented 4 years ago

@ibc Ok... and it's v3 branch @3e0d65e1ed6a1b8da168699a7555f9f71faa322d, I'll do some workaround change and sync until the new stable version ready.

jmillan commented 4 years ago

Reopened, this is an issue to be solved.

jmillan commented 4 years ago

@haiyangwu,

The issue has been solved.

It would be great if you could give it a try. Thanks.