Commit Graph

30862 Commits

Author SHA1 Message Date
1b8ef63876 Add an optional override for AudioRecord device
This is important when we have multiple named devices connected over
USB (eg. "Webcam", "Microphone", "Headset") and there is some way to
choose a specific input device to route from.

Bug: b/154440591
Change-Id: I8dc1801a5e4db7f7bb439e855d43897c1f7d8bc4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173748
Commit-Queue: Robin Lee <rgl@google.com>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31130}
2020-04-24 17:24:54 +00:00
c8660b1650 Open visibility of some PC level framework components
Bug: webrtc:11479
Change-Id: I10567f2766e30825b4d28133002e04dcd0afba21
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173901
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31129}
2020-04-24 16:27:44 +00:00
3e1ac54407 Refactor video dumping and rendering in PC level test.
Move creation of video sinks for dumping and showing rendered video on
screen into video quality analyzer injection helper to eliminate need
to search for video config in on track callback, which makes this more
reliable and reusable.

Bug: webrtc:11479
Change-Id: I6bb5409688fd39268f9f97bde4c9b0833a64396b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173820
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31128}
2020-04-24 09:59:50 +00:00
90ecee1ed9 Make AudioEncoder::GetFrameLengthRange() pure virtual.
In order for WebRTC to be able to include packet overhead in its
bitrate calculations, the AudioEncoder::GetFrameLengthRange()
function must be implemented by all audio encoders. Making this
member function pure virtual as per the following PSA:

https://groups.google.com/forum/#!topic/discuss-webrtc/qscwYr38je0

Bug: webrtc:11427
Change-Id: I30d297ef05f57453bfc257624729559057cad118
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171517
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31127}
2020-04-24 09:22:57 +00:00
cda577fd59 Enable simulcast statistics
Bug: webrtc:9547
Change-Id: I8b2920dacfac0085449a797f2831b86e2e5e65b5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173749
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Eldar Rello <elrello@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#31126}
2020-04-24 08:32:13 +00:00
1fb4a05e9e Reland "Launch external ref control for vp9 encoder"
This reverts commit 9665b7d1017bc5b44ffe550c4625921d0315df90.

Reason for revert: Fixes are in the PS#2

Original change's description:
> Revert "Launch external ref control for vp9 encoder"
> 
> This reverts commit 9427b51d6ff50af73c217cb725b1c59b9d701796.
> 
> Reason for revert: Breaks downstream tests
> 
> Original change's description:
> > Launch external ref control for vp9 encoder
> > 
> > Change field trial condition to killswitch instead.
> > 
> > Finch trial is going to 100% public today.
> > 
> > Bug: chromium:1027108,webrtc:11319
> > Change-Id: I29494a7c8515a454706983dd15ae444d3f85271f
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173752
> > Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> > Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31122}
> 
> TBR=ilnik@webrtc.org,ssilkin@webrtc.org
> 
> Change-Id: I44436febb2b646cdd350fa9afee1c3a7ea307d04
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:1027108, webrtc:11319
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173761
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31123}

TBR=ilnik@webrtc.org,ssilkin@webrtc.org

Change-Id: I8aed0edca2015297da512aa084515812103c6f48
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1027108, webrtc:11319
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173780
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31125}
2020-04-23 13:21:45 +00:00
e110a44628 Delete uri for the Generic Frame Descriptor v1
Bug: webrtc:11358
Change-Id: I0c3c3a7f682f172b92dcdcbc6c13d353e1e48ada
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173747
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31124}
2020-04-23 12:44:03 +00:00
9665b7d101 Revert "Launch external ref control for vp9 encoder"
This reverts commit 9427b51d6ff50af73c217cb725b1c59b9d701796.

Reason for revert: Breaks downstream tests

Original change's description:
> Launch external ref control for vp9 encoder
> 
> Change field trial condition to killswitch instead.
> 
> Finch trial is going to 100% public today.
> 
> Bug: chromium:1027108,webrtc:11319
> Change-Id: I29494a7c8515a454706983dd15ae444d3f85271f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173752
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31122}

TBR=ilnik@webrtc.org,ssilkin@webrtc.org

