Add an OpenChannel method to MediaTransportInterface and call it whenever PeerConnection opens a new data channel.

This informs the media transport that PeerConnection wants to use a data channel
and gives it a chance to set up before the data channel sends the first message.

Bug: webrtc:9719
Change-Id: I6ea905a74b29b8735e77ac68bc8606e7bca77f18
Reviewed-on: https://webrtc-review.googlesource.com/c/124020
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Peter Slatala <psla@webrtc.org>
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26823}
diff --git a/api/media_transport_interface.cc b/api/media_transport_interface.cc
index de04e19..abd9861 100644
--- a/api/media_transport_interface.cc
+++ b/api/media_transport_interface.cc
@@ -88,4 +88,11 @@
 void MediaTransportInterface::SetAllocatedBitrateLimits(
     const MediaTransportAllocatedBitrateLimits& limits) {}
 
+// TODO(mellem):  Delete when all implementations support it.
+RTCError MediaTransportInterface::OpenChannel(int channel_id) {
+  // NB: This must return OK to avoid breaking existing implementations, which
+  // do not require calling OpenChannel.
+  return RTCError::OK();
+}
+
 }  // namespace webrtc