This is a reland of https://codereview.webrtc.org/2434073003/ including
some fixes for failing test cases.
Original description:
Extract bitrate allocation of spatial/temporal layers out of codec impl.
This CL makes a number of intervowen changes:
* Add BitrateAllocation struct, that contains a codec independent view
of how the target bitrate is distributed over spatial and temporal
layers.
* Adds the BitrateAllocator interface, which takes a bitrate and frame
rate and produces a BitrateAllocation.
* A default (non layered) implementation is added, and
SimulcastRateAllocator is extended to fully handle VP8 allocation.
This includes capturing TemporalLayer instances created by the
encoder.
* ViEEncoder now owns both the bitrate allocator and the temporal layer
factories for VP8. This allows allocation to happen fully outside of
the encoder implementation.
This refactoring will make it possible for ViEEncoder to signal the
full picture of target bitrates to the RTCP module.
BUG=webrtc:6301
Review-Url: https://codereview.webrtc.org/2488833004
Cr-Commit-Position: refs/heads/master@{#15023}
This is not the right place for a SequencedTaskChecker, as we can
not make any guarantees about the thread this method runs on.
We were hitting this check on Android and iOS whenever the encoder
would be reconfigured. Access to these ivars should be guarded
by a lock.
As a bonus, an unused method declaration was removed.
BUG=webrtc:6686
Review-Url: https://codereview.webrtc.org/2495483002
Cr-Commit-Position: refs/heads/master@{#15019}
This CL adds the ability for RTPSenderVideo to generate and send
FlexFEC packets.
BUG=webrtc:5654
Review-Url: https://codereview.webrtc.org/2490523002
Cr-Commit-Position: refs/heads/master@{#15016}
Reason for revert:
This CL probably broke Chromium FYI.
Original issue's description:
> Stop caching supported codecs in WebRtcVideoEngine2
>
> We currently cache the result of GetSupportedCodecs in a member variable
> |video_codecs_| in WebRtcVideoEngine2. This means we need to keep
> |video_codecs_| and the result of GetSupportedCodecs in sync, which is
> error prone. It's simpler to just call GetSupportedCodecs when we need
> it, and we actually end up making fewer calls, so it's faster as well.
> This CL also returns all std::vectors by-value instead of by-ref. Move
> semantic together with in-place filtering of codecs actually end up with
> fewer copies, and it's also simpler to not return references.
>
> BUG=webrtc:6337
>
> Committed: https://crrev.com/9f71ec5a3e3175751f4475b126cfda89767363f2
> Cr-Commit-Position: refs/heads/master@{#15007}
TBR=tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6337
Review-Url: https://codereview.webrtc.org/2489173004
Cr-Commit-Position: refs/heads/master@{#15014}
This completes the privatization of the codec specific
information in VideoCodec.
BUG=webrtc:6603
Review-Url: https://codereview.webrtc.org/2452963002
Cr-Commit-Position: refs/heads/master@{#15013}
There are currently two nearly identical classes called
MockAudioTransport defined in two unit tests:
android/audio_transport_unittest.cc and
/ios/audio_transport_unittest_ios.cc
This change defines a common mocked AudioTransport. The two current
mocks are rewritten to use the common one. A GN target is created for
this mock and MockAudioDevice.
This change will allow to provide a mocked AudioTransport to
AudioState in a dependent CL https://codereview.webrtc.org/2454373002/
BUG=webrtc:6346
NOPRESUBMIT=True
Review-Url: https://codereview.webrtc.org/2493483002
Cr-Commit-Position: refs/heads/master@{#15010}
We currently cache the result of GetSupportedCodecs in a member variable
|video_codecs_| in WebRtcVideoEngine2. This means we need to keep
|video_codecs_| and the result of GetSupportedCodecs in sync, which is
error prone. It's simpler to just call GetSupportedCodecs when we need
it, and we actually end up making fewer calls, so it's faster as well.
This CL also returns all std::vectors by-value instead of by-ref. Move
semantic together with in-place filtering of codecs actually end up with
fewer copies, and it's also simpler to not return references.
BUG=webrtc:6337
Review-Url: https://codereview.webrtc.org/2492473002
Cr-Commit-Position: refs/heads/master@{#15007}
This change removes references of ScreenCapturer and WindowCapturer from WebRTC.
So after this change, ScreenCapturer and WindowCapturer classes can be entirely
removed.
BUG=webrtc:6513
Review-Url: https://codereview.webrtc.org/2489943004
Cr-Commit-Position: refs/heads/master@{#15006}
Some applications explicitly require RFC3550 style RTP without ICE.
Port number requirement of RFC3550 section 11 will be addressed in a follow-up CL.
BUG=webrtc:6436
Review-Url: https://codereview.webrtc.org/2377883003
Cr-Commit-Position: refs/heads/master@{#15005}
ARDMediaConstraintsModel -> ARDSettingsModel
ARDMediaConstraintsSettingsStore -> ARDSettingsStore
ARDMediaConstraintsModelTests -> ARDSettingsModelTests
Both classes will be used to storing other settings as well, so we need a
more appropriate naming.
BUG=webrtc:6654
Review-Url: https://codereview.webrtc.org/2479153002
Cr-Commit-Position: refs/heads/master@{#15002}
Reason for revert:
Breaks perf tests.
Original issue's description:
> Extract bitrate allocation of spatial/temporal layers out of codec impl.
>
> This CL makes a number of intervowen changes:
>
> * Add BitrateAllocation struct, that contains a codec independent view
> of how the target bitrate is distributed over spatial and temporal
> layers.
>
> * Adds the BitrateAllocator interface, which takes a bitrate and frame
> rate and produces a BitrateAllocation.
>
> * A default (non layered) implementation is added, and
> SimulcastRateAllocator is extended to fully handle VP8 allocation.
> This includes capturing TemporalLayer instances created by the
> encoder.
>
> * ViEEncoder now owns both the bitrate allocator and the temporal layer
> factories for VP8. This allows allocation to happen fully outside of
> the encoder implementation.
>
> This refactoring will make it possible for ViEEncoder to signal the
> full picture of target bitrates to the RTCP module.
>
> BUG=webrtc:6301
>
> Committed: https://crrev.com/8f46c679d24a05b3f08e02c6d91ec9637f34e24f
> Cr-Commit-Position: refs/heads/master@{#14998}
TBR=stefan@webrtc.org,perkj@webrtc.org,mflodman@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6301
Review-Url: https://codereview.webrtc.org/2489843002
Cr-Commit-Position: refs/heads/master@{#15001}
This CL makes a number of intervowen changes:
* Add BitrateAllocation struct, that contains a codec independent view
of how the target bitrate is distributed over spatial and temporal
layers.
* Adds the BitrateAllocator interface, which takes a bitrate and frame
rate and produces a BitrateAllocation.
* A default (non layered) implementation is added, and
SimulcastRateAllocator is extended to fully handle VP8 allocation.
This includes capturing TemporalLayer instances created by the
encoder.
* ViEEncoder now owns both the bitrate allocator and the temporal layer
factories for VP8. This allows allocation to happen fully outside of
the encoder implementation.
This refactoring will make it possible for ViEEncoder to signal the
full picture of target bitrates to the RTCP module.
BUG=webrtc:6301
Review-Url: https://codereview.webrtc.org/2434073003
Cr-Commit-Position: refs/heads/master@{#14998}
Reason for revert:
Reland
Original issue's description:
> Revert of Add bitrate section to settings view controller. (patchset #1 id:1 of https://codereview.webrtc.org/2473783003/ )
>
> Reason for revert:
> The usage of UIKeyboardTypeASCIICapableNumberPad enum (available only for iOS 10.0), is breaking the build of AppRTCMobile on devices with lesser os.
> To re-land the UIKeyboardTypeASCIICapableNumberPad should be replaced with UIKeyboardTypeNumberPad
>
> Original issue's description:
> > Add bitrate section to settings view controller.
> >
> > BUG=webrtc:6654
> >
> > Committed: https://crrev.com/3babb99039478c36be58171c5409eac07ae153e5
> > Cr-Commit-Position: refs/heads/master@{#14952}
>
> TBR=magjed@webrtc.org,kthelgasson@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6654
>
> Committed: https://crrev.com/40532a164663f03b812ec7ccc893da7a4bdc26d3
> Cr-Commit-Position: refs/heads/master@{#14972}
TBR=magjed@webrtc.org,kthelgasson@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6654
Review-Url: https://codereview.webrtc.org/2482403002
Cr-Commit-Position: refs/heads/master@{#14996}
Reason for revert:
Fix gyp build
Original issue's description:
> Revert of Add a webrtc{en,de}coderfactory implementation for VideoToolbox (patchset #2 id:20001 of https://codereview.webrtc.org/2463313002/ )
>
> Reason for revert:
> Broke dependent project because the .gn changes weren't accompanied by corresponding .gyp changes.
>
> Original issue's description:
> > Add a webrtc{en,de}coderfactory implementation for VideoToolbox
> >
> > This CL removes the coupling of the VideoToolbox h264 implementation
> > to the generic h264 code. The files have been moved into sdb/obj/Framework
> > and all dependency on them has been removed from the rest of WebRTC.
> > We now add it as an external encoder via a factory supplied to the
> > CreatePeerConnectionFactory call. This also brings the iOS implementation
> > closer to what we do on Android for MediaCodec.
> >
> > BUG=webrtc:6619
> >
> > Committed: https://crrev.com/6a5047dad31f14f53dd9f8bc1ecde19e1dede2e4
> > Cr-Commit-Position: refs/heads/master@{#14953}
>
> TBR=magjed@webrtc.org,stefan@webrtc.org,kthelgason@webrtc.org
> BUG=webrtc:6619
>
> Committed: https://crrev.com/d69ad84420d9c0e1c11450c352f6c92e7c9583f1
> Cr-Commit-Position: refs/heads/master@{#14985}
R=magjed@webrtc.orgTBR=kwiberg@webrtc.org, magjed@webrtc.org, stefan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6619
Review URL: https://codereview.webrtc.org/2487723004 .
Cr-Commit-Position: refs/heads/master@{#14992}
When the selected connection becomes not receiving and there are many connections,
If we use a round-robin fashion to ping all connections, none of the connections will
be in receiving state for sufficient long time to ensure switching connections promptly.
Triggered check will help in this situation to some extent but it may still fail to switch promptly when there are a lot of connections.
With this CL, if the selected connection is weak, once we find a writable connection on a network we start to ping it with a higher priority to keep it in receiving state.
Plus, if the selected connection is weak, we choose a shorter ping interval (900ms) for all writable connections.
BUG=b/32022719
Review-Url: https://codereview.webrtc.org/2369963004
Cr-Commit-Position: refs/heads/master@{#14991}
Using rtc::PacketTransportInterface instead of cricket::TransportChannel
is a preparation for refactoring channel.cc.
BUG=webrtc:6676
Review-Url: https://codereview.webrtc.org/2483093003
Cr-Commit-Position: refs/heads/master@{#14989}
This is a trivial but dangerous change to remove X11/Xlib.h out of
shared_x_display.h. Since we do not have a strict and automatically
Include-What-You-Use rule, I cannot quite tell whether any Chromium source files
wrongly assume X11/Xlib.h will be included through shared_x_display.h. We can
fix the breaks in Chromium after this change has been failed to integrate to
Chromium.
BUG=webrtc:6513
Review-Url: https://codereview.webrtc.org/2482963003
Cr-Commit-Position: refs/heads/master@{#14987}
Reason for revert:
Broke dependent project because the .gn changes weren't accompanied by corresponding .gyp changes.
Original issue's description:
> Add a webrtc{en,de}coderfactory implementation for VideoToolbox
>
> This CL removes the coupling of the VideoToolbox h264 implementation
> to the generic h264 code. The files have been moved into sdb/obj/Framework
> and all dependency on them has been removed from the rest of WebRTC.
> We now add it as an external encoder via a factory supplied to the
> CreatePeerConnectionFactory call. This also brings the iOS implementation
> closer to what we do on Android for MediaCodec.
>
> BUG=webrtc:6619
>
> Committed: https://crrev.com/6a5047dad31f14f53dd9f8bc1ecde19e1dede2e4
> Cr-Commit-Position: refs/heads/master@{#14953}
TBR=magjed@webrtc.org,stefan@webrtc.org,kthelgason@webrtc.org
BUG=webrtc:6619
Review-Url: https://codereview.webrtc.org/2483273002
Cr-Commit-Position: refs/heads/master@{#14985}
The new format for plot lines is PLOT <plot_no> <var_name>:<ssrc>@<alg_name> <time> <value>. The var_name is no longer prefixed by the context/tag (which most of the time was just the same as the test name.)
Update plot_dynamics.py script (which didn't work) to visualize the new BWE_TEST_LOGGING_PLOT lines.
BUG=webrtc:6621
Review-Url: https://codereview.webrtc.org/2456373002
Cr-Commit-Position: refs/heads/master@{#14983}
This change changes mixing to be done at the lowest possible
APM-native rate that does not lead to quality loss. An Audio
Processing-native rate is one of 8, 16, 32, or 48 kHz. Mixing at a
lower sampling rate and avoiding resampling can in many cases lead to
big efficiency improvements, as reported by experiments.
This CL also fixes a design issue with the AudioMixer: audio at
non-native rates is no longer fed to the APM instance which is the
limiter.
NOTRY=True
BUG=webrtc:6346
Review-Url: https://codereview.webrtc.org/2458703002
Cr-Commit-Position: refs/heads/master@{#14980}
Not all members are collected by RTCStatsCollector and detached tracks
are not visible in the returned stats. This needs to be addressed before
closing crbug.com/660827 and crbug.com/659137
BUG=chromium:660827, chromium:659137, chromium:627816
Review-Url: https://codereview.webrtc.org/2467873005
Cr-Commit-Position: refs/heads/master@{#14978}
I have no idea how bad it is that we're hitting this limit; I'm just
doing this to stop the tests from flaking.
BUG=webrtc:6484
Review-Url: https://codereview.webrtc.org/2477663002
Cr-Commit-Position: refs/heads/master@{#14974}
The audio_device_module field was currently unused. The audio_mixer
field is going to be used to pass an AudioMixer to AudioState.
In the hopefully-not-very-far future, the toplevel WebRTC API will allow passing
a custom AudioMixer, e.g. for spatialized audio (audio in space). If no
mixer is passed, a default mixer is created (the one in modules/audio_mixer).
The only object which will have a permanent reference to the mixer is AudioState.
AudioState is created in WebRTCVoiceEngine with a configuration object,
which already contains a VoiceEngine pointer. In this CL, we extend this
config object with a mixer pointer.
In summary: in an upcoming CL, a mixer will be either created in or passed to
WebRTCVoiceEngine. This mixer will be passed to the ctor of AudioState in a
config struct.
BUG=webrtc:6346
NOTRY=True
Review-Url: https://codereview.webrtc.org/2456363002
Cr-Commit-Position: refs/heads/master@{#14973}
Reason for revert:
The usage of UIKeyboardTypeASCIICapableNumberPad enum (available only for iOS 10.0), is breaking the build of AppRTCMobile on devices with lesser os.
To re-land the UIKeyboardTypeASCIICapableNumberPad should be replaced with UIKeyboardTypeNumberPad
Original issue's description:
> Add bitrate section to settings view controller.
>
> BUG=webrtc:6654
>
> Committed: https://crrev.com/3babb99039478c36be58171c5409eac07ae153e5
> Cr-Commit-Position: refs/heads/master@{#14952}
TBR=magjed@webrtc.org,kthelgasson@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6654
Review-Url: https://codereview.webrtc.org/2488653002
Cr-Commit-Position: refs/heads/master@{#14972}
The BitrateEstimatorTest contains code to initialize an AudioState
instance and an AudioReceiveStream. That code is never run, and is
deleted in this CL.
NOTRY=True
BUG=webrtc:6346
Review-Url: https://codereview.webrtc.org/2479383003
Cr-Commit-Position: refs/heads/master@{#14971}
Moving one of the targets that shouldn't pollute the already large
webrtc/BUILD.gn file.
BUG=webrtc:6440
NOTRY=True
Review-Url: https://codereview.webrtc.org/2440963002
Cr-Commit-Position: refs/heads/master@{#14970}