Change-Id: I44436febb2b646cdd350fa9afee1c3a7ea307d04
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1027108, webrtc:11319
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173761
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31123}
2020-04-23 09:25:19 +00:00
9427b51d6f Launch external ref control for vp9 encoder
Change field trial condition to killswitch instead.

Finch trial is going to 100% public today.

Bug: chromium:1027108,webrtc:11319
Change-Id: I29494a7c8515a454706983dd15ae444d3f85271f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173752
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31122}
2020-04-23 09:03:06 +00:00
f4ee036871 [InsertableStreams] Clear callback to audio receive channel in delegate.
Reset the frame transformer delegate's callback to
ChannelReceive::OnReceivedPayloadData when the channel is destroyed, to
prevent future callbacks from the delegate.

Bug: chromium:870644
Change-Id: Iaa2c1b7b26dc38709d3fe64a180ccc6a60a1ec9c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173751
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31121}
2020-04-22 18:58:35 +00:00
1120f7d895 Makes the max padding factor default 3.0x
Bug: webrtc:11508
Change-Id: Ib2e8f5216140f55a590f43fc52a50058703cc2bf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173750
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31120}
2020-04-22 10:57:21 +00:00
9ce77fda75 Remove redundant Dcheck in vp9 decoder
Bug: chromium:1070146
Change-Id: Ia4a07cfd16c154e2be3478c020c01fbcaf1c5bb0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173743
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31119}
2020-04-22 09:06:26 +00:00
f355e1a0f6 Add glUseProgram to the list of GL functions requiring synchronization
We have observed an internal deadlock in libGLESv2_adreno where one
thread is in eglCreateContext and another thread in glUseProgram. We
have observed similar deadlocks before and started to synchronize all
access to the offending GL functions. Calls to eglCreateContext are
already synchronized, and this CL synchronizes calls to glUseProgram as
well.

Bug: b/153513005
Change-Id: I576e564aab44c9e429f2b1407105ed72942c309e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173742
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31118}
2020-04-22 07:09:15 +00:00
11f92bc81b Audio ingress implementation for voip api.
This is based on channel_receive.cc implementation where non-audio
related logics are trimmed off for smaller footprint in size.

Bug: webrtc:11251
Change-Id: I743c9f93f509fa6fcc12981fa73a6f01ce38348c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172821
Commit-Queue: Tim Na <natim@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31117}
2020-04-21 20:19:37 +00:00
f2b06ce5c8 Reduces unnecessary thread wakeups in TaskQueuePacedSender.
This CL is functionally a noop but may reduce thread wakupes in some
cases.

In particular, consider a send task scheduled for time T. While waiting
for that, a higher-priority packet than the top of the current queue is
added (e.g. an audio packet), and a send is executed immediately.

After sending, it resets the field indicating that a scheduled task is
expected at time T. It then polls NextSendTime() and schedules a new
task, likely at or very close to T. Causing unnecessary task queue
churn and behavior that is more difficult to reason about.

Bug: webrtc:10809
Change-Id: Ic5706f2cc06df3f27cc3e7b473d4de29a669473b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173700
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31116}
2020-04-21 17:09:37 +00:00
811efc06df Trigger bots.
TBR=peah@webrtc.org

No-Try: True
Bug: None
Change-Id: I3510de1bcb1a66ec5710bb42e27ac17216fb3579
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173744
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31115}
2020-04-21 13:15:09 +00:00
146137adee Merge OOURA BUILD.gn files.
No-Tree-Checks: True
No-Try: True
Bug: webrtc:11509
Change-Id: If66483a02085396e231986e39ef0dafcdd3f4bed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173740
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31114}
2020-04-21 09:06:37 +00:00
1f0677d01e Remove some TODOs from pc/.
Bug: webrtc:10198
Change-Id: I1782a8ef1248578fcc3ffc8c03b5419225a51350
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173625
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31113}
2020-04-20 23:51:16 +00:00
e50c979811 Exclude frame_analyzer_host build on iOS.
Bug: webrtc:11474
Change-Id: I6d5bc2e079330e371e8199d5602b62a0e36fe75a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173721
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31112}
2020-04-20 21:53:54 +00:00
f0d64a5f9b Reland "Unify OOURA implementations in one directory."
This is a reland of 09b439c6f7fa15d7cedbfb74cc22e9512ce3df47

