Commit graph

93 commits

Author SHA1 Message Date
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
Emil Lundmark
6c81a42eb1 Simulate generic dependency structure for VP8
This will be used as a fall-back when the encoder adapter doesn't
provide any dependency structure. This ensures we can always generate a
dependency descriptor RTP header extension for VP8.

Before, when switching between encoder adapters where the old one
generated a dependency structure but the new one didn't we had to make
sure the structure was cleared so that packets weren't sent with the
dependency structure from the previous adapter. This will not be a
problem anymore since the new adapter will use the simulated dependency
structure.

Bug: b/227749056
Change-Id: I8463c48a9dcde4b8d32c519819dd8a92acd8e43b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262765
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36930}
2022-05-19 11:53:08 +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
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
Erik Språng
e486a7bdf7 Make KeyValueConfig mandatory in the pacer.
This CL also removes dependency on the legacy field trial methods.

Bug: webrtc:11926
Change-Id: I53feeee86b92878cf0f2b8ebdce3d101f9e04014
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255381
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36205}
2022-03-15 15:07:46 +00:00
Jonas Oreland
8ca06137dc WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 4/inf
convert almost all of video/ (and the collateral)

Bug: webrtc:10335
Change-Id: Ic94e05937f54d11ee8a635b6b66fd146962d9f11
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254601
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36192}
2022-03-14 14:36:35 +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
Tommi
6fba6b795a Reland "(Un/)Subscribe RtpVideoSender for feedback on the transport queue."
This is a reland of 9d230d54c7

Original change's description:
> (Un/)Subscribe RtpVideoSender for feedback on the transport queue.
>
> * RtpVideoSender now registers/unregisters for feedback callback
>   inside of SetActive(), which runs on the transport queue.
> * Transport feedback is given on the transport queue
> * Registration/unregistration for feedback is done on the same
> * Removed the last mutex from TransportFeedbackDemuxer.
>
> Ultimately, this work is related to moving state from the Call
> class, that's related to network configuration, but due to the code
> is currently written is attached to the worker thread, over to the
> Transport, where it's used (e.g. suspended_video_send_ssrcs_).
>
> Bug: webrtc:13517, webrtc:11993
> Change-Id: I057d0e2597e6cb746b335e0308599cd547350e56
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/248165
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35777}

Bug: webrtc:13517, webrtc:11993
Change-Id: I766e569abea8bae96d32267a951fcdc195ced8a7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249782
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35863}
2022-02-01 06:45:17 +00:00
Tomas Gunnarsson
7734fc64b9 Revert "(Un/)Subscribe RtpVideoSender for feedback on the transport queue."
This reverts commit 9d230d54c7.

Reason for revert: Speculative revert to see if it's the cause of a few perf changes (some bad, some not so bad).

Bug: webrtc:13613

Original change's description:
> (Un/)Subscribe RtpVideoSender for feedback on the transport queue.
>
> * RtpVideoSender now registers/unregisters for feedback callback
>   inside of SetActive(), which runs on the transport queue.
> * Transport feedback is given on the transport queue
> * Registration/unregistration for feedback is done on the same
> * Removed the last mutex from TransportFeedbackDemuxer.
>
> Ultimately, this work is related to moving state from the Call
> class, that's related to network configuration, but due to the code
> is currently written is attached to the worker thread, over to the
> Transport, where it's used (e.g. suspended_video_send_ssrcs_).
>
> Bug: webrtc:13517, webrtc:11993
> Change-Id: I057d0e2597e6cb746b335e0308599cd547350e56
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/248165
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35777}

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

Bug: webrtc:13517, webrtc:11993
Change-Id: I824623b3b1c14f0ca7049a2a0890c6d97b7fb608
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249600
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35815}
2022-01-27 13:43:44 +00:00
Tommi
9d230d54c7 (Un/)Subscribe RtpVideoSender for feedback on the transport queue.
* RtpVideoSender now registers/unregisters for feedback callback
  inside of SetActive(), which runs on the transport queue.
* Transport feedback is given on the transport queue
* Registration/unregistration for feedback is done on the same
* Removed the last mutex from TransportFeedbackDemuxer.

Ultimately, this work is related to moving state from the Call
class, that's related to network configuration, but due to the code
is currently written is attached to the worker thread, over to the
Transport, where it's used (e.g. suspended_video_send_ssrcs_).

