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}
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}
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}
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}
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}
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}
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}
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}
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}
`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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}