Index: webrtc/api/ortc/rtptransportinterface.h |
diff --git a/webrtc/api/ortc/rtptransportinterface.h b/webrtc/api/ortc/rtptransportinterface.h |
index 119d662edde283815170dbab234103ea8c763f7b..d673c503d385d4e9b2f5b8d2729834f3934896d8 100644 |
--- a/webrtc/api/ortc/rtptransportinterface.h |
+++ b/webrtc/api/ortc/rtptransportinterface.h |
@@ -15,13 +15,14 @@ |
#include "webrtc/api/ortc/packettransportinterface.h" |
#include "webrtc/api/rtcerror.h" |
+#include "webrtc/common_types.h" |
#include "webrtc/rtc_base/optional.h" |
namespace webrtc { |
class RtpTransportAdapter; |
-struct RtcpParameters { |
+struct RtcpParameters final { |
// The SSRC to be used in the "SSRC of packet sender" field. If not set, one |
// will be chosen by the implementation. |
// TODO(deadbeef): Not implemented. |
@@ -51,6 +52,19 @@ struct RtcpParameters { |
bool operator!=(const RtcpParameters& o) const { return !(*this == o); } |
}; |
+struct RtpTransportParameters final { |
+ // Enabled periodic sending of keep-alive packets, that help prevent timeouts |
+ // on the network level, such as NAT bindings. See RFC6263 section 4.6. |
+ RtpKeepAliveConfig keepalive; |
+ |
+ bool operator==(const RtpTransportParameters& o) const { |
+ return keepalive == o.keepalive; |
+ } |
+ bool operator!=(const RtpTransportParameters& o) const { |
+ return !(*this == o); |
+ } |
+}; |
+ |
// Base class for different types of RTP transports that can be created by an |
// OrtcFactory. Used by RtpSenders/RtpReceivers. |
// |
@@ -85,6 +99,10 @@ class RtpTransportInterface { |
// parameters (see above). |
virtual RtcpParameters GetRtcpParameters() const = 0; |
+ virtual RTCError SetRtpTransportParameters( |
+ const RtpTransportParameters& parameters) = 0; |
+ virtual RtpTransportParameters GetRtpTransportParameters() const = 0; |
+ |
protected: |
// Only for internal use. Returns a pointer to an internal interface, for use |
// by the implementation. |