We already cherry-picked this when we vendored f30c044cf9. Upstream commit: https://webrtc.googlesource.com/src/+/995688c8e85b520d50961486abbe0cc03eae9558 Revert "more p2p cleanups" This reverts commit f30c044cf9bd06f91017c171d98690094ce6d88b. Reason for revert: breaks roll to chromium: https://ci.chromium.org/ui/p/chromium/builders/try/mac_chromium_compile_dbg_ng/2290104/overview Original change's description: > more p2p cleanups > > Move test code from p2p/base and rtc_base/ into p2p/test/ > This p2p/base much less crowded and > clarifies that the rtc_base/nat* is in fact only test code. > > BUG=webrtc:0 > > Change-Id: I4d14fae24cb0eff6783962f4b4483b560367ca5d > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/378900 > Commit-Queue: Jonas Oreland <jonaso@webrtc.org> > Reviewed-by: Harald Alvestrand <hta@webrtc.org> > Auto-Submit: Jonas Oreland <jonaso@webrtc.org> > Cr-Commit-Position: refs/heads/main@{#43995} Bug: webrtc:0 Change-Id: I6c79fa85f53fdb9a1dacbe38911771f9a4289c76 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/379040 Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> Owners-Override: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43999} Differential Revision: https://phabricator.services.mozilla.com/D244009
140 lines
6.4 KiB
Diff
140 lines
6.4 KiB
Diff
From: Dan Minor <dminor@mozilla.com>
|
|
Date: Wed, 7 Feb 2018 15:00:00 -0500
|
|
Subject: Bug 1376873 - Fix GetRTCPSenderReport; r=ng
|
|
|
|
Differential Revision: https://phabricator.services.mozilla.com/D7431
|
|
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/b55b0368d9f21849fa465fa9b3f028285c9ea6ae
|
|
---
|
|
call/video_receive_stream.h | 3 +++
|
|
modules/rtp_rtcp/source/rtcp_receiver.cc | 7 +++++++
|
|
modules/rtp_rtcp/source/rtcp_receiver.h | 4 ++++
|
|
modules/rtp_rtcp/source/rtp_rtcp_impl.cc | 5 +++++
|
|
modules/rtp_rtcp/source/rtp_rtcp_impl.h | 3 +++
|
|
modules/rtp_rtcp/source/rtp_rtcp_impl2.cc | 5 +++++
|
|
modules/rtp_rtcp/source/rtp_rtcp_impl2.h | 3 +++
|
|
modules/rtp_rtcp/source/rtp_rtcp_interface.h | 4 ++++
|
|
8 files changed, 34 insertions(+)
|
|
|
|
diff --git a/call/video_receive_stream.h b/call/video_receive_stream.h
|
|
index 25bf070cb7..c96a943f4a 100644
|
|
--- a/call/video_receive_stream.h
|
|
+++ b/call/video_receive_stream.h
|
|
@@ -169,6 +169,9 @@ class VideoReceiveStreamInterface : public MediaReceiveStreamInterface {
|
|
RtcpPacketTypeCounter rtcp_packet_type_counts;
|
|
std::optional<RtpReceiveStats> rtx_rtp_stats;
|
|
|
|
+ uint32_t rtcp_sender_packets_sent;
|
|
+ uint32_t rtcp_sender_octets_sent;
|
|
+
|
|
// Timing frame info: all important timestamps for a full lifetime of a
|
|
// single 'timing frame'.
|
|
std::optional<webrtc::TimingFrameInfo> timing_frame_info;
|
|
diff --git a/modules/rtp_rtcp/source/rtcp_receiver.cc b/modules/rtp_rtcp/source/rtcp_receiver.cc
|
|
index 3e710dfc1d..9f94e253c4 100644
|
|
--- a/modules/rtp_rtcp/source/rtcp_receiver.cc
|
|
+++ b/modules/rtp_rtcp/source/rtcp_receiver.cc
|
|
@@ -384,6 +384,13 @@ RTCPReceiver::ConsumeReceivedXrReferenceTimeInfo() {
|
|
return last_xr_rtis;
|
|
}
|
|
|
|
+void RTCPReceiver::RemoteRTCPSenderInfo(uint32_t* packet_count,
|
|
+ uint32_t* octet_count) const {
|
|
+ MutexLock lock(&rtcp_receiver_lock_);
|
|
+ *packet_count = remote_sender_packet_count_;
|
|
+ *octet_count = remote_sender_octet_count_;
|
|
+}
|
|
+
|
|
std::vector<ReportBlockData> RTCPReceiver::GetLatestReportBlockData() const {
|
|
std::vector<ReportBlockData> result;
|
|
MutexLock lock(&rtcp_receiver_lock_);
|
|
diff --git a/modules/rtp_rtcp/source/rtcp_receiver.h b/modules/rtp_rtcp/source/rtcp_receiver.h
|
|
index 766a808044..2551534b9f 100644
|
|
--- a/modules/rtp_rtcp/source/rtcp_receiver.h
|
|
+++ b/modules/rtp_rtcp/source/rtcp_receiver.h
|
|
@@ -123,6 +123,10 @@ class RTCPReceiver final {
|
|
|
|
std::vector<rtcp::ReceiveTimeInfo> ConsumeReceivedXrReferenceTimeInfo();
|
|
|
|
+ // Get received sender packet and octet counts
|
|
+ void RemoteRTCPSenderInfo(uint32_t* packet_count,
|
|
+ uint32_t* octet_count) const;
|
|
+
|
|
std::optional<TimeDelta> AverageRtt() const;
|
|
std::optional<TimeDelta> LastRtt() const;
|
|
|
|
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
|
|
index b846675327..6390343c03 100644
|
|
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
|
|
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
|
|
@@ -516,6 +516,11 @@ void ModuleRtpRtcpImpl::GetSendStreamDataCounters(
|
|
}
|
|
|
|
// Received RTCP report.
|
|
+void ModuleRtpRtcpImpl::RemoteRTCPSenderInfo(uint32_t* packet_count,
|
|
+ uint32_t* octet_count) const {
|
|
+ return rtcp_receiver_.RemoteRTCPSenderInfo(packet_count, octet_count);
|
|
+}
|
|
+
|
|
std::vector<ReportBlockData> ModuleRtpRtcpImpl::GetLatestReportBlockData()
|
|
const {
|
|
return rtcp_receiver_.GetLatestReportBlockData();
|
|
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.h b/modules/rtp_rtcp/source/rtp_rtcp_impl.h
|
|
index c27b9a55a5..00783ac95c 100644
|
|
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl.h
|
|
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.h
|
|
@@ -203,6 +203,9 @@ class ABSL_DEPRECATED("") ModuleRtpRtcpImpl
|
|
StreamDataCounters* rtp_counters,
|
|
StreamDataCounters* rtx_counters) const override;
|
|
|
|
+ void RemoteRTCPSenderInfo(uint32_t* packet_count,
|
|
+ uint32_t* octet_count) const override;
|
|
+
|
|
// A snapshot of the most recent Report Block with additional data of
|
|
// interest to statistics. Used to implement RTCRemoteInboundRtpStreamStats.
|
|
// Within this list, the `ReportBlockData::source_ssrc()`, which is the SSRC
|
|
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
|
|
index cea04726d2..e25a4f069b 100644
|
|
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
|
|
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
|
|
@@ -527,6 +527,11 @@ void ModuleRtpRtcpImpl2::GetSendStreamDataCounters(
|
|
}
|
|
|
|
// Received RTCP report.
|
|
+void ModuleRtpRtcpImpl2::RemoteRTCPSenderInfo(uint32_t* packet_count,
|
|
+ uint32_t* octet_count) const {
|
|
+ return rtcp_receiver_.RemoteRTCPSenderInfo(packet_count, octet_count);
|
|
+}
|
|
+
|
|
std::vector<ReportBlockData> ModuleRtpRtcpImpl2::GetLatestReportBlockData()
|
|
const {
|
|
return rtcp_receiver_.GetLatestReportBlockData();
|
|
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl2.h b/modules/rtp_rtcp/source/rtp_rtcp_impl2.h
|
|
index 57139e2242..1b2afac61f 100644
|
|
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl2.h
|
|
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl2.h
|
|
@@ -198,6 +198,9 @@ class ModuleRtpRtcpImpl2 final : public RtpRtcpInterface,
|
|
StreamDataCounters* rtp_counters,
|
|
StreamDataCounters* rtx_counters) const override;
|
|
|
|
+ void RemoteRTCPSenderInfo(uint32_t* packet_count,
|
|
+ uint32_t* octet_count) const override;
|
|
+
|
|
// A snapshot of the most recent Report Block with additional data of
|
|
// interest to statistics. Used to implement RTCRemoteInboundRtpStreamStats.
|
|
// Within this list, the `ReportBlockData::source_ssrc()`, which is the SSRC
|
|
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_interface.h b/modules/rtp_rtcp/source/rtp_rtcp_interface.h
|
|
index 1ae3a312d2..b61d75cde2 100644
|
|
--- a/modules/rtp_rtcp/source/rtp_rtcp_interface.h
|
|
+++ b/modules/rtp_rtcp/source/rtp_rtcp_interface.h
|
|
@@ -403,6 +403,10 @@ class RtpRtcpInterface : public RtcpFeedbackSenderInterface {
|
|
StreamDataCounters* rtp_counters,
|
|
StreamDataCounters* rtx_counters) const = 0;
|
|
|
|
+
|
|
+ // Returns packet count and octet count from RTCP sender report.
|
|
+ virtual void RemoteRTCPSenderInfo(uint32_t* packet_count,
|
|
+ uint32_t* octet_count) const = 0;
|
|
// A snapshot of Report Blocks with additional data of interest to statistics.
|
|
// Within this list, the sender-source SSRC pair is unique and per-pair the
|
|
// ReportBlockData represents the latest Report Block that was received for
|