Commit graph

179 commits

Author SHA1 Message Date
Philipp Hancke
8602f604e0 Reland "rtp sender: don't send BYE on deactivating streams"
This is a reland of commit a22c2a0c58
after systems depending on this have been fixed.

Original change's description:
> rtp sender: don't send BYE on deactivating streams
>
> as this breaks RTCP assumptions about SSRCs being no longer
> active as defined in
>   https://www.rfc-editor.org/rfc/rfc3550#section-6.6
>
> This should not be sent in reaction to temporarily disabling
> a stream via RTCRtpParameters.active as this does not mean that
> the participant is leaving the session as defined in
>   https://www.rfc-editor.org/rfc/rfc3550#section-6.3.7
> and does not indicate end of participation as defined in
>   https://www.rfc-editor.org/rfc/rfc3550#section-6.1
> which stipulates BYE should be the last packet sent from this SSRC.
>
> BUG=webrtc:11082
>
> Change-Id: Ia5144857f85303643146b0759184f0f3f50b66e4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273348
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#38059}

Bug: webrtc:11082
Change-Id: Iad8b503b3101d1e684a4da2d1547b879e77b85dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293861
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40716}
2023-09-07 13:25:25 +00:00
Danil Chapovalov
24e704f148 Cleanup calculating time between RTCP reports
Move that calculation into dedicated function, move comment why it is calculated the way it is into the same function.
Cleanup that comment - remove parts unused by current code, in particular remove description of code that was deleted a while ago
Use more strict types for the calculation to make it clearer.
Replace DCHECK result can't be zero with a clamp to ensure it can't be zero, because with large bitrates it may.

Reland of https://webrtc-review.googlesource.com/c/src/+/315143

Bug: None
Change-Id: I41ce383a2f19d489e4cae0b1bf1f720e0ffdd17a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315460
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40538}
2023-08-10 20:40:15 +00:00
Danil Chapovalov
3b75c39d59 Revert "Cleanup calculating time between RTCP reports"
This reverts commit 762f193ca4.

Reason for revert: breaks downstream test

Original change's description:
> Cleanup calculating time between RTCP reports
>
> Move that calculation into dedicated function, move comment why it is calculated the way it is into the same function.
> Cleanup that comment - remove parts unused by current code, in particular remove description of code that was deleted a while ago
> Use more strict types for the calculation to make it clearer.
> Replace DCHECK result can't be zero with a clamp to ensure it can't be zero, because with large bitrates it may.
>
> Bug: None
> Change-Id: Ie8c6b9720095cd1cc3f9814b9df16700119337c5
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315143
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40529}

Bug: None
Change-Id: I8c83013523120a84f236e8efa0d122363e7a228b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315381
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40535}
2023-08-10 14:18:52 +00:00
Danil Chapovalov
762f193ca4 Cleanup calculating time between RTCP reports
Move that calculation into dedicated function, move comment why it is calculated the way it is into the same function.
Cleanup that comment - remove parts unused by current code, in particular remove description of code that was deleted a while ago
Use more strict types for the calculation to make it clearer.
Replace DCHECK result can't be zero with a clamp to ensure it can't be zero, because with large bitrates it may.

Bug: None
Change-Id: Ie8c6b9720095cd1cc3f9814b9df16700119337c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315143
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40529}
2023-08-09 09:14:41 +00:00
Danil Chapovalov
630c40d716 Update RtpSenderVideo::SendVideo/SendEncodedImage to take Timestamp/TimeDelta types
Bug: webrtc:13757
Change-Id: I2f21b14ecf003c5cb0c4c92d0c6b9b6f11c35f71
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311945
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40450}
2023-07-21 10:36:49 +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
Per K
40a0fa95c8 Add new padding mode to RtpPacketHistory
Instead of using most recent, or most "valuable" packets for padding, use most recent large packet.
The large packet for padding is not culled when acked by the receiver.
The most recent large packet is kept where  payload size + 100bytes > currently stored.

Bug: webrtc:15201
Change-Id: I510735b757f99460c477b575061963d2b69016e4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306521
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Erik Språng <sprang@google.com>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40146}
2023-05-25 15:26:40 +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
53817b8c18 Delete legacy RtpRtcpInterface::RTT
Bug: webrtc:13757
Change-Id: Ibc39814e4a3b01425753fbcde61006a15430a6ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304820
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40042}
2023-05-10 16:04:25 +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
edb9cf3de0 Cleanup ReportBlockData accessors
Remove deprecated accessors returning time as raw int
Add setters for all fields to simplify usage of this class in tests
Remove unused min/max RTT fields

