diff --git a/pc/channel.cc b/pc/channel.cc index ea4684f4f5..9156f21f66 100644 --- a/pc/channel.cc +++ b/pc/channel.cc @@ -1077,6 +1077,9 @@ void BaseChannel::CacheRtpAbsSendTimeHeaderExtension_n( if (sdes_transport_) { sdes_transport_->CacheRtpAbsSendTimeHeaderExtension( rtp_abs_sendtime_extn_id); + } else if (dtls_srtp_transport_) { + dtls_srtp_transport_->CacheRtpAbsSendTimeHeaderExtension( + rtp_abs_sendtime_extn_id); } else { RTC_LOG(LS_WARNING) << "Trying to cache the Absolute Send Time extension id " diff --git a/pc/dtlssrtptransport.h b/pc/dtlssrtptransport.h index e03342597e..55b96c1645 100644 --- a/pc/dtlssrtptransport.h +++ b/pc/dtlssrtptransport.h @@ -46,6 +46,13 @@ class DtlsSrtpTransport : public RtpTransportInternalAdapter { bool IsActive() { return srtp_transport_->IsActive(); } + // Cache RTP Absoulute SendTime extension header ID. This is only used when + // external authentication is enabled. + void CacheRtpAbsSendTimeHeaderExtension(int rtp_abs_sendtime_extn_id) { + srtp_transport_->CacheRtpAbsSendTimeHeaderExtension( + rtp_abs_sendtime_extn_id); + } + // TODO(zhihuang): Remove this when we remove RtpTransportAdapter. RtpTransportAdapter* GetInternal() override { return nullptr; } diff --git a/pc/srtptransport.h b/pc/srtptransport.h index 23e2a3c544..d098cd8317 100644 --- a/pc/srtptransport.h +++ b/pc/srtptransport.h @@ -93,8 +93,8 @@ class SrtpTransport : public RtpTransportInternalAdapter { // Returns rtp auth params from srtp context. bool GetRtpAuthParams(uint8_t** key, int* key_len, int* tag_len); - // Helper method to get RTP Absoulute SendTime extension header id if - // present in remote supported extensions list. + // Cache RTP Absoulute SendTime extension header ID. This is only used when + // external authentication is enabled. void CacheRtpAbsSendTimeHeaderExtension(int rtp_abs_sendtime_extn_id) { rtp_abs_sendtime_extn_id_ = rtp_abs_sendtime_extn_id; }