Commit graph

237 commits

Author SHA1 Message Date
Danil Chapovalov
9e09a1f327 Replace Thread::Invoke with Thread::BlockingCall
BlockingCall doesn't take rtc::Location parameter and thus most of the dependencies on location can be removed

Bug: webrtc:11318
Change-Id: I91a17e342dd9a9e3e2c8f7fbe267474c98a8d0e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274620
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38045}
2022-09-09 10:44:17 +00:00
Brett Hebert
e04d0fa1b2 Fix Event Log For Video Receiver
Resolves an issue where, in Chrome, WebRTC event logs do not capture outgoing packets for video receivers because no reference to the event log was passed to the video receiver.

Bug: webrtc:14338
Change-Id: Ia33ce6f2d69a0e341530648b10a08516dc53abf3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271080
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37746}
2022-08-11 12:15:52 +00:00
Danil Chapovalov
6e7c2685e3 Allow recursive check for RTC_DCHECK_RUN_ON macro
instead of using Lock/Unlock attributes, use Assert attribute to annotate code is running on certain task queue or thread.

Such check better matches what is checked, in particular allows to
recheck (and thus better document) currently used task queue

Bug: None
Change-Id: I5bc1c397efbc8342cf7915093b578bb015c85651
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269381
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37619}
2022-07-26 09:27:23 +00:00
Danil Chapovalov
b7128ed172 Migrate call/ to absl::AnyInvocable based TaskQueueBase interface
Bug: webrtc:14245
Change-Id: Ifcdcd343fcba1d850e40813bc08862c42647b0c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268002
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37477}
2022-07-07 10:32:26 +00:00
Niels Möller
6939f63ca1 Update old TODO comments
Bug: None
Change-Id: I96850df6cfa19303043108a59ef60d7b686ec747
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267661
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37436}
2022-07-05 09:59:33 +00:00
Danil Chapovalov
0ed3a2b6cb Avoid exposing RemoteBitrateEstimator in ReceiveSideCongestionController
Making RemoteBitrateEstimator to be ReceiveSideCC implementation detail allows code to be cleaner.

Bug: None
Change-Id: I1d3327c44b364c6c2a1005391cf1dc468e0cc8ce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266482
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37305}
2022-06-22 13:41:21 +00:00
Danil Chapovalov
80b7c6befd Delete Call dependency on ProcessThread as unused
Last usage or ProcessThread was removed in
https://webrtc-review.googlesource.com/c/src/+/265921

Bug: webrtc:7219
Change-Id: Ia46d9e2530cd0dbf56a5c0ca6e1bf0936fd62672
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266363
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37287}
2022-06-21 08:59:38 +00:00
Danil Chapovalov
675dfb4a1f Move receive side congestion controller periodic task to worker thread
This way call no longer needs dedicated process thread

Bug: webrtc:7219
Change-Id: I8ab677b1e6b909eeb726aefed5e6d10ce4bc43b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265921
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37279}
2022-06-20 16:26:51 +00:00
Artem Titov
c374d11fac Move to_queued_task.h and pending_task_safety_flag.h into public API
Bug: b/235812579
Change-Id: I9fa3dc4a65044df8b44fff4e9bfeac7233fa381c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266080
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37248}
2022-06-17 09:20:39 +00:00
Tommi
3176ef79e9 Rename AudioReceiveStream to AudioReceiveStreamInterface
Bug: webrtc:7484
Change-Id: I22eaa7a9e082fc575cf7471d7a2f4f706564d54f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262805
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36965}
2022-05-23 08:44:26 +00:00
Tommi
dddbbebe2b Rename internal::AudioReceiveStream to AudioReceiveStreamImpl
Bug: webrtc:7484
Change-Id: Id0836a7fdd6fabbdc9bdc3b15e9965d9102bffa5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262803
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36959}
2022-05-22 12:22:18 +00:00
Tommi
f6f4543304 Rename VideoReceiveStream to VideoReceiveStreamInterface
Bug: webrtc:7484
Change-Id: I653cfe46486e0396897dd333069a894d67e3c07b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262769
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36958}
2022-05-22 10:54:38 +00:00
Tommi
0601db9a48 Rename ReceiveStream to ReceiveStreamInterface
Bug: webrtc:7484
Change-Id: I41176a66b8399f6c8cf568630f2808eb95cf6247
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262767
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36917}
2022-05-18 07:26:50 +00:00
Ali Tofigh
641a1b11b6 Adopt absl::string_view in call/
Bug: webrtc:13579
Change-Id: Ib616eb3372da341fafb55c23038182751b9da5a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262780
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36910}
2022-05-17 12:00:45 +00:00
Tommi
1331c1821c Reland: Update local_ssrc without needing to recreate video streams.
This is comparable to this change done previously for for audio streams:
https://webrtc-review.googlesource.com/c/src/+/222042