Bug: webrtc:13517, webrtc:11993
Change-Id: I057d0e2597e6cb746b335e0308599cd547350e56
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/248165
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35777}
2022-01-24 19:50:03 +00:00
Emil Lundmark
b01e6457fe Reland "Reland "Enable WebRTC-Vp9DependencyDescriptor by default""
This is a reland of b062829311

> Reland "Enable WebRTC-Vp9DependencyDescriptor by default"
>
> This is a reland of 4727071506
>
> Original change's description:
> > Enable WebRTC-Vp9DependencyDescriptor by default
> >
> > Bug: chromium:1178444
> > Change-Id: I420e1e9b3c557b8b186cb08c15b962a779e1ca17
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226941
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#34584}
>
> Bug: chromium:1178444
> Change-Id: I874412b41e657179be6ffbe399617e18a29ec804
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230121
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34890}

Bug: chromium:1178444
Change-Id: I5bb3e3bd2da26f9a24d5e8161bd66b447543fc8e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231843
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35004}
2021-09-15 13:48:58 +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
Emil Lundmark
5498676edd Revert "Reland "Enable WebRTC-Vp9DependencyDescriptor by default""
This reverts commit b062829311.

Reason for revert: Still causes crashes in perf tests.

Original change's description:
> Reland "Enable WebRTC-Vp9DependencyDescriptor by default"
>
> This is a reland of 4727071506
>
> Original change's description:
> > Enable WebRTC-Vp9DependencyDescriptor by default
> >
> > Bug: chromium:1178444
> > Change-Id: I420e1e9b3c557b8b186cb08c15b962a779e1ca17
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226941
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#34584}
>
> Bug: chromium:1178444
> Change-Id: I874412b41e657179be6ffbe399617e18a29ec804
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230121
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34890}

Bug: chromium:1178444
Change-Id: I8a789ee60d0cca6db72612ef3660fe595255c537
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231221
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34928}
2021-09-06 13:11:51 +00:00
philipel
5b231de486 Make RtpPayloadParams::MinimalisticVp9Structure codec agnostic.
Bug: none
Change-Id: I97f603aad53933b09c761da954130b06ea5a5501
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230760
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34894}
2021-09-01 14:15:59 +00:00
Emil Lundmark
b062829311 Reland "Enable WebRTC-Vp9DependencyDescriptor by default"
This is a reland of 4727071506

Original change's description:
> Enable WebRTC-Vp9DependencyDescriptor by default
>
> Bug: chromium:1178444
> Change-Id: I420e1e9b3c557b8b186cb08c15b962a779e1ca17
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226941
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34584}

Bug: chromium:1178444
Change-Id: I874412b41e657179be6ffbe399617e18a29ec804
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230121
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34890}
2021-09-01 09:27:39 +00:00
Björn Terelius
53adc7b1c8 Revert "Enable WebRTC-Vp9DependencyDescriptor by default"
This reverts commit 4727071506.

Reason for revert: Suspected cause for crashes in perf tests.

Original change's description:
> Enable WebRTC-Vp9DependencyDescriptor by default
>
> Bug: chromium:1178444
> Change-Id: I420e1e9b3c557b8b186cb08c15b962a779e1ca17
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226941
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34584}

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

Bug: chromium:1178444
Change-Id: I582d6d1c9d2091ca37b0943235b5cea8d4e2790d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227282
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34619}
2021-08-02 09:52:24 +00:00
Emil Lundmark
4727071506 Enable WebRTC-Vp9DependencyDescriptor by default
Bug: chromium:1178444
Change-Id: I420e1e9b3c557b8b186cb08c15b962a779e1ca17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226941
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34584}
2021-07-28 12:08:36 +00:00
Erik Språng
6a0a55907b Reland "Correctly handle retransmissions/padding in early loss detection."
This is a reland of e9ae4729e0

TBR=philipel@webrtc.org,terelius@webrtc.org

Original change's description:
> Correctly handle retransmissions/padding in early loss detection.
>
> This CL makes sure we don't cull packets from the history based on
> incorrect ack mapping, just like it's predecessor:
> https://webrtc-review.googlesource.com/c/src/+/218000
>
> It also changes the logic to make sure retransmits counts towards
> history pruning - and properly ignores padding/fec.
>
> Bug: webrtc:12713
> Change-Id: I7835d10e483687e960a9cce41d4e2f1a6c3189b4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221863
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34293}

