Add class comments to Call and ChannelInterface
These class comments can help people to keep the relationship between
various classes / levels of abstraction straight.
Bug: None
Change-Id: I9fc899ac9c1080a406b06e88a38883cc3f00093d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/248169
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35769}
diff --git a/call/call.h b/call/call.h
index 1442c05..11451c5 100644
--- a/call/call.h
+++ b/call/call.h
@@ -64,9 +64,16 @@
mutable std::unique_ptr<Impl> impl_;
};
+// A Call represents a two-way connection carrying zero or more outgoing
+// and incoming media streams, transported over one or more RTP transports.
+
// A Call instance can contain several send and/or receive streams. All streams
// are assumed to have the same remote endpoint and will share bitrate estimates
// etc.
+
+// When using the PeerConnection API, there is an one to one relationship
+// between the PeerConnection and the Call.
+
class Call {
public:
using Config = CallConfig;
diff --git a/pc/channel_interface.h b/pc/channel_interface.h
index 6033046..a16a9b7 100644
--- a/pc/channel_interface.h
+++ b/pc/channel_interface.h
@@ -32,7 +32,14 @@
class VoiceChannel;
struct MediaConfig;
-// ChannelInterface contains methods common to voice, video and data channels.
+// A Channel is a construct that groups media streams of the same type
+// (audio or video), both outgoing and incoming.
+// When the PeerConnection API is used, a Channel corresponds one to one
+// to an RtpTransceiver.
+// When Unified Plan is used, there can only be at most one outgoing and
+// one incoming stream. With Plan B, there can be more than one.
+
+// ChannelInterface contains methods common to voice and video channels.
// As more methods are added to BaseChannel, they should be included in the
// interface as well.
class ChannelInterface {