Add a callback to use StreamStats::rtp_stats as the source of truth.

Before the change RtpSenderEgress::rtp_stats_ and RtpSenderEgress::rtx_rtp_stats_ are updated in RtpSenderEgress and copied in StreamStats::rtp_stats.

After the change StreamStats::rtp_stats is directly used in RtpSenderEgress by using the added StreamDataCountersCallback::GetDataCounters.

An impact of this change is that FEC will now have its own counters.
Before the change FEC was using the RTP counters because of this code:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_egress.cc;l=467-468.

This refactoring is meant to simplify https://webrtc-review.googlesource.com/c/src/+/381100.

Change-Id: I4913e9311fe35d1b2ca1ae0c0945e8e6e4cd7f5d
Bug: webrtc:40644448
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/381241
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44131}
12 files changed
tree: 96e6a7315f67b47474b9be66c6d5ceb040b97d9d
  1. api/
  2. audio/
  3. build_overrides/
  4. call/
  5. common_audio/
  6. common_video/
  7. data/
  8. docs/
  9. examples/
  10. experiments/
  11. g3doc/
  12. infra/
  13. logging/
  14. media/
  15. modules/
  16. net/
  17. p2p/
  18. pc/
  19. resources/
  20. rtc_base/
  21. rtc_tools/
  22. sdk/
  23. stats/
  24. system_wrappers/
  25. test/
  26. tools_webrtc/
  27. video/
  28. .clang-format
  29. .git-blame-ignore-revs
  30. .gitignore
  31. .gn
  32. .mailmap
  33. .rustfmt.toml
  34. .style.yapf
  35. .vpython3
  36. AUTHORS
  37. BUILD.gn
  38. CODE_OF_CONDUCT.md
  39. codereview.settings
  40. DEPS
  41. DIR_METADATA
  42. ENG_REVIEW_OWNERS
  43. LICENSE
  44. license_template.txt
  45. native-api.md
  46. OWNERS
  47. OWNERS_INFRA
  48. PATENTS
  49. PRESUBMIT.py
  50. presubmit_test.py
  51. presubmit_test_mocks.py
  52. pylintrc
  53. pylintrc_old_style
  54. README.chromium
  55. README.md
  56. WATCHLISTS
  57. webrtc.gni
  58. webrtc_lib_link_test.cc
  59. whitespace.txt
README.md

WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.

Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.

The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.

Development

See here for instructions on how to get started developing with the native code.

Authoritative list of directories that contain the native API header files.

More info