Bug: webrtc:12713
Change-Id: Iec123d71edafea98fe289acde007b57e212681f4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222640
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34297}
2021-06-16 08:14:27 +00:00
Erik Språng
d6957c2eed Revert "Correctly handle retransmissions/padding in early loss detection."
This reverts commit e9ae4729e0.

Reason for revert: Internal test failure

Original change's description:
> Correctly handle retransmissions/padding in early loss detection.
>
> This CL makes sure we don't cull packets from the history based on
> incorrect ack mapping, just like it's predecessor:
> https://webrtc-review.googlesource.com/c/src/+/218000
>
> It also changes the logic to make sure retransmits counts towards
> history pruning - and properly ignores padding/fec.
>
> Bug: webrtc:12713
> Change-Id: I7835d10e483687e960a9cce41d4e2f1a6c3189b4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221863
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34293}

TBR=danilchap@webrtc.org,terelius@webrtc.org,sprang@webrtc.org,philipel@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Iaca6dc7739d953e97add5f5d516139b4819e43ee
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:12713
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222601
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34294}
2021-06-15 15:59:10 +00:00
Erik Språng
e9ae4729e0 Correctly handle retransmissions/padding in early loss detection.
This CL makes sure we don't cull packets from the history based on
incorrect ack mapping, just like it's predecessor:
https://webrtc-review.googlesource.com/c/src/+/218000

It also changes the logic to make sure retransmits counts towards
history pruning - and properly ignores padding/fec.

Bug: webrtc:12713
Change-Id: I7835d10e483687e960a9cce41d4e2f1a6c3189b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221863
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34293}
2021-06-15 15:39:19 +00:00
Danil Chapovalov
f01c2c96f2 Delete RtcpStatisticsCallback in favor of ReportBlockDataObserver
Bug: webrtc:10678
Change-Id: Ie016cbc47dbba15176fc5e7ad7d01a438db7dfb3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218842
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34013}
2021-05-16 15:09:29 +00:00
Danil Chapovalov
748550d6ce Provide FrameDependecyStructure for VP9 when encoder doesn't fill it
To produce suboptimal but valid DependencyDescriptor rtp header extension.

Bug: webrtc:11999
Change-Id: I78fbca4d750cc1316b1e4086fc7ae1ad90ce25f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216328
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33873}
2021-04-29 12:28:46 +00:00
Tomas Gunnarsson
c1d589146b Replace new rtc::RefCountedObject with rtc::make_ref_counted in a few files
Bug: webrtc:12701
Change-Id: Ie50225374f811424faf20caf4cf454b2fd1c4dc9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215930
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33818}
2021-04-23 12:04:39 +00:00
Danil Chapovalov
9554a7b641 Account for extra capacity rtx packet might need
When calculating maximum allowed size for a media packet.
In particular take in account that rtx packet might need to
include mid and repaired-rsid extensions when media packet can omit them.

Bug: webrtc:11031
Change-Id: I3e7bc36437c23e0330316588d2a46978407c8c45
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206060
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33184}
2021-02-06 21:34:08 +00:00
Danil Chapovalov
37dfddd5e8 Avoid treating VP8 key frame in simulcast as delta frame
Bug: None
Change-Id: Ief3c759571f02af6cd9517acb2851861e190ceaf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/203891
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33088}
2021-01-28 12:11:50 +00:00
Danil Chapovalov
0be1846477 Fix enabling DependencyDescriptor for VP9 with spatial layers
DependencyDescriptor and vp9 wrapper understand key frame differently
when it comes to the first layer frame with spatial_id>0
This CL adds and use DD's interpretation of the key frame when deciding
if DD should be supported going forward.

Bug: webrtc:11999
Change-Id: I11a809a315e18bd856bb391576c6ea1f427e33be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202760
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33046}
2021-01-20 15:03:37 +00:00
Niels Möller
98d9c306ef Don't instantiate any CallStats object in RtpVideoSender tests
Tests appear to not depend on any CallStats behaviour, and the usage
is not compatible with the threading requirements of the new
internal::CallStats class.

Bug: webrtc:11581
Change-Id: I8802a46842930eb58bd7609bcd8384ae97e3cf59
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/197814
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32847}
2020-12-16 14:01:02 +00:00
Jakob Ivarsson
9a12ee5d37 Use frame rate in video overhead calculation.
Assume bitrate is evenly distributed between frames. This is wrong for
uneven frame sizes and will underestimate the overhead for simulcast.
However, it will be more correct than the current calculation,
especially for low bitrates when each frame is smaller than one packet.
This is also when overhead matters more since it is a larger fraction
of the total bitrate.

