File: s0003.patch

package info (click to toggle)
firefox 147.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,683,484 kB
  • sloc: cpp: 7,607,246; javascript: 6,533,185; ansic: 3,775,227; python: 1,415,393; xml: 634,561; asm: 438,951; java: 186,241; sh: 62,752; makefile: 18,079; objc: 13,092; perl: 12,808; yacc: 4,583; cs: 3,846; pascal: 3,448; lex: 1,720; ruby: 1,003; php: 436; lisp: 258; awk: 247; sql: 66; sed: 54; csh: 10; exp: 6
file content (107 lines) | stat: -rw-r--r-- 5,006 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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_impl2.cc    | 5 +++++
 modules/rtp_rtcp/source/rtp_rtcp_impl2.h     | 3 +++
 modules/rtp_rtcp/source/rtp_rtcp_interface.h | 4 ++++
 6 files changed, 26 insertions(+)

diff --git a/call/video_receive_stream.h b/call/video_receive_stream.h
index b1a99c5519..c2f27ec5f3 100644
--- a/call/video_receive_stream.h
+++ b/call/video_receive_stream.h
@@ -170,6 +170,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 2bc9014a33..586c8730ad 100644
--- a/modules/rtp_rtcp/source/rtcp_receiver.cc
+++ b/modules/rtp_rtcp/source/rtcp_receiver.cc
@@ -338,6 +338,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 555269ae24..c5e84e0368 100644
--- a/modules/rtp_rtcp/source/rtcp_receiver.h
+++ b/modules/rtp_rtcp/source/rtcp_receiver.h
@@ -117,6 +117,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_impl2.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
index e552033d0a..77b38cb463 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
@@ -529,6 +529,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 d603c454f5..d36280b29f 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl2.h
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl2.h
@@ -197,6 +197,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 5d5b44274e..5583c15e37 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_interface.h
+++ b/modules/rtp_rtcp/source/rtp_rtcp_interface.h
@@ -398,6 +398,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