Commit graph

28 commits

Author SHA1 Message Date
Philipp Hancke
a204ad210d clean up misc TimeDelta use
follow-up from https://webrtc-review.googlesource.com/c/src/+/262810

* replace Time::Millis(0) and TimeDelta::Millis(0) with ::Zero()
* drop unnecessary webrtc namespace from some TimeDeltas
* make TimeDelta do the unit conversion for stats

BUG=webrtc:13756

Change-Id: Ic60625ae0fc7959a47a6be9f5051851feaf76373
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265875
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37664}
2022-08-02 13:52:36 +00:00
Erik Språng
28bc2ca92c Remove unused WebRTC-LimitPaddingSize field trial
Bug: webrtc:11508
Change-Id: Ib7d48e23bd44e2f948d51800090fc14b873d11eb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268122
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37485}
2022-07-07 14:28:06 +00:00
Danil Chapovalov
e45cfb45b1 Delete RtcpPacketTypeCounter::first_packet_time_ms as unused
Bug: webrtc:13757
Change-Id: I358ab99c899b9de5f0135d5293101e7abda4aa31
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265682
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37198}
2022-06-13 14:24:07 +00:00
Jonas Oreland
e62c2f2c77 WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 12/inf
rename WebRtcKeyValueConfig to FieldTrialsView

Bug: webrtc:10335
Change-Id: If725bd498c4c3daf144bee638230fa089fdde833
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256965
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36365}
2022-03-29 10:14:00 +00:00
Danil Chapovalov
d0321c5e5a Deduplicate set of the rtp header extension uri constants
Bug: webrtc:7472
Change-Id: Ic0b4f2cc3374ba70a043310b5046d8bf91f0acbe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231949
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34990}
2021-09-14 13:38:44 +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
bb90497eaa Add support for deferred sequence numbering.
With this turned on, packets will be sequence number after the pacing
stage rather that during packetization.
This avoids a race where packets may be sent out of order, and paves
the way for the ability to cull packets from the pacer queue without
causing sequence number gaps.

For now, the feature is off by default. Follow-ups will enable it for
video and audio separately.

Bug: webrtc:11340, webrtc:12470
Change-Id: I6d411d8c85b9047e3e9b05ff4c2c3ed97c579aa1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208584
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34661}
2021-08-06 12:38:27 +00:00
Erik Språng
d7ec635d82 Add unit tests for rtp state.
This CL is extracted from
https://webrtc-review.googlesource.com/c/src/+/208584

Bug: webrtc:11340, webrtc:12470
Change-Id: I322c271b02bc3577fe8aad57fe97364a76d83f4f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227342
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34628}
2021-08-02 17:33:24 +00:00
Danil Chapovalov
623146cfe1 Delete remaining usage of RtpHeaderParser test helper.
Bug: None
Change-Id: Ia4f8c5dc212f25b1a507e13955973ce4aa6a7ddc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225550
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34525}
2021-07-22 10:15:07 +00:00
Markus Handell
eb61b7f620 ModuleRtcRtcpImpl2: remove Module inheritance.
This change achieves an Idle Wakeup savings of 200 Hz.

ModuleRtcRtcpImpl2 had Process() logic only active if TMMBR() is
enabled in RtcpSender, which it never is. Hence the Module
inheritance could be removed. The change removes all known
dependencies of the module inheritance, and any related mentions
of ProcessThread.

Fixed: webrtc:11581
Change-Id: I440942f07187fdb9ac18186dab088633969b340e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222604
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34358}
2021-06-22 14:51:04 +00:00
Markus Handell
049ed447b0 ModuleRtpRtcpImpl2: update test code.
This change prepares for later CLs that partly replaces
logic in the module that depends on the Module system
for logic that depends on task queues.

The change also changes SendTransport::SendRTCP
to schedule packet reception with the simulated time
controller. This fixes the problem that SendRTCP itself
updates the simulated time which makes it hard to
understand the tests.

Finally, GlobalSimulatedTimeController was updated
to support addition of custom SimulatedSequenceRunners
like SendTransport.

Bug: webrtc:11581
Change-Id: I0aa310ad0a10526479ad8c28affc38a413363ffd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222602
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34348}
2021-06-21 23:36:49 +00:00
Erik Språng
e7481a4199 Add an UlpFec test to RtpRtcp unit tests.
Bug: webrtc:11340
Change-Id: I0ef9c07ff1c9a23af5cd1e6c226c1fb15e4758ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219469
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34057}
2021-05-19 15:26:24 +00:00
Erik Språng
f6be1b22d6 Simplify RtpSenderTest.SendFlexfecPackets and move to RtpRtcp-level.
Bug: webrtc:11340
Change-Id: Ic83217994c447e490a6ac9cf04ceafa3dc009af7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219461
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34051}
2021-05-19 10:19:38 +00:00
Erik Språng
726b0e824b Refactor RtpSenderTest.TrafficSmoothingW* tests
Reduce to testing what RTPSender is actually interested in: that
packets are actually forwarded to the pacer.
Partially the old test was verifying TransmissionOffset header extension,
add an explicit test for that at RtpRtcp-level instead.