It is also unclear what will happen when using FEC.

Bug: b/166341943
Change-Id: I247b9d0fc7a8ad5daa9b577f55ec16c56efa34c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195221
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32725}
2020-12-01 09:42:40 +00:00
Erik Språng
7703f23b60 Adds ability to delay pacer start until media is added.
This avoids the pacer thread waking up at 5ms interval if a
PeerConnection is created without actually using media.

The TaskQueuePacedSender solves the problem too, this CL is mostly a
safeguard in case we still find issues when turning it on...

Can be turned off by setting field trial "WebRTC-LazyPacerStart" to
"Disabled".

Bug: webrtc:10809
Change-Id: I8501106e608eccb14487576f24bdceaf3f324d80
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183982
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32101}
2020-09-14 21:42:55 +00:00
Danil Chapovalov
383f2cfca4 Stop mentioning RTPFragmentationHeader in call/
Bug: webrtc:6471
Change-Id: I07ab95524369fa996b8dde68f421281989d04e0c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181461
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31921}
2020-08-12 13:59:38 +00:00
Danil Chapovalov
24263f4ffb Embed FrameDependencyTemplate builder helpers directly into the struct
Bug: None
Change-Id: I4c13bdabd08dd6a6011cb534c765c1dd09f218d1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176843
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31500}
2020-06-11 13:43:51 +00:00
Danil Chapovalov
636865e05d Delete field trial WebRTC-GenericDescriptor
this trial is by default on for three months since
https://webrtc-review.googlesource.com/c/src/+/168661

Bug: webrtc:11503
Change-Id: I8f2e0996fd1c77113715628198a409f12a525d51
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176242
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31424}
2020-06-03 13:00:30 +00:00
Danil Chapovalov
9a5efe925d In call/ replace mock macros with unified MOCK_METHOD macro
Bug: webrtc:11564
Change-Id: I81d06041b80ce470e4859c4d0ebad7ff0f831af9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175134
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31276}
2020-05-15 13:36:00 +00:00
Tommi
822a874463 Switch CallStats to TQ interface + callbacks on the worker thread.
Bug: webrtc:11489
Change-Id: I08c4cd42dfa28d88ed9f0aa8c8b2cfb606bf00df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174240
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31203}
2020-05-10 23:24:35 +00:00
Marina Ciocea
1148fd5cef Define MockFrameTransformer in test/.
Add MockFrameTransformer to test/, and remove definitions from unit test
files.

Bug: webrtc:11380
Change-Id: Ia709883e8d000852e3f71e7bfb87877072e22aeb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174001
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31151}
2020-05-04 13:45:22 +00:00
Tommi
3c9bcc1f7a Reland of the test portion of:
https://webrtc-review.googlesource.com/c/src/+/172847

------------ original description --------------

Preparation for ReceiveStatisticsProxy lock reduction.

Update tests to call VideoReceiveStream::GetStats() in the same or at
least similar way it gets called in production (construction thread,
same TQ/thread).

Mapped out threads and context for ReceiveStatisticsProxy,
VideoQualityObserver and VideoReceiveStream. Added
follow-up TODOs for webrtc:11489.

One functional change in ReceiveStatisticsProxy is that when sender
side RtcpPacketTypesCounterUpdated calls are made, the counter is
updated asynchronously since the sender calls the method on a different
thread than the receiver.

Make CallClient::SendTask public to allow tests to run tasks in the
right context. CallClient already does this internally for GetStats.

Remove 10 sec sleep in StopSendingKeyframeRequestsForInactiveStream.

Bug: webrtc:11489
Change-Id: I491e13344b9fa714de0741dd927d907de7e39e83
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173583
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31077}
2020-04-15 16:09:44 +00:00
Marina Ciocea
dc69fd2b80 [InsertableStreams] Fix video sender simulcast.
The transformer was previously moved into the config of the first stream
which resulted in incorrect behavior for simulcast. Use the transformer
in all the streams.

Pass the sender's ssrc on registring the transformed frame callback, to
associate separate transformer sinks for each sender.