Bug: webrtc:13757
Change-Id: Ia8966975c15b9a930f54b4db0fc75f7002dcffe1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304461
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40013}
2023-05-08 16:46:40 +00:00
Markus Handell
cb838e2c4e Move packets into RtpRtcpInterface and RtpSenderEgress.
This CL prepares for send packet batching support in later CLs.

Bug: chromium:1439830
Change-Id: I0bbecfa895aa6d4317ef8049b3789272a440d032
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304282
Auto-Submit: Markus Handell <handellm@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40009}
2023-05-08 12:39:54 +00:00
Danil Chapovalov
7bb9322e9e Drop RtpRtcp unittest dependency on global field trial string
FieldTrialBasedConfig reads config from the global field trial string
ScopedKeyValueConfig adjust the global field trial string
test::ExplicitKeyValueConfig doesnt touch the global field trial string

Bug: webrtc:11926
Change-Id: I8883634fdc7e1bdb63eec9bf38114a3031103839
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299062
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39683}
2023-03-27 09:53:19 +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
9f397217e1 Delete RtpRtcpInterface::RemoteNtp as redundant to GetSenderReportStats
Bug: None
Change-Id: I8d5ed723ce29231f805e6819156a16ba275f8e3f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295321
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39415}
2023-02-28 13:55:27 +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
Mirko Bonadei
861357dce7 Remove log, the function is already deprecated.
Bug: None
Change-Id: I59375bd60910b44d44328d652713997d38c208a6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290562
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39005}
2023-01-04 21:43:43 +00:00
Harald Alvestrand
f6777a4997 Delete unused rtp_rtcp method "SetCsrcs"
The CSRC concept is really a frame level concept.
Setting it per sender is a quick hack, and should be minimized.
This function doesn't seem to be used anywhere, so removing it
lessens the chance of confusion.

Bug: webrtc:7135
Change-Id: Ia3c27b5984b153e68bc51d93b03f08f7f867adc0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/286426
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#38822}
2022-12-06 11:10:48 +00:00
Philipp Hancke
03e6cccc28 Revert "rtp sender: don't send BYE on deactivating streams"
This reverts commit a22c2a0c58.

Reason for revert: breaks upstream project

Original change's description:
> rtp sender: don't send BYE on deactivating streams
>
> as this breaks RTCP assumptions about SSRCs being no longer
> active as defined in
>   https://www.rfc-editor.org/rfc/rfc3550#section-6.6
>
> This should not be sent in reaction to temporarily disabling
> a stream via RTCRtpParameters.active as this does not mean that
> the participant is leaving the session as defined in
>   https://www.rfc-editor.org/rfc/rfc3550#section-6.3.7
> and does not indicate end of participation as defined in
>   https://www.rfc-editor.org/rfc/rfc3550#section-6.1
> which stipulates BYE should be the last packet sent from this SSRC.
>
> BUG=webrtc:11082
>
> Change-Id: Ia5144857f85303643146b0759184f0f3f50b66e4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273348
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#38059}

Bug: webrtc:11082
Change-Id: Iaaff0c0d7bb857fe9ce78ebcc716f3c6f1bc5c4a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275640
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#38097}
2022-09-16 09:40:18 +00:00
Philipp Hancke
a22c2a0c58 rtp sender: don't send BYE on deactivating streams
as this breaks RTCP assumptions about SSRCs being no longer
active as defined in
  https://www.rfc-editor.org/rfc/rfc3550#section-6.6

This should not be sent in reaction to temporarily disabling
a stream via RTCRtpParameters.active as this does not mean that
the participant is leaving the session as defined in
  https://www.rfc-editor.org/rfc/rfc3550#section-6.3.7
and does not indicate end of participation as defined in
  https://www.rfc-editor.org/rfc/rfc3550#section-6.1
which stipulates BYE should be the last packet sent from this SSRC.

BUG=webrtc:11082

