diff --git a/media/base/media_channel.h b/media/base/media_channel.h index c59a5753a6..b7f5987f6e 100644 --- a/media/base/media_channel.h +++ b/media/base/media_channel.h @@ -828,6 +828,10 @@ struct RtcpParameters { struct MediaChannelParameters { virtual ~MediaChannelParameters() = default; + // This is the value to be sent in the MID RTP header extension (if the header + // extension in included in the list of extensions). + // It is also used as a key to map the channnel to its transport. + std::string mid; std::vector codecs; std::vector extensions; @@ -862,9 +866,6 @@ struct MediaChannelParameters { struct SenderParameters : MediaChannelParameters { int max_bandwidth_bps = -1; - // This is the value to be sent in the MID RTP header extension (if the header - // extension in included in the list of extensions). - std::string mid; bool extmap_allow_mixed = false; protected: diff --git a/media/engine/webrtc_voice_engine.cc b/media/engine/webrtc_voice_engine.cc index 0232ad8d08..e65d0eb734 100644 --- a/media/engine/webrtc_voice_engine.cc +++ b/media/engine/webrtc_voice_engine.cc @@ -2071,6 +2071,7 @@ bool WebRtcVoiceReceiveChannel::SetReceiverParameters( << params.ToString(); // TODO(pthatcher): Refactor this to be more clean now that we have // all the information at once. + mid_ = params.mid; if (!SetRecvCodecs(params.codecs)) { return false; diff --git a/pc/channel.cc b/pc/channel.cc index af130f8316..45c6e74f64 100644 --- a/pc/channel.cc +++ b/pc/channel.cc @@ -878,6 +878,7 @@ bool VoiceChannel::SetLocalContent_w(const MediaContentDescription* content, content, header_extensions, webrtc::RtpTransceiverDirectionHasRecv(content->direction()), &recv_params); + recv_params.mid = mid(); if (!media_receive_channel()->SetReceiverParameters(recv_params)) { error_desc = StringFormat(