Change MediaChannel to have a Role parameter
This allows MediaChannel to know whether it's being used
for sending, receiving, or both. This is a preparatory CL
for landing the split of MediaChannel usage into sending and
receiving objects.
Bug: webrtc:13931
Change-Id: If518c8b53d5256771200a42e1b5f2b3321d26d8c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292860
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39283}
diff --git a/pc/rtp_sender_receiver_unittest.cc b/pc/rtp_sender_receiver_unittest.cc
index 0404343..bcca2da 100644
--- a/pc/rtp_sender_receiver_unittest.cc
+++ b/pc/rtp_sender_receiver_unittest.cc
@@ -119,11 +119,13 @@
// Create the channels, discard the result; we get them later.
// Fake media channels are owned by the media engine.
media_engine_->voice().CreateMediaChannel(
- &fake_call_, cricket::MediaConfig(), cricket::AudioOptions(),
- webrtc::CryptoOptions());
+ cricket::MediaChannel::Role::kBoth, &fake_call_, cricket::MediaConfig(),
+ cricket::AudioOptions(), webrtc::CryptoOptions());
media_engine_->video().CreateMediaChannel(
- &fake_call_, cricket::MediaConfig(), cricket::VideoOptions(),
- webrtc::CryptoOptions(), video_bitrate_allocator_factory_.get());
+ cricket::MediaChannel::Role::kBoth, &fake_call_, cricket::MediaConfig(),
+ cricket::VideoOptions(), webrtc::CryptoOptions(),
+ video_bitrate_allocator_factory_.get());
+ // TODO(hta): Split into sender and receiver channels
voice_media_channel_ = absl::WrapUnique(media_engine_->GetVoiceChannel(0));
video_media_channel_ = absl::WrapUnique(media_engine_->GetVideoChannel(0));