Commit graph

57 commits

Author SHA1 Message Date
Philipp Hancke
c14a2cb9cc Add nonstandard x-google-per-layer-pli fmtp for enabling per-layer keyFrames in response to PLIs
which needs to be added to the remote codecs a=fmtp:

This also forces SimulcastCastEncoderAdapter to avoid issues with codecs that have native simulcast capability but do require synchronized keyframes.

This parameter allows for large-scale experimentation and A/B testing
whether the new behavior has advantages. It is to be considered
transitional and may be removed again in the future.

BUG=webrtc:10107

Change-Id: I81f496c987b2fed7ff3089efb746e7e89e89c033
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333560
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41805}
2024-05-03 10:59:22 -04:00
Danil Chapovalov
aa8faa6423 Update RtcpReceiver to use Timesetamp/TimeDelta types instead of raw ints
Bug: webrtc:13757
Change-Id: Ie0317a584406bec3c34403a7bc8059e4272b339f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311674
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40429}
2023-07-13 12:08:10 +00:00
Danil Chapovalov
4d2a219436 Change RTCPReceiver::GetAndResetXrRrRtt to return TimeDelta
Bug: webrtc:13757
Change-Id: Iaf3a540fbab51990fb6b983912e3b8c1bb1aaa81
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308940
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40302}
2023-06-16 17:09:00 +00:00
Danil Chapovalov
e641a970ef In RtcpReceiver remove redundand way to represent RTCP report blocks
Pass ReportBlockData instead of RTCPReportBlock from RtcpReceiver to RtpRtcp module

Bug: None
Change-Id: Ia042bfc626dda532674e070c593db7a04e76254a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306220
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40167}
2023-05-28 15:24:46 +00:00
Danil Chapovalov
434deda6fa Cleanup RtcpReceiver from using RtcpBandwidthObser callback interface
All known users were updated to NetworkLinkRtcpObserver interface instead

Bug: webrtc:13757
Change-Id: I1f2a7be0c9192890b38a811a739ddd666b0985f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306161
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40113}
2023-05-23 08:18:01 +00:00
Danil Chapovalov
718601a1f8 Cleanup RtcpReceiver from passing TransportFeedback via older interface
Bug: webrtc:8239
Change-Id: Ibc289627cc89bda86f3e2c7c0c11d0ec2ae95087
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305783
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40102}
2023-05-22 10:14:04 +00:00
Danil Chapovalov
71f80c0bd6 Replace RtcpReceiver::RTT function with RtcpReceiver::AverageRtt with cleaner interface
Bug: webrtc:13757
Change-Id: I4320c72628444b88e36ef162cfb34346fcdd967b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304860
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40053}
2023-05-12 11:03:55 +00:00
Danil Chapovalov
52518633fb In RtcpReceiver implement calling NetworkLinkRtcpObserver interface
With intent to fully replace RtcpBandwidthObserver interface
and half of the TransportFeedbackObserver interface

RtcpBandwidthObserver interfaces passed bitrate and time variables as
raw ints, NetworkLinkRtcpObserver uses more expressive types.

Bug: webrtc:13757, webrtc:8239
Change-Id: I0a8c8de626fbe0c190a0a1a9f6733d863494401c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304700
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40043}
2023-05-10 18:58:31 +00:00
Danil Chapovalov
8095d02884 Add RtpRtcpInterface::LastRtt function to replace RtpRtcpInterface::RTT
RtpRtcpInterface::RTT follows discouraged style of using return values,
uses raw integers to represent time delta,
and returns values that no code uses (min, max, average RTT)

added LastRtt function addresses all these stylistic issues.