Original change's description:
> Unify OOURA implementations in one directory.
>
> This CL moves the two OOURA implementations present in the WebRTC tree
> in one place.
>
> No functional change is expected.
>
> TBR=kwiberg@webrtc.org
>
> No-Try: True
> Bug: webrtc:11509
> Change-Id: I330a9ec57e3dc65c9c8b43edd4bb295c55920efa
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173682
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31106}

TBR=kwiberg@webrtc.org, peah@webrtc.org

No-Tree-Checks: True
No-Try: True
Bug: webrtc:11509
Change-Id: Ifc28b0380062ab5aad5c498700aa3cc7f9c7802c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173720
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31111}
2020-04-20 16:08:19 +00:00
dc4f75f7ee [Adaptation] Make ResourceUsageState nullable, remove kStable.
This CL is part of the Call-Level Adaptation Processing design doc:
https://docs.google.com/document/d/1ZyC26yOCknrrcYa839ZWLxD6o6Gig5A3lVTh4E41074/edit?usp=sharing

The ResourceUsageState was written as: {kOveruse, kStable, kUnderuse}.
The assumption was that if a resource neither wanted to adapt up or
down it would report kStable. But with the addition of
Resource::IsAdaptationUpAllowed() (prior CL) the notion of being
"stable" was already captured outside of ResourceUsageState.
Furthermore, kStable failed to capture what IsAdaptationUpAllowed() did
not: whether we can go up depends on the resulting resolution or frame
rate (restrictions_after). Perhaps we can go up a little, but not a lot.

This CL also adds Resource::ClearUsageState(). After applying an
adaptation, all usage states become invalidated (new measurements are
needed to know if we are still over- or underusing). This was always
the case, but prior to this CL this was not accurately reflected in the
Resource::usage_state() in-between measurements.

Bug: webrtc:11172
Change-Id: I140ff3114025b7732e530564690783e168d2509b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173088
Reviewed-by: Evan Shrubsole <eshr@google.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31110}
2020-04-20 10:54:53 +00:00
4c3a7dbe14 Remove RtpVideoHeader::discardable flag.
Calculate it when used instead

Bug: webrtc:11358
Change-Id: Ib79a4ce5e48a1a5244925471c005f96c5ec5dfd0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173702
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31109}
2020-04-20 10:25:43 +00:00
cbc0cbaaec Updates RtpVideoSender to populate RtpRtcp::Config.field_trials
This caused at least one trial in RTPSender not to be properly parsed.

This CL also updates RtpVideoSender and RtpPayloadParams to use
WebRtcKeyValueConfig instead of the static field_trial methods, in
order to facilitate injectable behavior in the future.

Bug: webrtc:11508
Change-Id: I995939bd3e7c2f81e5050383c3e4daf933498520
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173705
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31108}
2020-04-20 09:53:58 +00:00
ed005be788 Revert "Unify OOURA implementations in one directory."
This reverts commit 09b439c6f7fa15d7cedbfb74cc22e9512ce3df47.

Reason for revert: Breaks downstream project. Will reland tomorrow.

Original change's description:
> Unify OOURA implementations in one directory.
> 
> This CL moves the two OOURA implementations present in the WebRTC tree
> in one place.
> 
> No functional change is expected.
> 
> TBR=kwiberg@webrtc.org
> 
> No-Try: True
> Bug: webrtc:11509
> Change-Id: I330a9ec57e3dc65c9c8b43edd4bb295c55920efa
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173682
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31106}

TBR=mbonadei@webrtc.org,peah@webrtc.org,kwiberg@webrtc.org

Change-Id: I41acf34aef6497adfa7750223acbcc3725db6feb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11509
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173706
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31107}
2020-04-19 09:59:52 +00:00
09b439c6f7 Unify OOURA implementations in one directory.
This CL moves the two OOURA implementations present in the WebRTC tree
in one place.

