Chromium Code Reviews| Index: webrtc/pc/channel.h |
| diff --git a/webrtc/pc/channel.h b/webrtc/pc/channel.h |
| index c6dc29dd08c9a1829f5b1b63f98d20bad28038bf..4b0f64d8cf2d1efbf6d3cbe8ddfc608484241814 100644 |
| --- a/webrtc/pc/channel.h |
| +++ b/webrtc/pc/channel.h |
| @@ -33,7 +33,6 @@ |
| #include "webrtc/pc/mediamonitor.h" |
| #include "webrtc/pc/mediasession.h" |
| #include "webrtc/pc/rtcpmuxfilter.h" |
| -#include "webrtc/pc/rtptransportinternal.h" |
| #include "webrtc/pc/srtpfilter.h" |
| #include "webrtc/rtc_base/asyncinvoker.h" |
| #include "webrtc/rtc_base/asyncudpsocket.h" |
| @@ -44,6 +43,8 @@ |
| namespace webrtc { |
| class AudioSinkInterface; |
| +class RtpTransportInternal; |
| +class SrtpTransport; |
| } // namespace webrtc |
| namespace cricket { |
| @@ -100,11 +101,13 @@ class BaseChannel |
| bool enabled() const { return enabled_; } |
| // This function returns true if we are using SRTP. |
|
Taylor Brandstetter
2017/08/26 02:40:39
nit: Should update this comment.
Zhi Huang
2017/08/29 18:40:34
Done.
|
| - bool secure() const { return srtp_filter_.IsActive(); } |
| + bool secure_sdes() const { return srtp_filter_.IsActive(); } |
|
pthatcher
2017/08/28 21:42:56
While we're changing the method name, can we make
Zhi Huang
2017/08/29 18:40:34
Done.
|
| // The following function returns true if we are using |
| // DTLS-based keying. If you turned off SRTP later, however |
| // you could have secure() == false and dtls_secure() == true. |
| - bool secure_dtls() const { return dtls_keyed_; } |
| + bool secure_dtls() const { return dtls_active_; } |
| + |
| + bool secure() const { return secure_sdes() || secure_dtls(); } |
|
pthatcher
2017/08/28 21:42:56
Would "srtp_active" be a good name here, to along
Zhi Huang
2017/08/29 18:40:34
It sounds good to me.
|
| bool writable() const { return writable_; } |
| @@ -398,6 +401,7 @@ class BaseChannel |
| DtlsTransportInternal* rtp_dtls_transport_ = nullptr; |
| DtlsTransportInternal* rtcp_dtls_transport_ = nullptr; |
| std::unique_ptr<webrtc::RtpTransportInternal> rtp_transport_; |
| + webrtc::SrtpTransport* srtp_transport_ = nullptr; |
| std::vector<std::pair<rtc::Socket::Option, int> > socket_options_; |
| std::vector<std::pair<rtc::Socket::Option, int> > rtcp_socket_options_; |
| SrtpFilter srtp_filter_; |
|
pthatcher
2017/08/28 21:42:56
It feels like this really should be renamed to Sde
Zhi Huang
2017/08/29 18:40:34
What about sdes_negotiator_? I plan to rename the
|
| @@ -405,9 +409,8 @@ class BaseChannel |
| bool writable_ = false; |
| bool was_ever_writable_ = false; |
| bool has_received_packet_ = false; |
| - bool dtls_keyed_ = false; |
| + bool dtls_active_ = false; |
| const bool srtp_required_ = true; |
| - int rtp_abs_sendtime_extn_id_ = -1; |
| // MediaChannel related members that should be accessed from the worker |
| // thread. |