Bug: webrtc:13757
Change-Id: Iaf947dd1b7139026f2beb991e69634c606c6b608
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304520
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40028}
2023-05-09 14:54:50 +00:00
Danil Chapovalov
6a0997de01 Skip calling rtcp callback on packets containing invalid rtcp message
Low-Coverage-Reason: added code handles invalid rtcp packet scenarios which are covered by rtcp_receiver_fuzzer
Bug: webrtc:5260
Change-Id: Ia6ba0b736f5732fa6516edb2a5ed1b96079eb4ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296580
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39503}
2023-03-08 14:19:54 +00:00
Danil Chapovalov
0f43da2248 Cleanup RtcpReceiver::NTP function
Replace it with GetSenderReportStats that returns result instead of
filling lots of output parameters
On the way replace pair of uint32_t with dedicated NtpTime type

Bug: None
Change-Id: I5b821b8d000d63ebd8cdc1b9897a86429d97b19b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295560
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39431}
2023-03-01 10:44:29 +00:00
Danil Chapovalov
e1137d7201 Delete deprecated variant of IncomingRtcpPacket function
Bug: webrtc:14870
Change-Id: Ifc7a5f7d19d5555c8bbcba27ba08c019ca65b5c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292840
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39284}
2023-02-09 14:36:48 +00:00
Harald Alvestrand
1f206b841e Use ArrayView in the IncomingRtcpPacket function.
The lowest level and some of the highest levels of this function are
already using ArrayView. Make this consistent throughout.
Use deprecation for the old API rather than deleting it, since upstream
may be using it.

Bug: webrtc:14870
Change-Id: If5e1a6e9802ecf7e8e3ec27befb5167ca9985517
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291706
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39241}
2023-02-01 12:19:03 +00:00
Tommi
8814dfd124 Remove RTCPReceiver::main_ssrc_.
RTCPReceiver::main_ssrc_ and local_media_ssrc() represent the same
value but could get out of sync when `set_media_ssrc()` was called.

Instead of using main_ssrc_, just use the local_media_ssrc() accessor.

Bug: webrtc:11993
Change-Id: I2b034287e6b6025d9b0d2affa391a168896a614b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262663
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36905}
2022-05-17 09:28:54 +00:00
Ivo Creusen
2562cf0105 Reland "Wire up non-sender RTT for audio, and implement related standardized stats."
This reverts commit 2c41cbae37.

Reason for revert: The breaking test in Chromium has been temporarily disabled in https://chromium-review.googlesource.com/c/chromium/src/+/3139794/2.

Original change's description:
> Revert "Wire up non-sender RTT for audio, and implement related standardized stats."
>
> This reverts commit fb0dca6c05.
>
> Reason for revert: Speculative revert due to failing stats test in chromium. Possibly because the chromium test expected the metrics to not be supported, and now they are. Reverting just to unblock the webrtc roll into chromium.
>
> Original change's description:
> > Wire up non-sender RTT for audio, and implement related standardized stats.
> >
> > The implemented stats are:
> > - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptime
> > - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-totalroundtriptime
> > - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptimemeasurements
> >
> > Bug: webrtc:12951, webrtc:12714
> > Change-Id: Ia362d5c4b0456140e32da79d40edc06ab9ce2a2c
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226956
> > Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#34861}
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> TBR=hta,hbos,minyue
>
> Bug: webrtc:12951, webrtc:12714
> Change-Id: If07ad63286eea9cdde88271e61cc28f4b268b290
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231001
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Olga Sharonova <olka@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34897}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:12951, webrtc:12714
Change-Id: I786b06933d85bdffc5e879bf52436bb3469b7f3a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231181
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34930}
2021-09-06 14:26:55 +00:00
Björn Terelius
2c41cbae37 Revert "Wire up non-sender RTT for audio, and implement related standardized stats."
This reverts commit fb0dca6c05.

Reason for revert: Speculative revert due to failing stats test in chromium. Possibly because the chromium test expected the metrics to not be supported, and now they are. Reverting just to unblock the webrtc roll into chromium.