No functional change is expected.

TBR=kwiberg@webrtc.org

No-Try: True
Bug: webrtc:11509
Change-Id: I330a9ec57e3dc65c9c8b43edd4bb295c55920efa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173682
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31106}
2020-04-18 17:52:53 +00:00
87eece9421 [Adaptation] Introducing call/adaptation/ResourceAdaptationProcessor.
This CL is part of the Call-Level Adaptation Processing design doc:
https://docs.google.com/document/d/1ZyC26yOCknrrcYa839ZWLxD6o6Gig5A3lVTh4E41074/edit?usp=sharing

This gets to the heart of unblocking call-level adaptation, largely
made possible due to the previous CLs in the chain.

The parts of the code that are responsible for responding to resource
usage signals, obtaining adaptations and applying them are moved to
ResourceAdaptationProcessor in call/adaptation/.

The parts of the code that are responsible for managing
VideoStreamEncoder-specific resources stay inside the
VideoStreamEncoderResourceManager class in video/adaptation/.

After this CL lands it should soon be possible to move the Processor
over to a separate task queue and let the Manager stay on the encoder
queue if PostTasks are added for communication between the two objects.

Bug: webrtc:11172
Change-Id: Ifa212467b4afd16e7ebfb9adfe17d2dca1cb7d67
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173021
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31105}
2020-04-17 16:39:21 +00:00
de8d551b95 [Adaptation] Rename the processor "VideoStreamEncoderResourceManager".
This CL is part of the Call-Level Adaptation Processing design doc:
https://docs.google.com/document/d/1ZyC26yOCknrrcYa839ZWLxD6o6Gig5A3lVTh4E41074/edit?usp=sharing

This CL is a pure rename CL.
The next CL split this class up into a "Manager" part and a "Processor"
part. By doing the renaming separately, reviewing of the next CL should
be easier.

Bug: webrtc:11172
Change-Id: I2d5bac049b4bb88d4f947f8c4dc61e2131164a59
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173020
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#31104}
2020-04-17 16:09:11 +00:00
d2930c6c2b [Adaptation] Report AdaptationCounters OnVideoSourceRestrictionsUpdated.
This CL is part of the Call-Level Adaptation Processing design doc:
https://docs.google.com/document/d/1ZyC26yOCknrrcYa839ZWLxD6o6Gig5A3lVTh4E41074/edit?usp=sharing

By pushing VideoAdaptationCounters updates on VideoSourceRestrictions
changes, alongside the Resource* that triggered the adaptation, we are
able to update |active_counts_| without an explicit dependency on the
VideoStreamAdapter. This allows a future CL to split up "processor"
logic from "video stream encoder resource and active counts" logic,
which will ultimately be necessary in order to do processing on a
"processing queue" and encoder and stats logic on the "encoder queue".

If the restrictions got cleared by an API call
(ResetVideoSourceRestrictions() or SetDegradationPreference()) we pass
null as the "reason_resource". This allows is to clear the
active_counts_, and the code that invokes
OnVideoSourceRestrictionsUpdated() does not have to be aware of
active_counts_ (needed to split the processor module in two).

Bug: webrtc:11172
Change-Id: Icab6d5121c0ebd27d2a00f1bffc8191f8f05f562
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173000
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#31103}
2020-04-17 15:10:15 +00:00
00032698ac Clean up old GoPs when the RTP sequence number jump.
Bug: chromium:1065699
Change-Id: I2ed853559858ef82c6eb03b366cd77e8b3b0e799
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173703
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31102}
2020-04-17 14:33:45 +00:00
ee0864364d Remove DetermineIceRole workaround.
Bug: webrtc:10198, chromium:628676
Change-Id: I65a57a2d23b714f9cdddc9122f4b50d523d04dfa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173337
Reviewed-by: Taylor <deadbeef@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31101}
2020-04-17 13:48:35 +00:00
1d76654e21 [Adaptation] Move VideoStreamAdapter to call/adaptation/.
This CL is part of the Call-Level Adaptation Processing design doc:
https://docs.google.com/document/d/1ZyC26yOCknrrcYa839ZWLxD6o6Gig5A3lVTh4E41074/edit?usp=sharing

