diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /third_party/libwebrtc/moz-patch-stack/0044.patch | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/moz-patch-stack/0044.patch')
-rw-r--r-- | third_party/libwebrtc/moz-patch-stack/0044.patch | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/third_party/libwebrtc/moz-patch-stack/0044.patch b/third_party/libwebrtc/moz-patch-stack/0044.patch new file mode 100644 index 0000000000..ec7206b4fa --- /dev/null +++ b/third_party/libwebrtc/moz-patch-stack/0044.patch @@ -0,0 +1,73 @@ +From: "Byron Campen [:bwc]" <docfaraday@gmail.com> +Date: Fri, 12 Mar 2021 08:55:00 -0600 +Subject: Bug 1654112 - libwebrtc modification: Surface video RTCP SR stats + again. r=ng + +libwebrtc has stopped surfacing these, and Chromium does not support +these stats at all. + +Differential Revision: https://phabricator.services.mozilla.com/D108674 +Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/edac9d01a9ac7594f4b22708a4690753638ca32c +--- + video/rtp_video_stream_receiver2.cc | 10 ++++++++++ + video/rtp_video_stream_receiver2.h | 6 ++++++ + video/video_receive_stream2.cc | 8 ++++++++ + 3 files changed, 24 insertions(+) + +diff --git a/video/rtp_video_stream_receiver2.cc b/video/rtp_video_stream_receiver2.cc +index 2ea8ce8c62..0a215f79cc 100644 +--- a/video/rtp_video_stream_receiver2.cc ++++ b/video/rtp_video_stream_receiver2.cc +@@ -1066,6 +1066,16 @@ absl::optional<int64_t> RtpVideoStreamReceiver2::LastReceivedKeyframePacketMs() + return absl::nullopt; + } + ++// Mozilla modification: VideoReceiveStream2 and friends do not surface RTCP ++// stats at all, and even on the most recent libwebrtc code there does not ++// seem to be any support for these stats right now. So, we hack this in. ++void RtpVideoStreamReceiver2::RemoteRTCPSenderInfo( ++ uint32_t* packet_count, uint32_t* octet_count, ++ int64_t* ntp_timestamp_ms) const { ++ RTC_DCHECK_RUN_ON(&worker_task_checker_); ++ rtp_rtcp_->RemoteRTCPSenderInfo(packet_count, octet_count, ntp_timestamp_ms); ++} ++ + void RtpVideoStreamReceiver2::ManageFrame( + std::unique_ptr<RtpFrameObject> frame) { + RTC_DCHECK_RUN_ON(&packet_sequence_checker_); +diff --git a/video/rtp_video_stream_receiver2.h b/video/rtp_video_stream_receiver2.h +index 0178355262..be8bce770f 100644 +--- a/video/rtp_video_stream_receiver2.h ++++ b/video/rtp_video_stream_receiver2.h +@@ -207,6 +207,12 @@ class RtpVideoStreamReceiver2 : public LossNotificationSender, + absl::optional<uint32_t> LastReceivedFrameRtpTimestamp() const; + absl::optional<int64_t> LastReceivedKeyframePacketMs() const; + ++ // Mozilla modification: VideoReceiveStream2 and friends do not surface RTCP ++ // stats at all, and even on the most recent libwebrtc code there does not ++ // seem to be any support for these stats right now. So, we hack this in. ++ void RemoteRTCPSenderInfo(uint32_t* packet_count, uint32_t* octet_count, ++ int64_t* ntp_timestamp_ms) const; ++ + private: + // Implements RtpVideoFrameReceiver. + void ManageFrame(std::unique_ptr<RtpFrameObject> frame) override; +diff --git a/video/video_receive_stream2.cc b/video/video_receive_stream2.cc +index 6c1df7d874..f50c3d0775 100644 +--- a/video/video_receive_stream2.cc ++++ b/video/video_receive_stream2.cc +@@ -573,6 +573,14 @@ VideoReceiveStreamInterface::Stats VideoReceiveStream2::GetStats() const { + } + } + } ++ ++ // Mozilla modification: VideoReceiveStream2 and friends do not surface RTCP ++ // stats at all, and even on the most recent libwebrtc code there does not ++ // seem to be any support for these stats right now. So, we hack this in. ++ rtp_video_stream_receiver_.RemoteRTCPSenderInfo( ++ &stats.rtcp_sender_packets_sent, &stats.rtcp_sender_octets_sent, ++ &stats.rtcp_sender_ntp_timestamp_ms); ++ + return stats; + } + |