Bug: webrtc:11340
Change-Id: I62be39e1d9d8c214c3277f4f1326db05b937674a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218845
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34023}
2021-05-17 15:32:15 +00:00
Erik Språng
bd09a46aa1 Move some tests out from rtp_sender_unittest.
Moves OnSendSideDelayUpdated and OnSendPacketUpdated out from
rtp_sender_unittest and into rtp_sender_egress_unittest and
rtp_rtcp_impl2_unittest. The former test now only tests the logic for
updating send-side-delay stats. The latter is now on a proper
RtpRtcp-level and also verifies that frame timestamps makes it to the
egress (as assumed by the first test).

Bug: webrtc:11340
Change-Id: I784042ad91eb66a4d1eebdbbc625f9522528bfb5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218502
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33996}
2021-05-12 14:01:29 +00:00
Erik Språng
12d24113dc Move SendsPacketsWithTransportSequenceNumber to RtpRtcp level.
New tests (transport sequence number plus newly added abs send time) now
test more of production code and less of rtp_sender_unittest.cc test
fixture code.

Bug: webrtc:11340
Change-Id: I8ec0022c3d18467a4144ce984996af1a452760dc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216327
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33895}
2021-05-03 12:15:19 +00:00
Erik Språng
696cea0843 Refactor some RtpSender-level tests into RtpRtcp-level tests
This prepares for ability to defer sequence number assignment to after
the pacing stage - a scenario where the RtpRtcp module rather than than
RTPSender class has responsibility for sequence numbering.

Bug: webrtc:11340
Change-Id: Ife88f60258b9b7cfd9dbd3326f02ac34da8f7603
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214967
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33702}
2021-04-13 08:37:14 +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
Niels Moller
2accc7d6e0 Revert "Add task queue to RtpRtcpInterface::Configuration."
This reverts commit f23e2144e8.

Reason for revert: Need further discussion on appropriate thread/tq requirements.

Original change's description:
> Add task queue to RtpRtcpInterface::Configuration.
>
> Let ModuleRtpRtcpImpl2 use the configured value instead of
> TaskQueueBase::Current().
>
> Intention is to allow construction of RtpRtcpImpl2 on any thread.
> If a task queue is provided (required for periodic rtt updates), the
> destruction of the object must be done on that same task queue.
>
> Also, delete ModuleRtpRtcpImpl2::Create, callers updated to use std::make_unique.
>
> Bug: None
> Change-Id: I412b7b1e1ce24722ffd23d16aa6c48a7214c9bcd
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/199968
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32949}

TBR=danilchap@webrtc.org,ilnik@webrtc.org,saza@webrtc.org,nisse@webrtc.org,srte@webrtc.org

Change-Id: I7e5007f524a39a6552973ec9744cd04c13162432
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201420
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32953}
2021-01-12 17:47:32 +00:00
Niels Möller
f23e2144e8 Add task queue to RtpRtcpInterface::Configuration.
Let ModuleRtpRtcpImpl2 use the configured value instead of
TaskQueueBase::Current().

Intention is to allow construction of RtpRtcpImpl2 on any thread.
If a task queue is provided (required for periodic rtt updates), the
destruction of the object must be done on that same task queue.

Also, delete ModuleRtpRtcpImpl2::Create, callers updated to use std::make_unique.

Bug: None
Change-Id: I412b7b1e1ce24722ffd23d16aa6c48a7214c9bcd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/199968
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32949}
2021-01-12 12:42:58 +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
Niels Möller
af6ea0c3ab Delete internal getter methods from RtpRtcpInterface
Methods deleted: StorePackets, RtcpXrRrtrStatus. They are now private
methods on the two implementations.

Bug: None
Change-Id: If68e8f1e8ba233302e24e0cdb6bf7c1b0c9f330f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/194322
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32670}
2020-11-23 11:37:41 +00:00
Niels Möller
23bd8745c1 Remove rtp test dependency on VideoCodec class
Bug: None
Change-Id: I4848b4bd37a6e263c787bba0851cd14c5c7b3052
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181070
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31882}
2020-08-07 12:27:15 +00:00
Danil Chapovalov
31cb3abd36 Do not propage RTPFragmentationHeader into rtp_rtcp
It is not longer needed by the rtp_rtcp module.

Bug: webrtc:6471
Change-Id: I89a4374a50c54a02e9f20a5ce789eac308aaffeb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179523
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31773}
2020-07-21 14:37:08 +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
096c0b0921 Post stats updates in RtpSenderEgress to the worker.
On the way remove need for lock for
rtp_sequence_number_map_ and timestamp_offset_.

Change-Id: I21a5cbf6208620435a1a16fff68c33c0cb84f51d
Bug: webrtc:11581
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177424
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31581}
2020-06-29 15:35:09 +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
Tommi
3a5742c880 Add thread/sequence checks to ModuleRtpRtcpImpl.
This ended up with needing to fork the current implementation
in order to not break downstream projects that were inheriting
from it. While those get updated, we'll move on with the forked
class.

Bug: webrtc:11581,b/8278269
Change-Id: I05b596cbda71aa5b72894c31a7119d17d4761883
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175500
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31334}
2020-05-20 15:45:21 +00:00