This is a pure move CL. In the future, the Processor will live in
call/adaptation/. This prevents circular dependencies.

Bug: webrtc:11172
Change-Id: Ib72503cc20e27ab6425538e3d55930c65e0b4a90
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172931
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#31100}
2020-04-17 13:23:42 +00:00
b613e3ab6b [Adaptation] Resource::IsAdaptationUpAllowed() for IsBitrateConstrained.
This CL is part of the Call-Level Adaptation Processing design doc:
https://docs.google.com/document/d/1ZyC26yOCknrrcYa839ZWLxD6o6Gig5A3lVTh4E41074/edit?usp=sharing

The VideoStreamAdapter is currently responsible for aborting and not
providing adaptations if we are bitrate constrained
(kIsBitrateConstrained). Whether or not we are bitrate constrained is
clearly a resource question and should be phrased as such. By moving
this logic to Resource::IsAdaptationUpAllowed(), the VideoStreamAdapter
can continue to be thread-agnostic when a future CL introduces a
"processing queue", and the VideoStreamAdapter can be simplified: it
returns Adaptations even if we are constrained (but we refuse to Apply
them any resource rejects it).

This CL adds new Resource classes as inner classes of
ResourceAdaptationProcessor that take on the responsibility of
kIsBitrateConstrained logic:
PreventIncreaseResolutionDueToBitrateResource and
PreventAdaptUpInBalancedResource.

A third class, PreventAdaptUpDueToActiveCounts, also allows us to move
adaptation-aborting logic. This piece of code appears to be about not
adapting up if we’re already at the highest setting, which would be
VideoStreamAdapter responsibility (covered by
Adaptation::Status::kLimitReached), but it is actually more complicated
than that: the active_counts_ care about "reason", so it is really about
"is this resource type OK with you adapting up?". We should probably
rewrite this code in the future, but for now it is moved to an inner
class of ResourceAdaptationProcessor.

Other misc changes:
- ApplyDegradationPreference is moved to video_stream_adapter.[h/cc]
  and renamed "Filter".
- OnResourceOveruse/Underuse now use Resource* as the reason instead of
  AdaptReason. In a future CL, the processor will be split into a
  "processor" part and a "video stream encoder resource manager" part.
  Only the manager needs to know about AdaptReason since this is only
  used for |active_counts_| and we want to get rid of it as much as
  possible as it is not future-proof.

Bug: webrtc:11172
Change-Id: I2eba9ec3d717f7024c451aeb14635fe759551318
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172930
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#31099}
2020-04-17 12:35:18 +00:00
d516b25852 [Adaptation] Introduce VideoStreamInputState and its Provider.
This CL is part of the Call-Level Adaptation Processing design doc:
https://docs.google.com/document/d/1ZyC26yOCknrrcYa839ZWLxD6o6Gig5A3lVTh4E41074/edit?usp=sharing

The "input state" of a VideoStream, needed for adaptation and
decision-making, are: source resolution and frame rate, codec type and
min pixels per frame (based on encoder scaling settings). These values
are modified on the encoder queue of the VideoStreamEncoder.

But in order to unblock call-level adaptation processing, where
adaptation and decision making happens off the encoder queue, a snapshot
of the input states need to be available at point of processing:
introducing the VideoStreamInputState.

In this CL, the VideoStreamInputStateProvider is added to provide input
state snapshots across threads based on input from VideoStreamEncoder
and VideoStreamEncoderObserver.

The input state's HasInputFrameSizeAndFramesPerSecond() can now be
DCHECKed inside the VideoStreamAdapter in favor of having less
Adaptation::Status codes. Whether input is "sufficient" for adaptation
is now the responsibility of the Processor. (Goal: adapter is purely a
Adaptation generator and apply-er.)

Somewhat tangental, this CL also deletes VideoStreamEncoder-specific
methods from ResourceAdaptationProcessorInterface making them an
implementation detail of ResourceAdaptationProcessor. In a future CL,
the "processor" will be split up into a "processor" part and a "video
stream encoder resource manager" part - more on that later.

