[Unified Plan] Implement FiredDirection for RtpTransceiver
Bug: webrtc:9236
Change-Id: Ib5a8215f3762f35b68d2a285c7d676f93f1212c5
Reviewed-on: https://webrtc-review.googlesource.com/88921
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24010}
diff --git a/api/rtptransceiverinterface.h b/api/rtptransceiverinterface.h
index 8cb3bd5..26f1fdf 100644
--- a/api/rtptransceiverinterface.h
+++ b/api/rtptransceiverinterface.h
@@ -107,6 +107,15 @@
// https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-currentdirection
virtual absl::optional<RtpTransceiverDirection> current_direction() const = 0;
+ // An internal slot designating for which direction the relevant
+ // PeerConnection events have been fired. This is to ensure that events like
+ // OnAddTrack only get fired once even if the same session description is
+ // applied again.
+ // Exposed in the public interface for use by Chromium.
+ virtual absl::optional<RtpTransceiverDirection> fired_direction() const {
+ return absl::nullopt;
+ }
+
// The Stop method irreversibly stops the RtpTransceiver. The sender of this
// transceiver will no longer send, the receiver will no longer receive.
// https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-stop