aboutsummaryrefslogtreecommitdiff
path: root/call/call.cc
AgeCommit message (Collapse)Author
2022-06-22Avoid exposing RemoteBitrateEstimator in ReceiveSideCongestionControllerDanil Chapovalov
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-21Delete Call dependency on ProcessThread as unusedDanil Chapovalov
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-20Move receive side congestion controller periodic task to worker threadDanil Chapovalov
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-17Move to_queued_task.h and pending_task_safety_flag.h into public APIArtem Titov
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-05-23Rename AudioReceiveStream to AudioReceiveStreamInterfaceTommi
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-22Rename internal::AudioReceiveStream to AudioReceiveStreamImplTommi
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-22Rename VideoReceiveStream to VideoReceiveStreamInterfaceTommi
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-18Rename ReceiveStream to ReceiveStreamInterfaceTommi
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-17Adopt absl::string_view in call/Ali Tofigh
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-17Reland: Update local_ssrc without needing to recreate video streams.Tommi
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 16a8b25d809e4d4982f9fc4b4e973acd506b8bca 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-13Revert "Update local_ssrc without needing to recreate video streams."Tomas Gunnarsson
This reverts commit 16a8b25d809e4d4982f9fc4b4e973acd506b8bca. 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-13Remove legacy PacedSender.Erik Språng
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-13Update local_ssrc without needing to recreate video streams.Tommi
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-10Add GetRtpExtensionMap to ReceiveStream and remove GetRtpExtensions.Tommi
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-09Remove the VideoReceiveStream2::rtp() accessor.Tommi
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-09Add a transport_cc() getter and remove rtp_config().Tommi
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-09Add getter for rtp header extensions for receiver classes.Tommi
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-09Separate reading remote_ssrc from using the rtp_config() getter.Tommi
`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-09Remove config() getter from AudioReceiveStream().Tommi
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-03-29WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 12/infJonas Oreland
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-25WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 10/infJonas Oreland
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-22[cleanup] Prefer VCMTiming unique_ptr in VideoReceiveStream2 c'torEvan Shrubsole
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-17WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 7/infJonas Oreland
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-09WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 2Jonas Oreland
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-09WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 1Jonas Oreland
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-02-14Integrate sync decoding in video_receive_streamEvan Shrubsole
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-01-26Remove `Call::sync_stream_mapping_`Tommi
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-26Factor out access to `Call::receive_rtp_config_`Tommi
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-24Minor order change to Call::DestroyVideoSendStream.Tommi
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-20Remove RTC_DISALLOW_COPY_AND_ASSIGN more.Byoungchan Lee
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-14Update call/ to not use implicit T* --> scoped_refptr<T> conversionNiels Möller
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}
2021-12-07Reland "Call: Deduplicate SentPacket notifications"Jianhui Dai
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-11-30Revert "Call: Deduplicate SentPacket notifications"Jakob Ivarsson
This reverts commit 61a8d9caaa31ab4ef953415882f97be5a4248774. 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-25Call: Deduplicate SentPacket notificationsJianhui Dai
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-10-29VideoStreamEncoder: clean up threading constraints.Markus Handell
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-08-24Remove config() getter from VideoReceiveStream2.Tommi
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-07-27Use backticks not vertical bars to denote variables in comments for /callArtem Titov
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-22NackModule2: coalesce repeating tasks.Markus Handell
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-06Unify helpers IsRtpPacket and IsRtcpPacketDanil Chapovalov
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-06-22ModuleRtcRtcpImpl2: remove Module inheritance.upstream-masterMarkus Handell
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-16Update the sync_group id without recreating audio receive streams.Tommi
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-16Don't recreate the audio receive stream when updating the local_ssrc.Tommi
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-14Add rtp_config() accessor to ReceiveStream.Tommi
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-14Factor out common receive stream methods to a common interface.Tommi
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-09Reland "Remove AudioReceiveStream::Reconfigure() method."Tommi
This reverts commit 8a18e5b3c954a3f9cc006c90356a3d850bcc352f. Reason for revert: Removing the problematic DCHECK. Original change's description: > Revert "Remove AudioReceiveStream::Reconfigure() method." > > This reverts commit e2561e17e29e62c02731f1d214d7ee5ffdaeb941. > > 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-09Revert "Remove AudioReceiveStream::Reconfigure() method."Andrey Logvin
This reverts commit e2561e17e29e62c02731f1d214d7ee5ffdaeb941. 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}
2021-06-09Remove AudioReceiveStream::Reconfigure() method.Tommi
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}
2021-06-03Remove synchronization from VideoSendStream construction.Tommi
* Make VideoSendStream and VideoSendStreamImpl construction non-blocking. * Move ownership of the rtp video sender to VideoSendStream. * Most state is constructed in initializer lists. * More state is now const (including VideoSendStreamImpl ptr) * Adding thread checks to classes that appear to have had a race before E.g. RtpTransportControllerSend. The change in threading now actually fixes an issue we weren't aware of. * Moved from using weak_ptr to safety flag and made some PostTask calls cancellable that could potentially have been problematic. Initalizing the flag without thread synchronization is also simpler. This should speed up renegotiation significantly when there are multiple channels. A follow-up change will improve SetSend as well which is another costly step during renegotiation. Bug: webrtc:12840 Change-Id: If4b28da5a085643ce132c7cfcf80a62cd1a625c5 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221105 Commit-Queue: Tommi <tommi@webrtc.org> Reviewed-by: Markus Handell <handellm@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34224}
2021-06-01Call: introduce SendStats.Markus Handell
Call send statistic updates are initiated on the send transport sequence which forced calls to PostTask to the worker thread which keeps several related attributes protected by it. Change this by: * Using std::atomics for three attributes where synchronization doesn't really matter and which can be accessed on either context. * Introducing a thread-compatible internal class which keeps the statistics protected by the send transport sequence, and emits UMA statistics on destruction. The change also achieves the following trivial changes: * The call origin time is now tracked by a proper webrtc::Timestamp. * The explicit use of the |send_transport_queue_| was replaced by a more relaxed sequence checker. Bug: webrtc:11993 Change-Id: I428a4d98b5fd2fd31222f62e597a9d61a3d4899f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220931 Commit-Queue: Tommi <tommi@webrtc.org> Reviewed-by: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34187}
2021-06-01Add ability to pass factory for RtpTransportControllerSend to ↵Vojin Ilic
PeerConnectionFactoryDependencies. This way we can have custom implementation of RtpTransportControllerSendInterface and pass it properly to Call. Call relies on RtpTransportControllerSendInterface already so this is natural way to customize RTP related classes. If there is custom factory present in dependencies it will be used, otherwise default factory will be used. Intention behind this change is to have ability to have custom QoS with custom parameters. Bug: webrtc:12778 Change-Id: I5b88957025621ef4bcd63eaa98c218ad213da9c8 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217769 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Philipp Hancke <phancke@nvidia.com> Cr-Commit-Position: refs/heads/master@{#34181}