Eliminate channel.h from peer_connection.cc This limits the exposure of the implementation of ChannelInterface. Bug: webrtc:13931 Change-Id: Ifc0fa496c210413d81ad71f44fa4040b881d092c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260561 Reviewed-by: Henrik Boström <hbos@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36725}
diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc index f13d5a9..957c2ec 100644 --- a/pc/peer_connection.cc +++ b/pc/peer_connection.cc
@@ -42,7 +42,6 @@ #include "p2p/base/p2p_constants.h" #include "p2p/base/p2p_transport_channel.h" #include "p2p/base/transport_info.h" -#include "pc/channel.h" #include "pc/ice_server_parsing.h" #include "pc/rtp_receiver.h" #include "pc/rtp_receiver_proxy.h" @@ -1559,10 +1558,10 @@ if (transceiver->media_type() != cricket::MEDIA_TYPE_VIDEO) continue; - auto* video_channel = static_cast<cricket::VideoChannel*>( - transceiver->internal()->channel()); + auto* video_channel = transceiver->internal()->channel(); if (video_channel) - channels.push_back(video_channel->media_channel()); + channels.push_back(static_cast<cricket::VideoMediaChannel*>( + video_channel->media_channel())); } worker_thread()->Invoke<void>(