This is a reland of commit 16a8b25d80
with an additional fix in Patchset 2. Another problem turned out to be
in RTCPReceiver, which is fixed in:
https://webrtc-review.googlesource.com/c/src/+/262663

Bug: webrtc:11993
Change-Id: I63c7cf62a6dd50f88b491fea3ba866697552ef5f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262665
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36907}
2022-05-17 10:59:54 +00:00
Tomas Gunnarsson
c92ee5f3c3 Revert "Update local_ssrc without needing to recreate video streams."
This reverts commit 16a8b25d80.

Reason for revert: Checking if this is blocking the Chromium autoroller.

Original change's description:
> Update local_ssrc without needing to recreate video streams.
>
> This is comparable to this change done previously for for audio streams:
> https://webrtc-review.googlesource.com/c/src/+/222042
>
> Bug: webrtc:11993
> Change-Id: Ic953f816a8f7c56d1c3dc9a16d85bef3696a663d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261960
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36876}

Bug: webrtc:11993
Change-Id: I3a8d2f6a7e89b6784754d8e891a4e01479807c2d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262422
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#36892}
2022-05-13 22:30:44 +00:00
Erik Språng
f3f3a61167 Remove legacy PacedSender.
The new TaskQueuePacedSender has been default-on in code since M97, and
there are no further usages of it that I can find. Let's clean this up!

The PacingController and associated tests will be cleaned up in a
follow-up cl.

Bug: webrtc:10809
Change-Id: I0cb888602939add953415977ee79ff0b3878fea5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258025
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36890}
2022-05-13 20:31:06 +00:00
Tommi
16a8b25d80 Update local_ssrc without needing to recreate video streams.
This is comparable to this change done previously for for audio streams:
https://webrtc-review.googlesource.com/c/src/+/222042

Bug: webrtc:11993
Change-Id: Ic953f816a8f7c56d1c3dc9a16d85bef3696a663d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261960
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36876}
2022-05-13 10:08:54 +00:00
Tommi
cf4ed1516e Add GetRtpExtensionMap to ReceiveStream and remove GetRtpExtensions.
GetRtpExtensions() is still used in one corner case for audio receive
streams, so GetRtpExtensions has migrated to AudioReceiveStream.

Updated FlexfecReceiveStream config management (incl. pass by value) and
now store an RtpHeaderExtensionMap in FlexfecReceiveStreamImpl.

Call GetRtpExtensionMap() from call.cc instead of constructing one on
the fly for each rtp packet (for video packets at least).

Bug: webrtc:11993
Change-Id: Id90ec5d43ea368f58edd6f17cb39d8c54aec641f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261800
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36839}
2022-05-10 13:50:31 +00:00
Tommi
363e812f2d Remove the VideoReceiveStream2::rtp() accessor.
Instead offer accessors for the specific config values from the struct
that are needed at different times. The remote_ssrc and rtx_ssrc
properties maybe accessed from any thread, other properties have
stricter requiremets.

Bug: webrtc:11993
Change-Id: I3ff8527b13452c773fae1b2574f1e3fd2583b481
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261319
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36823}
2022-05-09 20:25:29 +00:00
Tommi
7a15ff3f14 Add a transport_cc() getter and remove rtp_config().
Bug: webrtc:11993
Change-Id: Ie435a702c91b4d3827e528083f474e378fc75cc5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261318
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36822}
2022-05-09 20:21:14 +00:00
Tommi
6be3e788f5 Add getter for rtp header extensions for receiver classes.
This is to avoid accessing the array via the config struct.
Moving forward we might want to consider using the RtpHeaderExtensionMap
instead of a std::vector of RtpExtension.

Bug: webrtc:11993
Change-Id: I8469dbbd9bb95a69f87b5912bfc4bf8b8f603beb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261317
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36820}
2022-05-09 16:59:19 +00:00
Tommi
cb7c7366d0 Separate reading remote_ssrc from using the rtp_config() getter.
`remote_ssrc` can be considered const while some other state represented
by rtp_config() can not and also is tied to a specific thread.
Separating access to these variables, makes moving things around easier.