Change-Id: Ia5144857f85303643146b0759184f0f3f50b66e4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273348
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#38059}
2022-09-12 10:22:27 +00:00
Erik Språng
5045949490 Add ability to abort retransmissions.
In some upcoming use cases we might wish to flush pending
retransmissions from the pacer queue. In order to not make those packets
forever inaccessible this CL adds a way to clear their "pending" status
from the packet history.

Bug: webrtc:11340
Change-Id: I9aac44125899a7f1e5a5e5be3390ac07b1e661ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274600
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38037}
2022-09-08 16:34:40 +00:00
Niels Möller
cb99ccd244 Update/delete old TODOs
Bug: webrtc:10198
Change-Id: I0341e068d792bc0b143db86e675988f4cd07ff2e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267822
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37454}
2022-07-06 07:49:04 +00:00
Niels Möller
ea8eff3737 Delete rtp_sender_ check in ModuleRtpRtcpImpl::SetSendingMediaStatus
Bug: webrtc:10198
Change-Id: Ic40cd702717665a70f5aac0833963d467ea71dd0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267845
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37452}
2022-07-06 06:07:43 +00:00
Danil Chapovalov
ed665521e4 in RtpRtcp configuration delete unused remote bitrate estimator
No code sets that configuration field.

Bug: None
Change-Id: Idd611d15ec54b3bd9115eac77d2222b97620d675
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267180
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37382}
2022-06-30 14:07:49 +00:00
Danil Chapovalov
7769dc87d7 Detach legacy RtpRtcp from Module interface
Bug: webrtc:7219
Change-Id: I5faf8f68b043994a86d227926c13b07d0141f382
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267063
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37353}
2022-06-28 11:17:43 +00:00
Niels Möller
bc6101459f Delete RtpRtcpInterface::SetRid.
This setter method is replaced by a construction-time config setting.

Bug: None
Change-Id: I1a685e9b4065762b30698231c7f4d9c567459e29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264446
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37148}
2022-06-08 09:18:01 +00:00
Ali Tofigh
d14e8894fc Adopt absl::string_view in modules/rtp_rtcp
Bug: webrtc:13579
Change-Id: Ic4e1431bedc69492358cb2e3749b50a941306f44
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262250
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36887}
2022-05-13 15:01:18 +00:00
Danil Chapovalov
a2ee9234b4 Migrate to Timestamp and TimeDelta types in RtpPacketHistory
Bug: webrtc:13757
Change-Id: Ie542fca50b97fe9dc450e45da40f05e2b66c7da5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252981
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36132}
2022-03-04 15:02:58 +00:00
Danil Chapovalov
723b35f6f0 Delete legacy function to deregister rtp header extension by type
Bug: None
Change-Id: I1d9447df41edf109665a5c746a6dc2c912aad8a7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234526
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35179}
2021-10-11 15:42:19 +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
Erik Språng
54abf984cc Remove the now unused non-deferred sequencing code path.
The config flag will be removed once downstream usage is gone.

Bug: webrtc:11340
Change-Id: Iee8816660009211540d9b09bb3cba514455d709b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228431
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34757}
2021-08-13 17:17:49 +00:00
Erik Språng
b6bbdeb24d Allow RTP module thread checking to know PacketRouter status.
Since https://webrtc-review.googlesource.com/c/src/+/228433 both audio
and video now only call Get/SetRtpState while not registered to the
packet router.

We can thus remove the lock around packet sequencer and just use a
thread checker.

Bug: webrtc:11340
Change-Id: Ie6865cc96c36208700c31a75747ff4dd992ce68d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228435
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34755}
2021-08-13 15:04:49 +00:00
Erik Språng
5f1d406cc9 Move legacy RtpRtcpModule to deferred sequencing.
Bug: webrtc:11340
Change-Id: I45ba6c37fe7fec8de756dee1eb914aceebbeae93
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228437
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34734}
2021-08-12 10:22:59 +00:00
Artem Titov
913cfa76ec Use backticks not vertical bars to denote variables in comments for /modules/rtp_rtcp
Bug: webrtc:12338
Change-Id: I52eb3b6675c4705e22f51b70799ed6139a3b46bc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227164
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34686}
2021-08-09 15:51:03 +00:00
Erik Språng
51e30837d5 Fix potential race in PacketSequencer.
The race can happen when an encoder thread is packetizing a video frame
and is calling RTPSender::AssignSequenceNumber() while the RtpRtcp
module is calling GeneratePadding() and querying
PacketSequencer::CanSendPaddingOnMediaSsrc().

