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}
CSRCs are decided on a per frame bases, thus keeping a constant copy of
csrcs inside the rtp sender transform delegate is confusing: when transform delegate is created, csrcs list is always empty.
Bug: None
Change-Id: Id94acc76857a47ad9a1dd8254648ab9cb5d6d31d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311840
Reviewed-by: Tony Herre <herre@google.com>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40533}
This change adds a new function to RTPFrameObject to allow setting the
RTPVideoHeader from VideoFrameMetadata.
The setMetadata function in TransformableVideoReceiverFrame disallows
changing anything other than frameID and dependencies.
Change-Id: I74e55ffbe1f426b660c2e243b20358c6a6cc2ffd
Bug: chromium:1464853
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314963
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Palak Agarwal <agpalak@google.com>
Reviewed-by: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#40530}
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}
This CL adds [[deprecated]] to the old signatures, and uses the new
signatures throughout.
Bug: webrtc:14870
Change-Id: Ic9a8198ac0a2f954e1b2e7d05a55dbe04342f958
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314962
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40517}
This CL does 2 things:
- Change the DCHECK for payload_type_frequency to a CHECK (so that
this error will be a crash not a divide-by-zero)
- Change the replay helper that was used by the fuzzer to set the
frequency of the packets to the video value (90K).
Bug: chromium:1466826
Change-Id: I39941f250b1782b36a3bcddfd347a016591466ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312700
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40468}
This extension is documented to carry one bit: Screenshare.
It's been used for carrying simulcast layers and experiment IDs.
This CL removes that usage.
Bug: webrtc:15383
Change-Id: I048b283cde59bf1f607d8abdd53ced07a7add6f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312420
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40457}
This CL cleans up all local conversions, in favor of the common helper
function.
Bug: webrtc:15210
Change-Id: Id77e1c6b1151a2542d92e220e91d5b11285479b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311060
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Jianhui J Dai <jianhui.j.dai@intel.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40420}
Without this, 'Sender' frames inserted into the writer of an encoded
transform have an invalid receive time (0), which breaks all later
heuristics which build on the receive time, eg the VCMTiming estimators
used for controlling the playback delay.
Bug: chromium:1463451
Change-Id: I413c884e08986148d4a854cd275212b21d093ceb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311544
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Palak Agarwal <agpalak@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#40416}
Move the SetRTPTimestamp method from TransformableAudioFrameInterface
to the base class, so that RTPTimestamps can also be modified on encoded
video frames.
Bug: webrtc:14709
Change-Id: I355be527c2be201c9201e04c431394c962237140
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310781
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Palak Agarwal <agpalak@google.com>
Cr-Commit-Position: refs/heads/main@{#40378}
We haven't switched to the std spelling in WebRTC yet.
Change-Id: If21a6ee9ac19be8ce959b3192eb8de044048f157
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310501
Auto-Submit: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40356}
Change implementation of `FinalizeFecHeader` to write the FEC header
for multiple ssrcs according to the updated RFC.
Change-Id: I280964b2e53c3579f348fbd42815c966840375ac
Bug: webrtc:15002
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307601
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40270}
Changed FinalizeFecHeader to recieve a list of `ProtectedStream` struct,
in order to prepare for receiving multiple ssrcs to protect in the same
FEC packet header. Implementation of the multistream case will follow in
next CL.
Change-Id: I697ef9172a07797a6f500b9ec3a9916f8f45bc04
Bug: webrtc:15002
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307620
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40269}
VoipCore still use RtpSenderEgress::NonPacedPacketSender, therefore
packets sent using NonPacedPacketSender::EnqueuePackets are proxied
to the worker thead.
When NonPacedPacketSender is used, the Pacer already guarantee that packets are sent on the worker queue.
Lock is removed from RtpSenderEgress and instead calls must be made on
the worker thread.
Bug: webrtc:15209
Change-Id: Iaf03377ad8a037ecedbbe588a4c1e8e4eadacd81
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306960
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40252}
As per the comment in https://webrtc-review.googlesource.com/c/src/+/303240
on the flexfec_header_reader_writer2.h, renaming this file to flexfec_header_reader_writer.h
and renaming the current implementation to flexfec_03_header_reader_writer.h
as it is based on the 03 draft of the RFC.
Change-Id: I80cb2aba6225ec7cd989a134c3204d1db0ac6f7c
Bug: webrtc:15002
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307600
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40231}
Currently FecController knows about network conditions, these information can be used to control RTX settings in-call.
Change-Id: I8f84164aeac48ea13b7f1cf82fd7424431f98ada
Bug: webrtc:15167
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304800
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40192}
This change changes the flexfec header reader ReadFecHeader function to parse the FEC header according the the updated RFC. The fec_packet argument is expected to have the protected ssrcs list already populated, as they should be retrieved from the RTP header.
Updated and added Reader unittests. Unittests that are relevant for the Writer, were put inside a comment. In the next change set, when the header writer will be updated, we will update the unittests accordingly.
Bug: webrtc:15002
Change-Id: I118303e31c15c356ffeb2c0aafe503cf293bcad6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303260
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40172}
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}
which is the correct term used in
https://www.rfc-editor.org/rfc/rfc3611#section-4.4
BUG=None
Change-Id: Iab5a1de6b69a8495aa9a6f79531053f4f2421c27
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306480
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40143}
Replace Transport* interface with since std::function to stress this class doesn't produce RTP packets
Repesent outgoing packet as ArrayView instead of pointer + length.
Make outgoing transport optional, thus allowing to use RtcpTransciever as an rtcp parser.
Bug: webrtc:8239, webrtc:14870
Change-Id: Ia582d9a980786df8e295adcebe27081258b80dc0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306280
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40134}
StreamDataCounters is used both for send-side and receive side stats,
but last_packet_received_time is only used by receive statistician where
it duplicates another member
Bug: webrtc:13757
Change-Id: Iae6a65aba497e577ee3255e40623362e8c4c8a72
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306183
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40119}
Create a copy of flexfec_header_reader_writer for changing the implementation according to updated RFC. The fork is needed, since the updated RFC is incompatible with flexfec-03.
In the updated RFC, we receive the list and the number of protected ssrcs from the RTP header (from it's CSRCs , and CSRC count fields).
This Change is only a copy of the existing files. This will make it easier to understand the changes to the implementation in the next change sets.
Bug: webrtc:15002
Change-Id: I31bf5eca0d8f3cb23b4caabb477897eeb0ca6d96
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303240
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40103}
which is the maximum allowed in RFC 3550:
The last octet of the padding contains a count of how
many padding octets should be ignored, including itself
SRTP encryption does not need to be taken into account since none of
the cipher suites used by WebRTC require padding:
https://www.rfc-editor.org/rfc/rfc3711#section-3.1https://www.rfc-editor.org/rfc/rfc7714#section-7.2
BUG=webrtc:15182
Change-Id: Ife3d264af389509733699f2dd4d32ba63793e9de
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305642
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40101}
This change replaces ReceivedFecPacket FEC header fields with vectors (for protected ssrcs, sequence numbers and masks), which is needed to support protection of multiple ssrcs in the same FEC packet (as part of the flexfec RFC - https://datatracker.ietf.org/doc/html/rfc8627).
Bug: webrtc:15002
Change-Id: I82c54203fcfec10c760f34f805cc6308562e3df1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303200
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40075}
RTX padding packets sent before media packets can legitimately have no
timestamps set (they are 0). Writing the TransmissionOffset extension
with capture time 0 will overflow once current time exceeds ~3 minutes.
Bug: webrtc:15172
Change-Id: I4dd1f341802d45016549b330f0e08cd3a00cfa19
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305020
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40055}
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}