Bug: chromium:1065838
Change-Id: I5c52dacb241c68268681b85f875257b24987849e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173332
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31050}
2020-04-11 10:30:32 +00:00
Artem Titov
16cc9efd54 Revert "Preparation for ReceiveStatisticsProxy lock reduction."
This reverts commit 24eed2735b.

Reason for revert: Speculative revert: breaks downstream project

Original change's description:
> Preparation for ReceiveStatisticsProxy lock reduction.
> 
> Update tests to call VideoReceiveStream::GetStats() in the same or at
> least similar way it gets called in production (construction thread,
> same TQ/thread).
> 
> Mapped out threads and context for ReceiveStatisticsProxy,
> VideoQualityObserver and VideoReceiveStream. Added
> follow-up TODOs for webrtc:11489.
> 
> One functional change in ReceiveStatisticsProxy is that when sender
> side RtcpPacketTypesCounterUpdated calls are made, the counter is
> updated asynchronously since the sender calls the method on a different
> thread than the receiver.
> 
> Make CallClient::SendTask public to allow tests to run tasks in the
> right context. CallClient already does this internally for GetStats.
> 
> Remove 10 sec sleep in StopSendingKeyframeRequestsForInactiveStream.
> 
> Bug: webrtc:11489
> Change-Id: Ib45bfc59d8472e9c5ea556e6ecf38298b8f14921
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172847
> Commit-Queue: Tommi <tommi@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31008}

TBR=mbonadei@webrtc.org,henrika@webrtc.org,kwiberg@webrtc.org,tommi@webrtc.org,juberti@webrtc.org,mflodman@webrtc.org

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

Bug: webrtc:11489
Change-Id: I48b8359cdb791bf22b1a2c2c43d46263b01e0d65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173082
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31023}
2020-04-07 19:50:20 +00:00
Tommi
24eed2735b Preparation for ReceiveStatisticsProxy lock reduction.
Update tests to call VideoReceiveStream::GetStats() in the same or at
least similar way it gets called in production (construction thread,
same TQ/thread).

Mapped out threads and context for ReceiveStatisticsProxy,
VideoQualityObserver and VideoReceiveStream. Added
follow-up TODOs for webrtc:11489.

One functional change in ReceiveStatisticsProxy is that when sender
side RtcpPacketTypesCounterUpdated calls are made, the counter is
updated asynchronously since the sender calls the method on a different
thread than the receiver.

Make CallClient::SendTask public to allow tests to run tasks in the
right context. CallClient already does this internally for GetStats.

Remove 10 sec sleep in StopSendingKeyframeRequestsForInactiveStream.

Bug: webrtc:11489
Change-Id: Ib45bfc59d8472e9c5ea556e6ecf38298b8f14921
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172847
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31008}
2020-04-06 14:34:38 +00:00
Marina Ciocea
e77912ba8c Insert frame transformer between Encoded and Packetizer.
Add a new API in RTPSenderInterface, to be called from the browser side
to insert a frame transformer between the Encoded and the Packetizer.

The frame transformer is passed from RTPSenderInterface through the
library to be eventually set in RTPSenderVideo, where the frame
transformation will occur in the follow-up CL
https://webrtc-review.googlesource.com/c/src/+/169128.

Insertable Streams Web API explainer:
https://github.com/alvestrand/webrtc-media-streams/blob/master/explainer.md

Design doc for WebRTC library changes:
http://doc/1eiLkjNUkRy2FssCPLUp6eH08BZuXXoHfbbBP1ZN7EVk

