Index: webrtc/pc/channel.h |
diff --git a/webrtc/pc/channel.h b/webrtc/pc/channel.h |
index b95bd529b005a71e5b749dc1333425467ece376d..c6dc29dd08c9a1829f5b1b63f98d20bad28038bf 100644 |
--- a/webrtc/pc/channel.h |
+++ b/webrtc/pc/channel.h |
@@ -33,6 +33,7 @@ |
#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" |
@@ -43,8 +44,6 @@ |
namespace webrtc { |
class AudioSinkInterface; |
-class RtpTransportInternal; |
-class SrtpTransport; |
} // namespace webrtc |
namespace cricket { |
@@ -100,12 +99,12 @@ |
const std::string& transport_name() const { return transport_name_; } |
bool enabled() const { return enabled_; } |
- // This function returns true if we are using SDES. |
- bool sdes_active() const { return sdes_negotiator_.IsActive(); } |
- // The following function returns true if we are using DTLS-based keying. |
- bool dtls_active() const { return dtls_active_; } |
- // This function returns true if using SRTP (DTLS-based keying or SDES). |
- bool srtp_active() const { return sdes_active() || dtls_active(); } |
+ // This function returns true if we are using SRTP. |
+ bool secure() const { return srtp_filter_.IsActive(); } |
+ // 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 writable() const { return writable_; } |
@@ -189,6 +188,8 @@ |
override; |
int SetOption_n(SocketType type, rtc::Socket::Option o, int val); |
+ SrtpFilter* srtp_filter() { return &srtp_filter_; } |
+ |
virtual cricket::MediaType media_type() = 0; |
// This function returns true if we require SRTP for call setup. |
@@ -377,8 +378,6 @@ |
void CacheRtpAbsSendTimeHeaderExtension_n(int rtp_abs_sendtime_extn_id); |
int GetTransportOverheadPerPacket() const; |
void UpdateTransportOverhead(); |
- // Wraps the existing RtpTransport in an SrtpTransport. |
- void EnableSrtpTransport_n(); |
rtc::Thread* const worker_thread_; |
rtc::Thread* const network_thread_; |
@@ -399,16 +398,16 @@ |
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 sdes_negotiator_; |
+ SrtpFilter srtp_filter_; |
RtcpMuxFilter rtcp_mux_filter_; |
bool writable_ = false; |
bool was_ever_writable_ = false; |
bool has_received_packet_ = false; |
- bool dtls_active_ = false; |
+ bool dtls_keyed_ = false; |
const bool srtp_required_ = true; |
+ int rtp_abs_sendtime_extn_id_ = -1; |
// MediaChannel related members that should be accessed from the worker |
// thread. |