Bug: webrtc:11172
Change-Id: Id9b158f569db0140b75360aaf0f7e2e28fb924f4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172928
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#31098}
2020-04-17 11:45:50 +00:00
da6cda839d Improve outbound-rtp statistics for simulcast
Bug: webrtc:9547
Change-Id: Iec4eb976aa11ee743805425bedb77dcea7c2c9be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168120
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Eldar Rello <elrello@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#31097}
2020-04-17 11:28:00 +00:00
1261b5caa3 [Adaptation] Move EffectiveDegradationPreference to RA-Processor.
This CL is part of the Call-Level Adaptation Processing design doc:
https://docs.google.com/document/d/1ZyC26yOCknrrcYa839ZWLxD6o6Gig5A3lVTh4E41074/edit?usp=sharing

The VideoStreamAdapter is responsible for generating adaptation
suggestions according to its DegradationPreference. Today there is one
DegradationPreference that you set, but internally the preference it
uses to make decisions is EffectiveDegradationPreference() which
reinterprets “balanced” as “maintain-resolution” if screenshare is used.

By moving the “effective” logic to the ResourceAdaptationProcessor, the
VideoStreamAdapter will not need to know about the type of track, and
the responsibility of the adapter is minimized. The “effective” logic
is non-standard and something we want to get rid of - until then, it
should be the responsibility of the processor to configure the adapter
to use the appropriate strategy, rather than for the adapter to know
about more states of the system than it needs to.

Future CLs will further minimize what the adapter needs to know, moving
"decision-making" logic to the Processor and "is adapt up allowed?"
logic to the Resources.

By removing the VideoInputMode enum the VideoStreamAdapter does not
know if we have input which has to be checked externally. Input
handling is followed-up on in the next CL.

Bug: webrtc:11172
Change-Id: I37ec9e7392f835cf8fef9829a2c945183f0e9b65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172927
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#31096}
2020-04-17 09:40:47 +00:00
2c80923230 Remove WebRTC-LibvpxVp{8,9}TrustedRateController.
Bug: webrtc:11503
Change-Id: I58704606a109a9f6a5dbc1bfd59ca76fa8c23d65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173479
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31095}
2020-04-17 09:17:57 +00:00
67402f8114 [Adaptation] Delete Processor Proof-of-Concept.
This CL is part of the Call-Level Adaptation Processing design doc:
https://docs.google.com/document/d/1ZyC26yOCknrrcYa839ZWLxD6o6Gig5A3lVTh4E41074/edit?usp=sharing

The POC was used to demo the new design but was never used outside of
unit tests. The plan being to iteratively improve the
ResourceAdaptationProcessor rather than to replace it, we delete the POC
classes to avoid bloat and conflicts.

Bug: webrtc:11172
Change-Id: Ic49afdc471d2d774541f8ef3316b4c6d0a9b8a14
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172923
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31094}
2020-04-17 09:11:47 +00:00
29cf2b0cbb Fix link to prerequisite SW for Android development.
TBR: doudouk@google.com
No-Try: True
Bug: None
Change-Id: I59785940d05785c33c63e47e2681927086d9f793
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173701
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31093}
2020-04-17 08:32:06 +00:00
4479a822c0 Remove deprecated SSLIdentity methods that return raw pointers.
Bug: webrtc:11410
Change-Id: I40e5549cb7c1082eebd870e0f133a3be0918dcaf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173571
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31092}
2020-04-16 20:56:25 +00:00
9acc18d1fe Makes dynamic pacer select paddig target based on rate.
Today when the pacing debt is cleared, we blindly ask for 50 bytes of
padding, which is above a static magic number for RTX payload padding.

Instead, we should adjust the target size based on the current padding
rate. The old pacer sort-of does this, it allows the budget to grow up
to one process interval (usually 5ms).
This CL makes the dynamic pacer also use a duration as target, by
default 5ms to match old pacer but with a trial to allow tweaking it.

This will be important for good behavior due to
https://bugs.chromium.org/p/webrtc/issues/detail?id=11508