Original change's description:
> Wire up non-sender RTT for audio, and implement related standardized stats.
>
> The implemented stats are:
> - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptime
> - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-totalroundtriptime
> - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptimemeasurements
>
> Bug: webrtc:12951, webrtc:12714
> Change-Id: Ia362d5c4b0456140e32da79d40edc06ab9ce2a2c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226956
> Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34861}

# Not skipping CQ checks because original CL landed > 1 day ago.

TBR=hta,hbos,minyue

Bug: webrtc:12951, webrtc:12714
Change-Id: If07ad63286eea9cdde88271e61cc28f4b268b290
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231001
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Olga Sharonova <olka@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34897}
2021-09-01 17:32:00 +00:00
Ivo Creusen
fb0dca6c05 Wire up non-sender RTT for audio, and implement related standardized stats.
The implemented stats are:
- https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptime
- https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-totalroundtriptime
- https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptimemeasurements

Bug: webrtc:12951, webrtc:12714
Change-Id: Ia362d5c4b0456140e32da79d40edc06ab9ce2a2c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226956
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34861}
2021-08-30 09:03:50 +00:00
Ivo Creusen
8c40d510c8 Make it possible to enable/disable receive-side RTT with a setter.
This will allow us to enable receive-side RTT without having to recreate all AudioReceiveStream objects.

Bug: webrtc:12951
Change-Id: I1227297ec4ebeea9ba15fe2ed904349829b2e669
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225262
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34464}
2021-07-13 14:15:46 +00:00
Victor Boivie
f715618eee Use flat_map in RTCPReceiver
RTCPReceiver initially used a std::map, which made
RTCPReceiver::IncomingPacket's use of std::map represent ~0.45% CPU in
highly loaded media servers. Using std::unordered_map in change 216321
reduced it only slightly, to 0.39%.

This is the second attempt to reduce it even further. By using a
flat_map and taking advantage of the increased cache locality, the hope
is that it will be reduced. These maps generally have low cardinality
(indexed by SSRC), and are looked up often, but modified less often,
which make them a potential candidate for flat_map.

Bug: webrtc:12689
Change-Id: I6733ccf3484d1c54e661250fb6712971b80fa2a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225203
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34432}
2021-07-07 13:43:59 +00:00
Danil Chapovalov
510c94cbfb Return one report block per media ssrc, ignoring sender ssrc.
Webrtc designed to work for point-to-point topology, and thus
each rtcp_receiver handles single remote sender.

While remote sender ssrc may change, it should be ok to assume
the remote endpoint is still the same.

Bug: webrtc:12798
Change-Id: I62aebe7ac802306fc7fa17d7bf3959d6d4cca023
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/224548
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34407}
2021-07-02 14:37:16 +00:00
Tommi
08be9baaa3 Don't recreate the audio receive stream when updating the local_ssrc.
Bug: webrtc:11993
Change-Id: Ic5d8a8a8b7c12fb1d906e0b3cbdf657fd9e8eafc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222042
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34299}
2021-06-16 10:03:31 +00:00
Danil Chapovalov
f01c2c96f2 Delete RtcpStatisticsCallback in favor of ReportBlockDataObserver
Bug: webrtc:10678
Change-Id: Ie016cbc47dbba15176fc5e7ad7d01a438db7dfb3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218842
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34013}
2021-05-16 15:09:29 +00:00
Stephan Hartmann
269467210d libstdc++: fix incomplete type in rtcp_receiver
libstdc++ does not allow incomplete type for T2 with std::pair<T1,T2>,
which is used by std::unordered_map. Include full definition of
TmmbrInformation, RrtrInformation and LastFirStatus.

Bug: chromium:957519
Change-Id: I00cad6d5e5a782791f5f64b4e38d7738b2c5ae87
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217180
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33897}
2021-05-03 12:35:54 +00:00
Victor Boivie
0c563a42ec Use unordered_map in RTCPReceiver
In highly loaded media servers, RTCPReceiver's use of std::map
attributes to ~0.5% CPU. It's mostly ::find and the [] operator, and
they are all keyed by SSRC, which is an unordered data type. This makes
these maps suitable as unordered maps, as they have constant time
complexity for lookups.