The solution for now is to simply not call
PacketSequencer::CanSendPaddingOnMediaSsrc() from the RtpRtcp module,
as that parameter will be ignored anyway - RTPSender will query that
method internally while holding the send lock.

Once deferred sequencing is implemented, the
can_send_padding_on_media_ssrc parameter can be populated safely since
it is then always called on the pacer thread.

Bug: webrtc:11340, webrtc:12470
Change-Id: I9e90808166453d0e29746df89044e1d3bdffa286
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227767
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34655}
2021-08-05 17:10:14 +00:00
Erik Språng
bfcfe034f4 Move ownership of PacketSequencer from RTPSender to RtpRtcp module.
This prepares for deferred sequence numbering, and is (sort of)
extracted from
https://webrtc-review.googlesource.com/c/src/+/208584

Bug: webrtc:11340, webrtc:12470
Change-Id: I2f3695309e1591b9f7a1ee98556f4f0758de7f69
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227352
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34643}
2021-08-04 13:44:51 +00:00
Markus Handell
c6b9ac782a RTCPSender: migrate to Timestamp.
This change migrates RTCPSender to use webrtc::Timestamp, preparing
for later improvements regarding bugs.webrtc.org/11581.

Fixed: webrtc:12873
Change-Id: I1159701dc373883367d9b2c86823f8fb59904d55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222324
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34346}
2021-06-21 22:26:34 +00:00
Markus Handell
2e3edc1da9 RTCPSender: migrate to own configuration struct.
The class depends on RtcRtcpInterface::Configuration which adds an
unneeded dependency, and inhibits well-manored changes to the
constructor interface.

Fix this so that RTCPSender uses it's own configuration struct which
can be extended in future CLs.

Also add a legacy constructor while downstream dependencies are
updated.

Bug: webrtc:11581
Change-Id: I8d166ab8253b27c08fcbe6aa7c7adde92688b7dc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222322
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34343}
2021-06-21 20:23:01 +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
Tomas Gunnarsson
dbcf5d3918 Change return type of SetSendingStatus to be void.
The eventual implementation of changing the status will be async so the
return value isn't that useful and was in fact only being used to log
a warning if an error occured.

This change is to facilitate upcoming changes related to media engine.

Bug: webrtc:11993
Change-Id: Ia7f85a9ea18b2648b511fa356918cf32a201461f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215975
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33825}
2021-04-25 15:27:38 +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
bc1c93dc6e Add remote-outbound stats for audio streams
Add missing members needed to surface `RTCRemoteOutboundRtpStreamStats`
via `ChannelReceive::GetRTCPStatistics()` - i.e., audio streams.

`GetSenderReportStats()` is added to both `ModuleRtpRtcpImpl` and
`ModuleRtpRtcpImpl2` and used by `ChannelReceive::GetRTCPStatistics()`.

Bug: webrtc:12529
Change-Id: Ia8f5dfe2e4cfc43e3ddd28f2f1149f5c00f9269d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211041
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33452}
2021-03-12 20:39:50 +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
Alessio Bazzica
79011ef4a7 Remove ModuleRtpRtcpImpl2::LastReceivedNTP
`LastReceivedNTP()` does not need to be part of the public members of
`ModuleRtpRtcpImpl` and `ModuleRtpRtcpImpl2` since it is used only
once in the same class.

This change is requried by the child CL [1] which adds a public getter
needed to add remote-outbound stats.

[1] https://webrtc-review.googlesource.com/c/src/+/211041

Bug: webrtc:12529
Change-Id: I82cfea5ee795de37fffa3d759ce9f581ca775d55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211043
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33420}
2021-03-10 15:11:38 +00:00
Danil Chapovalov
067b050213 Delete deprecated unused functions from RtpRtcp interface
Bug: None
Change-Id: Iceb59d726c328974c3ccbf52a782ac9e25bd57c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205581
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33278}
2021-02-16 10:23:41 +00:00
Danil Chapovalov
884118dad1 Delete unused functions in ModuleRtpRtcpImpl
Bug: None
Change-Id: Ia475afed123abaf32df6f1f1a546f5704e2d464f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201421
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32985}
2021-01-14 19:24:37 +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