Bug: webrtc:11993
Change-Id: I70aa000daab6174a401e01dca163213174e8f284
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261316
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36818}
2022-05-09 14:55:00 +00:00
Tommi
cc50b04c02 Remove config() getter from AudioReceiveStream().
This reduces the surface of externally accessible state that belongs
to the class, which makes it easier to control what state belongs to
what thread. In this CL enforcing remote_ssrc() to be conceptually const
and sync_group to conceptually belong to the packet delivery thread.

Bug: webrtc:11993
Change-Id: I7de9366dc0c2bf451b5c58595c2d073b4016f2e7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261450
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36813}
2022-05-09 11:21:44 +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
Jonas Oreland
e02f9eedb3 WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 10/inf
This patch takes a stab at modules/video_coding,
but reaches only about half.

Bug: webrtc:10335
Change-Id: I0d47d0468b818145470c51ae4e8e75ff58d499ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256112
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36335}
2022-03-25 12:35:36 +00:00
Evan Shrubsole
6dbc1723f1 [cleanup] Prefer VCMTiming unique_ptr in VideoReceiveStream2 c'tor
Change-Id: Ifc2667ef9da38563266fb5ca7800ec757464035e
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256363
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36289}
2022-03-22 13:15:33 +00:00
Jonas Oreland
a943e730b2 WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 7/inf
Convert audio/ and collateral (audio encoder copy red).

Bug: webrtc:10335
Change-Id: Iac54c0cfd2f62f4402f3deec35ae2725ec35b81a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255820
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36229}
2022-03-17 07:11:44 +00:00
Jonas Oreland
c7f691a71a WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 2
convert call/ (and the collaterals)

Bug: webrtc:10335
Change-Id: I8f6bc13c032713aa2a947724b464f6f35454d39a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254320
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36165}
2022-03-09 22:17:52 +00:00
Jonas Oreland
ed99dae422 WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 1
This cl/
1) move WebRtcKeyValueConfig from api/transport to api/ directory.
2) add a test/ScopedKeyValueConfig (compare ScopedFieldTrials).
3) removes usage of webrtc::field_trial:: from the pc/ directory.
4) removes a few unused includes of system_wrappers/field_trial.h.

Bug: webrtc:10335
Change-Id: If29c07900dbe791050b0a5ad05332bedfad035f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253903
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36160}
2022-03-09 13:23:21 +00:00
Evan Shrubsole
5723d854c9 Integrate sync decoding in video_receive_stream
Wires up DecodeSynchronizer in Call if there is a Metronome injected
into the PeerConnectionFactoryDependencies.

Change-Id: I362cd12648bfa0c32e73111fcd0f3296fca2b275
Bug: webrtc:13658
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251341
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35996}
2022-02-14 16:59:20 +00:00
Tommi
d3b3a3b6bb Remove Call::sync_stream_mapping_
This std::map was used to look up audio streams from ssrcs when
creating/destroying and/or modifying streams. Those operations aren't
frequent enough to justify having a separate lookup map. Removing
the variable, simplifies the thread ownership work a bit.

Bug: webrtc:11993
Change-Id: I94f9f2f56c138051a8b9c5f6a6d7cae3a4e78b48
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249091
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35806}
2022-01-26 14:50:53 +00:00
Tommi
236d7e7e46 Factor out access to Call::receive_rtp_config_
This CL adds a SequenceChecker, receive_11993_checker_, specifically for
variables that need to move to the network thread. Once migrated,
the checker will be replaced with a check for the network thread.

In the meantime, the checker will match with one of worker [x]or
network threads.

As a first step, this checker is used to isolate access to
`receive_rtp_config_` which is used from object factory paths (Create/
Destroy routines) as well as paths that handle network packets.

Bug: webrtc:11993
Change-Id: Ia58423583cf99492018f218eb1640535e3919193
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249080
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35800}
2022-01-26 10:54:40 +00:00
Tommi
3088941a5e Minor order change to Call::DestroyVideoSendStream.
Move StopPermanentlyAndGetRtpStates closer to being the last step of
the destruction process.

Bug: webrtc:11993
Change-Id: I83d86c505b05f5c10d0ce802494baba9aa645027
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/239182
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35774}
2022-01-24 14:33:40 +00:00
Byoungchan Lee
c065e739e2 Remove RTC_DISALLOW_COPY_AND_ASSIGN more.
Bug: webrtc:13555, webrtc:13082
Change-Id: I9c07708108da0a26f5e228384fd56cef4d1540b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/247300
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35749}
2022-01-20 11:00:18 +00:00
Niels Möller
6b7b255e2d Update call/ to not use implicit T* --> scoped_refptr<T> conversion
Also change the class SharedModuleThread to final and
without any virtual methods.

