Eliminate channel.h from rtp_transmission_manager.cc

This also hides the existence of the classes VideoChannel and
VoiceChannel from anything that does not include "channel.h".

Bug: webrtc:13931
Change-Id: I080a692b6acfd5d2d0401ec20d59c3a684eddb05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260944
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36746}
This commit is contained in:
Harald Alvestrand
2022-05-03 13:44:34 +00:00
committed by WebRTC LUCI CQ
parent 00579e8bce
commit 25adc8e36b
7 changed files with 98 additions and 33 deletions

View File

@ -29,8 +29,6 @@ class VideoBitrateAllocatorFactory;
namespace cricket {
class MediaContentDescription;
class VideoChannel;
class VoiceChannel;
struct MediaConfig;
// A Channel is a construct that groups media streams of the same type
@ -50,6 +48,10 @@ class ChannelInterface {
virtual cricket::MediaType media_type() const = 0;
virtual MediaChannel* media_channel() const = 0;
// Typecasts of media_channel(). Will cause an exception if the
// channel is of the wrong type.
virtual VideoMediaChannel* video_media_channel() const = 0;
virtual VoiceMediaChannel* voice_media_channel() const = 0;
// Returns a string view for the transport name. Fetching the transport name
// must be done on the network thread only and note that the lifetime of
@ -88,30 +90,6 @@ class ChannelInterface {
virtual bool SetRtpTransport(webrtc::RtpTransportInternal* rtp_transport) = 0;
};
class ChannelFactoryInterface {
public:
virtual std::unique_ptr<VideoChannel> CreateVideoChannel(
webrtc::Call* call,
const MediaConfig& media_config,
const std::string& mid,
bool srtp_required,
const webrtc::CryptoOptions& crypto_options,
const VideoOptions& options,
webrtc::VideoBitrateAllocatorFactory*
video_bitrate_allocator_factory) = 0;
virtual std::unique_ptr<VoiceChannel> CreateVoiceChannel(
webrtc::Call* call,
const MediaConfig& media_config,
const std::string& mid,
bool srtp_required,
const webrtc::CryptoOptions& crypto_options,
const AudioOptions& options) = 0;
protected:
virtual ~ChannelFactoryInterface() = default;
};
} // namespace cricket
#endif // PC_CHANNEL_INTERFACE_H_