Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Unified Diff: webrtc/pc/srtpfilter.cc

Issue 2437503004: Set actual transport overhead in rtp_rtcp (Closed)
Patch Set: Response to comments of honghaiz3 Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/pc/srtpfilter.cc
diff --git a/webrtc/pc/srtpfilter.cc b/webrtc/pc/srtpfilter.cc
index f1ecff1001a784b28cff9c8bd7f7d2ef82845d77..ef8953978594fd53afc01a70e74be9604bb1f4d7 100644
--- a/webrtc/pc/srtpfilter.cc
+++ b/webrtc/pc/srtpfilter.cc
@@ -225,6 +225,17 @@ bool SrtpFilter::GetRtpAuthParams(uint8_t** key, int* key_len, int* tag_len) {
return send_session_->GetRtpAuthParams(key, key_len, tag_len);
}
+bool SrtpFilter::GetSrtpOverhead(int* srtp_overhead) const {
+ if (!IsActive()) {
+ LOG(LS_WARNING) << "Failed to GetSrtpOverhead: SRTP not active";
+ return false;
+ }
+
+ RTC_CHECK(send_session_);
+ *srtp_overhead = send_session_->GetSrtpOverhead();
+ return true;
+}
+
void SrtpFilter::set_signal_silent_time(int signal_silent_time_in_ms) {
signal_silent_time_in_ms_ = signal_silent_time_in_ms;
if (IsActive()) {
@@ -616,6 +627,10 @@ bool SrtpSession::GetRtpAuthParams(uint8_t** key, int* key_len, int* tag_len) {
#endif
}
+int SrtpSession::GetSrtpOverhead() const {
+ return rtp_auth_tag_len_;
+}
+
bool SrtpSession::GetSendStreamPacketIndex(void* p,
int in_len,
int64_t* index) {

Powered by Google App Engine
This is Rietveld 408576698