Bug: webrtc:13464
Change-Id: If440e4c794955781f7d6bfce67f4554bcc3dc77e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/246205
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35695}
2022-01-14 10:26:11 +00:00
Jianhui Dai
f349e53ca5 Reland "Call: Deduplicate SentPacket notifications"
This is a reland of Ib121d5af07abe208bd7d36715a234f48cdabb032

In order to be backward compatible with bandwidth estimation behavior,
pass all packets without a |packet_id| to downstream.

Original change's description:
> Call: Deduplicate SentPacket notifications
>
> When bundling is in effect, multiple senders may be sharing the same
> transport. It means every |sent_packet| will be multiply notified from
> different channels, WebRtcVoiceMediaChannel or WebRtcVideoChannel.
> Record |last_sent_packet_| to deduplicate redundant notifications to
> downstream objects.
>
> This CL reduces 50% PostTask/Wakeup of Dynamic Mode Pacer.
>
> [1] https://datatracker.ietf.org/doc/html/rfc8829#section-4.1.1
> [2] https://datatracker.ietf.org/doc/html/rfc8843
>
> Bug: webrtc:13417
> Change-Id: Ib121d5af07abe208bd7d36715a234f48cdabb032
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/238720
> Reviewed-by: Markus Handell <handellm@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Tommi <tommi@webrtc.org>
> Commit-Queue: Markus Handell <handellm@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35417}

Bug: webrtc:13417, webrtc:13437
Change-Id: Ia5e9fbe5e4f47fe851935ca2484125411114cb68
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/239437
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35492}
2021-12-07 16:15:47 +00:00
Jakob Ivarsson
90cc4fe0e9 Revert "Call: Deduplicate SentPacket notifications"
This reverts commit 61a8d9caaa.

Reason for revert: We have identified some downstream regressions caused by this change (https://crbug.com/webrtc/13437).

Original change's description:
> Call: Deduplicate SentPacket notifications
>
> When bundling is in effect, multiple senders may be sharing the same
> transport. It means every |sent_packet| will be multiply notified from
> different channels, WebRtcVoiceMediaChannel or WebRtcVideoChannel.
> Record |last_sent_packet_| to deduplicate redundant notifications to
> downstream objects.
>
> This CL reduces 50% PostTask/Wakeup of Dynamic Mode Pacer.
>
> [1] https://datatracker.ietf.org/doc/html/rfc8829#section-4.1.1
> [2] https://datatracker.ietf.org/doc/html/rfc8843
>
> Bug: webrtc:13417
> Change-Id: Ib121d5af07abe208bd7d36715a234f48cdabb032
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/238720
> Reviewed-by: Markus Handell <handellm@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Tommi <tommi@webrtc.org>
> Commit-Queue: Markus Handell <handellm@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35417}

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

Bug: webrtc:13417
Change-Id: Ib1230fa07db56c33941a5b529a28f83d6d08d74d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/239441
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Owners-Override: Jakob Ivarsson <jakobi@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35442}
2021-11-30 11:49:51 +00:00
Jianhui Dai
61a8d9caaa Call: Deduplicate SentPacket notifications
When bundling is in effect, multiple senders may be sharing the same
transport. It means every |sent_packet| will be multiply notified from
different channels, WebRtcVoiceMediaChannel or WebRtcVideoChannel.
Record |last_sent_packet_| to deduplicate redundant notifications to
downstream objects.

This CL reduces 50% PostTask/Wakeup of Dynamic Mode Pacer.

[1] https://datatracker.ietf.org/doc/html/rfc8829#section-4.1.1
[2] https://datatracker.ietf.org/doc/html/rfc8843

Bug: webrtc:13417
Change-Id: Ib121d5af07abe208bd7d36715a234f48cdabb032
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/238720
Reviewed-by: Markus Handell <handellm@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35417}
2021-11-25 10:55:04 +00:00
Markus Handell
2b10c479ce VideoStreamEncoder: clean up threading constraints.
The sequences of threads entering the VideoStreamEncoder has been
unclear. Fix this by renaming the uninformational |main_queue_| to
|worker_queue_|, and introduce a new |network_queue_| which is set
on construction.