Bug: webrtc:12689
Change-Id: I7b305e233fcbed0e452632946ab0de5ee66f8dda
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216321
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33850}
2021-04-27 14:54:59 +00:00
Victor Boivie
306b1393cb Optimize set of registered SSRCs in RTCPReceiver
In highly loaded media servers, RTCPReceiver's use of std::set
attributes to ~0.87% CPU. It's mostly ::find and the [] operator and the
assignment operator.

 * Removed locking of a mutex in `TriggerCallbacksFromRtcpPacket``
   as it copied members that were already const.
 * Switched the use of std::set for the list of registered local SSRCs
   to an absl::InlinedVector, as the set is very small and it's not
   expected that any more complicated container would be faster than a
   linear search within a cache line.

Bug: webrtc:12689
Change-Id: I734578c22eeca2d9ba89fef77ecc689b72624567
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216322
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33849}
2021-04-27 14:05:46 +00:00
Danil Chapovalov
ab63350411 Delete RtpRtcp::RemoteRTCPStat in favor of GetLatestReportBlockData
Bug: webrtc:10678
Change-Id: I1cff0230208e22f56f26cf2eba976f66d9b5bafc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212020
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33479}
2021-03-16 10:31:35 +00:00
Alessio Bazzica
048adc7136 Add missing remote-outbound stats to RTCPReceiver::NTP
In order to add `RTCRemoteOutboundRtpStreamStats` (see [1]), the
following stats must be added:
- sender's packet count (see [2])
- sender's octet count (see [2])
- total number of RTCP SR blocks sent (see [3])

[1] https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats
[2] https://tools.ietf.org/html/rfc3550#section-6.4.1
[3] https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-reportssent

Bug: webrtc:12529
Change-Id: I47ac2f79ba53631965d1cd7c1062f3d0f158d66e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/210963
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33423}
2021-03-10 16:36:48 +00:00
Danil Chapovalov
3562318bde Delete unused functions in RtpSender, RtcpSender and RtcpReceiver
These functions are not longer used by the RtpRtcp implementations.

Bug: None
Change-Id: Ibc36433b253b264de4cdcdf380f5ec1df201b17a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207862
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33282}
2021-02-16 14:16:22 +00:00
Niels Möller
be810cba19 Delete SetRtcpXrRrtrStatus, make it a construction-time setting
Bug: None
Change-Id: If2c42af6038c2ce1dc4289b949a0a3a279bae1b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195337
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32754}
2020-12-03 10:01:01 +00:00
Markus Handell
e7c015e112 Migrate modules/rtp_rtcp to webrtc::Mutex.
Bug: webrtc:11567
Change-Id: I4c71f3a28ef875af2c232b1b553840d6e21649d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178804
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31645}
2020-07-07 12:13:47 +00:00
Tomas Gunnarsson
ba0ba71e93 Add 1 sec timer to ModuleRtpRtcpImpl2 instead of frequent polling.
This reduces the number of times we grab a few locks down from
somewhere upwards of around a thousand time a second to a few times.

* Update the RTT value on the worker thread and fire callbacks.
* Trigger NotifyTmmbrUpdated() calls from the worker.
* Update the tests to use a GlobalSimulatedTimeController.

Change-Id: Ib81582494066b9460ae0aa84271f32311f30fbce
Bug: webrtc:11581
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177664
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31602}
2020-07-01 11:24:31 +00:00
Tomas Gunnarsson
f25761d798 Remove dependency from RtpRtcp on the Module interface.
The 'Module' part of the implementation must not be
called via the RtpRtcp interface, but is rather a part of
the contract with ProcessThread. That in turn is an
implementation detail for how timers are currently implemented
in the default implementation.

Along the way I'm deprecating away the factory function which
was inside the interface and tied it to one specific implementation.
Instead, I'm moving that to the implementation itself and down the
line, we don't have to go through it if we just want to create an
instance of the class.

The key change is in rtp_rtcp.h and the new rtp_rtcp_interface.h
header file (things moved from rtp_rtcp.h), the rest falls from that.

Change-Id: I294f13e947b9e3e4e649400ee94a11a81e8071ce
Bug: webrtc:11581
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176419
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31440}
2020-06-04 08:11:21 +00:00
Danil Chapovalov
bd74d5ca6b Pass callbacks for RtcpReceiver at construction
Bug: webrtc:10680
Change-Id: Ic242008e63a5a86ac30ab5f4041a30dbdb7fc72b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170236
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30773}
2020-03-12 10:26:17 +00:00
Danil Chapovalov
443f26695f Cleanup RtcpReceiver tests
update MOCK_METHODs to use new syntax recommended in go/totw/164
Replace fixture with struct of mocks.
Use main method under test (IncomingPacket) directly rather than through fixture helpers

minor cleanup of the RtcReceiver itself:
make IncomingPacket function more friendly to containers,
mark class as final to verify ability to inherit from it is not used and
thus destructor doesn't need to be virtual.

Bug: None
Change-Id: I346e7dc513b1fbe663ebe5858dec7df0520416a7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170226
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30765}
2020-03-11 15:15:14 +00:00
Erik Språng
6841d25d45 Reland "RtpRtcp modules and below: Make media, RTX and FEC SSRCs const"
This is a reland of 17608dc459

Downstream test now fixed.
As a precaution, also avoid DCHECKS for non-zero SSRC.
First patch set is reland, second makes checks more lenient.

Original change's description:
> RtpRtcp modules and below: Make media, RTX and FEC SSRCs const
>
> Downstream usage of SetSsrc() / SetRtxSsrc() should now be gone. Let's
> remove them, make the members const, and remove now unnecessary locking.
>
> Bug: webrtc:10774
> Change-Id: Ie4c1b3935508cf329c5553030f740c565d32e04b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155660
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29475}

Bug: webrtc:10774
Change-Id: I540b49a31a31e98d87f02ae04083d5206e71c1b2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157100
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29491}
2019-10-15 14:03:19 +00:00
Erik Språng
e8a6bc3f25 Revert "Reland "RtpRtcp modules and below: Make media, RTX and FEC SSRCs const""
This reverts commit c9348218cf.

Reason for revert: Downstream tests are relying on incorrect behavior which this CL explicitly checks...

Original change's description:
> Reland "RtpRtcp modules and below: Make media, RTX and FEC SSRCs const"
> 
> This is a reland of 17608dc459
> 
> Downstream fixed, relanding.
> 
> Original change's description:
> > RtpRtcp modules and below: Make media, RTX and FEC SSRCs const
> >
> > Downstream usage of SetSsrc() / SetRtxSsrc() should now be gone. Let's
> > remove them, make the members const, and remove now unnecessary locking.
> >
> > Bug: webrtc:10774
> > Change-Id: Ie4c1b3935508cf329c5553030f740c565d32e04b
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155660
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#29475}
> 
> TBR=nisse@webrtc.org
> 
> Bug: webrtc:10774
> Change-Id: I759bed3ff1909857696c6d1b13df595a5e552f03
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157049
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29486}

TBR=nisse@webrtc.org,sprang@webrtc.org

Change-Id: I168fb3738a04dfdbd1581ddd8c3276ede9f72322
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10774
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157080
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29488}
2019-10-15 11:54:33 +00:00
Erik Språng
c9348218cf Reland "RtpRtcp modules and below: Make media, RTX and FEC SSRCs const"
This is a reland of 17608dc459

Downstream fixed, relanding.

Original change's description:
> RtpRtcp modules and below: Make media, RTX and FEC SSRCs const
>
> Downstream usage of SetSsrc() / SetRtxSsrc() should now be gone. Let's
> remove them, make the members const, and remove now unnecessary locking.
>
> Bug: webrtc:10774
> Change-Id: Ie4c1b3935508cf329c5553030f740c565d32e04b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155660
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29475}

TBR=nisse@webrtc.org

Bug: webrtc:10774
Change-Id: I759bed3ff1909857696c6d1b13df595a5e552f03
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157049
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29486}
2019-10-15 11:42:05 +00:00
Erik Språng
4ed0b52c12 Revert "RtpRtcp modules and below: Make media, RTX and FEC SSRCs const"
This reverts commit 17608dc459.

Reason for revert: Breaks downstream build

Original change's description:
> RtpRtcp modules and below: Make media, RTX and FEC SSRCs const
> 
> Downstream usage of SetSsrc() / SetRtxSsrc() should now be gone. Let's
> remove them, make the members const, and remove now unnecessary locking.
> 
> Bug: webrtc:10774
> Change-Id: Ie4c1b3935508cf329c5553030f740c565d32e04b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155660
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29475}

TBR=nisse@webrtc.org,sprang@webrtc.org

Change-Id: Idc60f26f34dd0456a40c72375ae829e25b28621f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10774
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157046
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29483}
2019-10-15 09:43:21 +00:00
Erik Språng
17608dc459 RtpRtcp modules and below: Make media, RTX and FEC SSRCs const
Downstream usage of SetSsrc() / SetRtxSsrc() should now be gone. Let's
remove them, make the members const, and remove now unnecessary locking.

Bug: webrtc:10774
Change-Id: Ie4c1b3935508cf329c5553030f740c565d32e04b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155660
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29475}
2019-10-15 07:50:59 +00:00
Niels Möller
4d7c405599 Split out RtcpCnameCallback from RtcpStatisticsCallback
Cname callback is used only on receive side, and statistics (soon)
only on the send side.

Bug: webrtc:10679
Change-Id: I122e9cafaea93cd0ba75dc955a652d9d4bddc379
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147867
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28767}
2019-08-06 08:29:57 +00:00
Sebastian Jansson
e1795f4158 Adds remote estimate RTCP packet.
This adds the RemoteEstimate rtcp packet and wires it up to GoogCC where
it's used to improve congestion controller behavior.

The functionality is negotiated using SDP.

It's added with a field trial that allow disabling the functionality in
case there's any issues.

Bug: webrtc:10742
Change-Id: I1ea8e4216a27cd2b00505c99b42d1e38726256c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146602
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28654}
2019-07-24 10:17:26 +00:00
Mirko Bonadei
3b67672af7 Reland "Pass RtpRtcp::Configuration to RtcpReceiver ctor and initialize ssrcs"
This reverts commit 4d68314ec8.

Reason for revert: The culprit was https://webrtc-review.googlesource.com/c/src/+/133169.

Original change's description:
> Revert "Pass RtpRtcp::Configuration to RtcpReceiver ctor and initialize ssrcs"
> 
> This reverts commit 741b96b175.
> 
> Reason for revert: Speculative revert (some perf test are failing)
> 
> Original change's description:
> > Pass RtpRtcp::Configuration to RtcpReceiver ctor and initialize ssrcs
> > 
> > Bug: webrtc:10774
> > Change-Id: Iaae717ed1b7373d5cb2246e3ba92fc6ace422b41
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145206
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#28536}
> 
> TBR=asapersson@webrtc.org,sprang@webrtc.org
> 
> Change-Id: I877c1e4c025717c3392bce96ef31591dc1ef5f0b
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10774
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145325
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28551}

TBR=mbonadei@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org

Change-Id: Ib59a7f716a58ca8082fe69020c56054e21646cdf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10774
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145402
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28564}
2019-07-12 17:35:13 +00:00
Mirko Bonadei
4d68314ec8 Revert "Pass RtpRtcp::Configuration to RtcpReceiver ctor and initialize ssrcs"
This reverts commit 741b96b175.

Reason for revert: Speculative revert (some perf test are failing)

Original change's description:
> Pass RtpRtcp::Configuration to RtcpReceiver ctor and initialize ssrcs
> 
> Bug: webrtc:10774
> Change-Id: Iaae717ed1b7373d5cb2246e3ba92fc6ace422b41
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145206
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28536}

TBR=asapersson@webrtc.org,sprang@webrtc.org

Change-Id: I877c1e4c025717c3392bce96ef31591dc1ef5f0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10774
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145325
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28551}
2019-07-12 08:36:48 +00:00
Erik Språng
741b96b175 Pass RtpRtcp::Configuration to RtcpReceiver ctor and initialize ssrcs
Bug: webrtc:10774
Change-Id: Iaae717ed1b7373d5cb2246e3ba92fc6ace422b41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145206
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28536}
2019-07-11 12:39:17 +00:00
Henrik Boström
f204787478 ReportBlockData and observer added, for stats collection in future CLs.
The ReportBlockData contains information about a ReportBlock and
additional data such as RTT. This will be used for the calculation of
RTCRemoteInboundRtpStreamStats, see full picture here:
https://webrtc-review.googlesource.com/c/src/+/134107

ReportBlockData is a class version of the previously internal struct
RTCPReceiver::ReportBlockWithRtt.
- The new name makes sense even if we add more info to it, which will
  be needed for future metrics.
- The new location is modules/rtp_rtcp/include/report_block_data.h.

The RTCPReceiver allows obtaining the ReportBlockData in two ways:
1. Using a ReportBlockDataObserver that is notified on receiving a
   report block.
2. Using the GetLatestReportBlockData().

Both codepaths will be needed; video stats uses observers and audio
stats uses polling.

Further plumbing will be done in follow-up CLs.

Bug: webrtc:10455, webrtc:10456
Change-Id: Ic9e5b4f451b5f4b203efcd6fa3bbf9736487e1f4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/136584
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27961}
2019-05-16 12:12:07 +00:00
Elad Alon
0a8562e276 Forward LossNotification from RTCPReceiver to EncoderRtcpFeedback
TBR=sprang@webrtc.org

Bug: webrtc:10501
Change-Id: I09a571a65ba8515b027ee32d1f46e5cc7f699704
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131325
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27513}
2019-04-09 11:13:39 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Niels Möller
53382cb19f Move RtcpStatistics from common_types.h to a new header file
New location is modules/rtp_rtcp/include/rtcp_statistics.h.

Bug: webrtc:5876
Change-Id: I85f55b58658588228ed77175226b3479352fd5de
Reviewed-on: https://webrtc-review.googlesource.com/c/111961
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25799}
2018-11-27 13:46:42 +00:00
Jiawei Ou
8b5d9d8650 Remove the audio/video split for the RTCP report intervals.
This is a follow up of a comment in
https://webrtc-review.googlesource.com/c/src/+/110105

It was not very useful to split the audio and video report interval since the RTCP module can only either be audio or video.

The recent it was written that way in https://webrtc-review.googlesource.com/c/src/+/43201/ was because that was a straightforward transition from two global constants to two variable.

Bug: webrtc:8789
Change-Id: I2293de14ba5f363351f379a02022ed5dc7b8d458
Reviewed-on: https://webrtc-review.googlesource.com/c/110824
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jiawei Ou <ouj@fb.com>
Cr-Commit-Position: refs/heads/master@{#25741}
2018-11-22 01:39:41 +00:00
Niels Möller
a12c42a6b2 Delete root header file typedef.h.
Usage replaced with stdint.h, rtc_base/system/arch.h and
rtc_base/system/unused.h, as appropriate.

Bug: webrtc:6854
Change-Id: I97225465d14b969903d92979e2df3c3c05d35f18
Reviewed-on: https://webrtc-review.googlesource.com/90249
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24100}
2018-07-25 14:59:26 +00:00