Bug: webrtc:11380
Change-Id: I46cd0d8a798c2736c837e90cbf90d8901c7d27fb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169127
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30642}
2020-02-28 07:43:13 +00:00
Danil Chapovalov
2272f20a0a Allow sending DependencyDescriptor rtp header extension in call
Bug: webrtc:10342
Change-Id: I8ccbc7381fc8ac436066f5b817fa32180fc8603e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168542
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
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/master@{#30546}
2020-02-18 16:50:28 +00:00
Danil Chapovalov
cad3e0e2fa Replace DataSize and DataRate factories with newer versions
This is search and replace change:
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataSize::Bytes<\(.*\)>()/DataSize::Bytes(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataSize::bytes/DataSize::Bytes/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::BitsPerSec<\(.*\)>()/DataRate::BitsPerSec(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::BytesPerSec<\(.*\)>()/DataRate::BytesPerSec(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::KilobitsPerSec<\(.*\)>()/DataRate::KilobitsPerSec(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::bps/DataRate::BitsPerSec/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::kbps/DataRate::KilobitsPerSec/g"
git cl format

Bug: webrtc:9709
Change-Id: I65aaca69474ba038c1fe2dd8dc30d3f8e7b94c29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168647
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30545}
2020-02-18 16:09:50 +00:00
Danil Chapovalov
a68eb8c1cb in call RtpVideoSenderTests rely on simulated time
instead of waiting on an rtc::Event
to make tests faster and potentially less flaky

Bug: None
Change-Id: I04e8fa79761e782f60838b924d40e6d6a104b14b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168644
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30540}
2020-02-18 11:03:58 +00:00
Danil Chapovalov
0c626afcf3 Use newer version of TimeDelta and TimeStamp factories in webrtc
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Micros<\(.*\)>()/TimeDelta::Micros(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Millis<\(.*\)>()/TimeDelta::Millis(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Seconds<\(.*\)>()/TimeDelta::Seconds(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::us/TimeDelta::Micros/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::ms/TimeDelta::Millis/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::seconds/TimeDelta::Seconds/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Micros<\(.*\)>()/Timestamp::Micros(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Millis<\(.*\)>()/Timestamp::Millis(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Seconds<\(.*\)>()/Timestamp::Seconds(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::us/Timestamp::Micros/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::ms/Timestamp::Millis/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::seconds/Timestamp::Seconds/g"
git cl format

Bug: None
Change-Id: I87469d2e4a38369654da839ab7c838215a7911e7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168402
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30491}
2020-02-10 12:21:17 +00:00
Sebastian Jansson
3d4d94a832 Adds scenario test for transport wide feedback based retransmission.
This ensures more end to end test coverage of the feature and captures
a wider class of regression then the existing unit test.

Bug: webrtc:9883
Change-Id: I6e74e571500c5c5d74caf8f661cac08bee8934f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/164461
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30252}
2020-01-14 16:00:14 +00:00
Mirko Bonadei
f18f9206e5 Revert "Moves TransportFeedbackAdapter to TaskQueue."
This reverts commit 62d01cde6f.

Reason for revert: Causes SIGSEGV in webrtc::RTPSender::BuildRtxPacket.

Original change's description:
> Moves TransportFeedbackAdapter to TaskQueue.
>
> Bug: webrtc:9883
> Change-Id: Id87e281751d98043f4470df5a71d458f4cd654c1
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158793
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30037}

TBR=sprang@webrtc.org,srte@webrtc.org

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

No-Try: True
Bug: webrtc:9883
Change-Id: If54bdb8694144fae3fafbabd72d1ac1198e51aa6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161726
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30052}
2019-12-10 13:51:29 +00:00
Sebastian Jansson
62d01cde6f Moves TransportFeedbackAdapter to TaskQueue.
Bug: webrtc:9883
Change-Id: Id87e281751d98043f4470df5a71d458f4cd654c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158793
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30037}
2019-12-09 10:38:54 +00:00
Markus Handell
486cc55a02 TimeController: Rename Sleep to AdvanceTime.
This change renames TimeController's Sleep method to AdvanceTime, unifying
the same name with the same semantic as for downstream projects.

Bug: webrtc:11154
Change-Id: Id79bcf0eafcd0b47a76407ba220479d84df5a736
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161092
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29989}
2019-12-03 16:08:54 +00:00
Erik Språng
00cc836fcf Makes all of RtpVideoSenderTest use simulated time
RtpVideoSenderTest used a SimulatedClock but the task queue factor still
looked at the real-time clock when posting delayed tasks.
This CL changes that so everything is using simulated time, which makes
test faster and should avoid flakiness.
In particular, fixing this timing issue exposed flaws in
DoesNotRetrasmitAckedPackets, which was likely the root case of bug
10873, so let's re-enable on ios again.

Bug: webrtc:10873,webrtc:10809
Change-Id: If8a0c244b1a34f7427543deaa2431ab1e9f124a6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160404
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29897}
2019-11-25 12:13:38 +00:00
Erik Språng
662678dbf7 Adds injectable trials from peerconnection down to transport controller.
This will be immediately useful to guarantee consistent state across
components referencing the pacer, but will be a net benefit overall
imo.

Bug: webrtc:10809
Change-Id: I49630696f757a832ccf2e4c8597193bf087ce53b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159885
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29859}
2019-11-21 12:41:45 +00:00