Bug: chromium:1255737
Change-Id: Ic4d3a5b8188b8cc98e60b72aee2c09c9afbc7356
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/236523
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35283}
2021-10-29 12:05:11 +00:00
Tommi
e9716de2cd Remove config() getter from VideoReceiveStream2.
Instead offer getters for the sync_group and rtp struct. Both are
a part of the config but expose much less of the config, which has
mutable parts.

Bug: none
Change-Id: Icc8007246e9776a5d20f30cda1a2df3fb7252ffc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229980
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34838}
2021-08-24 13:14:16 +00:00
Artem Titov
ea24027e83 Use backticks not vertical bars to denote variables in comments for /call
Bug: webrtc:12338
Change-Id: I8f92127b61352bd4b98a0690e9a0435bb6c6f870
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226943
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34569}
2021-07-27 18:29:33 +00:00
Markus Handell
0e62f7aa98 NackModule2: coalesce repeating tasks.
NackModule2 creates repeating tasks, but as there are
many modules (one per receiver) these tasks execute out
of phase with each other, multipliying the amount of wakeups
caused.

Fix this by creating a single wakeup source that serves all
NackModule2 instances in a call.

Bug: webrtc:12989
Change-Id: Ia9c84307eb57349679e42b673474feb2cb43f08e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226464
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34527}
2021-07-22 12:11:13 +00:00
Danil Chapovalov
00ca0044d4 Unify helpers IsRtpPacket and IsRtcpPacket
Bug: None
Change-Id: Ibe942de433435d256cd6827440136936d4b274d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225022
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34419}
2021-07-06 10:39:00 +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
Tommi
55107c8507 Update the sync_group id without recreating audio receive streams.
Bug: webrtc:11993
Change-Id: I7aaff6d6f89332e60967fba741252b630fd941cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222043
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34308}
2021-06-16 19:34:18 +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
Tommi
d350006b70 Add rtp_config() accessor to ReceiveStream.
This is a consistent way to get to common config parameters for
all receive streams and avoids storing a copy of the extension
headers inside of Call. This is needed to get rid of the need of
keeping config and copies in sync, which currently is part of why
we repeatedly delete and recreate audio receive streams on config
changes.

Bug: webrtc:11993
Change-Id: Ia356b6cac1425c8c6766abd2e52fdeb73c4a4b4f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222040
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34285}
2021-06-14 17:57:57 +00:00
Tommi
1c1f540487 Factor out common receive stream methods to a common interface.
Also including common Rtp config members.
Follow up changes will remove the ReceiveRtpConfig class in Call
and copy of extension headers, instead use the config directly
from the receive streams and not require stream recreation for changing
the headers.

Bug: webrtc:11993
Change-Id: I29ff3400d45d5bffddb3ad0a078403eb102afb65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221983
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34283}
2021-06-14 16:54:07 +00:00
Tommi
6eda26c550 Reland "Remove AudioReceiveStream::Reconfigure() method."
This reverts commit 8a18e5b3c9.

Reason for revert: Removing the problematic DCHECK.

Original change's description:
> Revert "Remove AudioReceiveStream::Reconfigure() method."
>
> This reverts commit e2561e17e2.
>
> Reason for revert: Speculative revert: breaks an downstream project
>
> Original change's description:
> > Remove AudioReceiveStream::Reconfigure() method.
> >
> > Instead, adding specific setters that are needed at runtime:
> > * SetDepacketizerToDecoderFrameTransformer
> > * SetDecoderMap
> > * SetUseTransportCcAndNackHistory
> >
> > The whole config struct is big and much of the state it holds, needs to
> > be considered const. For that reason the Reconfigure() method is too
> > broad of an interface since it overwrites the whole config struct
> > and doesn't actually handle all the potential config changes that might
> > occur when the config changes.
> >
> > Bug: webrtc:11993
> > Change-Id: Ia5311978f56b2e136781467e44f0d18039f0bb2d
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221363
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > Commit-Queue: Tommi <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#34252}
>
> TBR=saza@webrtc.org,nisse@webrtc.org,tommi@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: I15ca2d8ee5fd612e13dc1f4b3bfb9c885c21dc66
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:11993
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221746
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Andrey Logvin <landrey@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34253}

# Not skipping CQ checks because this is a reland.

Bug: webrtc:11993
Change-Id: I0d3bf9abdcdc8d3f9259d014e6074a5e6b6cc73c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221747
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34255}
2021-06-09 13:26:15 +00:00