Set MID in AudioReceiveChannel
This variable was present but unset.
Bug: webrtc:360058654
Change-Id: I492069a1e87208c6fbb5ad5f0a00fcc2ccc0bc25
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361824
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42988}
diff --git a/media/base/media_channel.h b/media/base/media_channel.h
index c59a575..b7f5987 100644
--- a/media/base/media_channel.h
+++ b/media/base/media_channel.h
@@ -828,6 +828,10 @@
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<Codec> codecs;
std::vector<webrtc::RtpExtension> extensions;
@@ -862,9 +866,6 @@
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 0232ad8..e65d0eb 100644
--- a/media/engine/webrtc_voice_engine.cc
+++ b/media/engine/webrtc_voice_engine.cc
@@ -2071,6 +2071,7 @@
<< 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 af130f8..45c6e74 100644
--- a/pc/channel.cc
+++ b/pc/channel.cc
@@ -878,6 +878,7 @@
content, header_extensions,
webrtc::RtpTransceiverDirectionHasRecv(content->direction()),
&recv_params);
+ recv_params.mid = mid();
if (!media_receive_channel()->SetReceiverParameters(recv_params)) {
error_desc = StringFormat(