Bug: webrtc:10809
Change-Id: I9c14acc5730c6e2e0d7821adf5fb058b8d5487c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173687
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31091}
2020-04-16 20:01:15 +00:00
6415dcad7a Remove WebRTC-ExperimentalScreenshareSettings.
This field trial is unused.

Bug: webrtc:11503
Change-Id: Id79b0dc64fed3559b9b63ebcf539e5536ddad589
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173339
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31090}
2020-04-16 18:15:08 +00:00
ec9fc2208e Delete generic frame descriptor v1 trait and enum value
Bug: webrtc:11358
Change-Id: I272a45881f8ef9963b502c6d17edc97e7d9fbc8e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173582
Reviewed-by: Markus Handell <handellm@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31089}
2020-04-16 17:29:18 +00:00
efdff53176 Limit BWE drops from probes to 85% of the throughput estimate.
Bug: webrtc:11498
Change-Id: Ia4bb1a3cbde951d7fce5f4408da481ee506f8d21
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173180
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31088}
2020-04-16 14:51:43 +00:00
e886d2ebc3 Limits size of payload padding packets to 2x target size.
This CL also slightly refactors unit test, to test fewer things each.

Bug: webrtc:11508
Change-Id: I98553d2b185364132c626d373683f38891e36c6d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173620
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31087}
2020-04-16 14:50:31 +00:00
b33a0ca1ee Remove deprecated ssl_identity methods
This is a followup to
https://webrtc-review.googlesource.com/c/src/+/170637

Bug: webrtc:11450
Change-Id: I69928ed7236c6a8a569c7dc0383f7debb4408179
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171224
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31086}
2020-04-16 14:21:41 +00:00
5c356bb9b1 Cleanup: Removes unused BBR congestion controller.
This was introduced on trial but turned out to perform badly for WebRTC
purposes and never used in production.

Bug: webrtc:9883
Change-Id: Ib72acddf4d90fc9ac042084dddf526c04661f290
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173680
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31085}
2020-04-16 13:49:00 +00:00
ce0a11d5f9 Unify AdaptationReason and AdaptReason enums.
Moves the unified AdaptationReason to the api/ folder.

Bug: webrtc:11392
Change-Id: I28782e82ef6cc3ca3b061f65b0bbdc3766df1f9c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172583
Commit-Queue: Evan Shrubsole <eshr@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31084}
2020-04-16 13:33:49 +00:00
dff792591f Remove VideoStreamEncoderObserver::AdaptationReason::kNone
Replaces this with 2 methods instead, adding clarity.

ClearAdaptationStats
- Resets the adaptations statistics to 0. This is done,
when the degredation is reset, for example when the preference
is changed to/from BALANCED.

UpdateAdaptationMaskingSettings
- Updates the settings for adaptation statistics reporting.
This way we don't report quality adaptations if quality scaling
is not enabled (same for resolution/fps scaling).

The adaptation counting inside the SendStatisticsProxy is
now done in a struct that counts the totals, and then masks
out these counts based on the adaptation settings. The
MaskedAdaptationSteps uses optionals to hide the values we
shoudn't report, while the AdaptationSteps always hold the real
totals.

All tests have been updated to use the Reset/Clear method as needed.

Now that AdaptationCounters and AdaptSteps use the same structure,
AdaptationCounters was moved to api/video and replaces AdaptSteps.

The AdaptReason enum is also redundant now, and will be removed
in a follow-up CL.

R=hbos@webrtc.org

Bug: webrtc:11392
Change-Id: Iaed6488581325d341a056b5bbf76a01c19d6c282
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171685
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#31083}
2020-04-16 13:27:50 +00:00
d059dfbc06 Fix link in documentation. (take 2)
TBR=peah@webrtc.org

No-Try: True
Bug: None
Change-Id: I7f83fd9e0cbffab5165ef02e63d101308bdf6eb3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173684
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31082}
2020-04-16 11:08:43 +00:00
3c49531fb4 Fix link in documentation.
TBR=peah@webrtc.org

No-Try: True
Bug: None
Change-Id: I454e8fc2b440fb6876f035a5fc69814981effb91
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173683
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31081}
2020-04-16 11:00:53 +00:00