A slight behavior change is that we only increment total samples received when GetAudio is successful.
Bug: webrtc:370424996
Change-Id: I8607418c179ca3bc22963b98792a9e8b9af2d451
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364220
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43139}
This reverts commit 37458ce40a1741f9d5358d49fe49beed20140502.
Reason for revert: Will be wired up as an experiment instead.
Original change's description:
> Per defaul probe max to 2x current BWE if max total allocated bitrate change
>
> This aligns to probe limits in ALR for example.
>
> Bug: webrtc:369044000, b/369021234
> Change-Id: I3823b308cf97a8b7060b35b2ac38864e75d6f983
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363301
> Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> Reviewed-by: Diep Bui <diepbp@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43074}
Bug: webrtc:369044000, b/369021234
Change-Id: I22b457254c9c21d2d951af2bda01a349ef83b3c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364242
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Ranveer Aggarwal <ranvr@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43130}
To force SvcRateAllocator use propagated rather than global field trials
Bug: webrtc:42220378
Change-Id: I0ca3186ee2428aafe3d7f093603b708e03ada121
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362722
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43123}
This reverts commit bdc669347c70160cd648f5cab7a417227d41d82a.
Reason for revert: AUDs will be taken into account now.
video_replay with the provided out.pcap and these options:
--codec H264 --input_file out.pcap --media_payload_type 102 --ssrc 40000
plays smoothly.
Original change's description:
> Revert "h264: fix first_packet_in_frame logic for multislice in a single rtp packet"
>
> This reverts commit 3753c8190e3f0aca6758a5521e33f8b5d4f09ab4.
>
> Reason for revert: Break assembling of hardware encoded h264 P frame on
> weak network condition.
>
> Original change's description:
> > h264: fix first_packet_in_frame logic for multislice in a single rtp packet
> >
> > a frame must be (or should be) first when it contains either SPS (but not just PPS),
> > is an IDR or is a slice with first_mb_in_slice == 0.
> >
> > Fixes an edge case where a STAP-A with SPS, PPS and multiple slices of an IDR fit
> > into a single RTP packet which can happen with small 320x196 frames
> >
> > BUG=webrtc:352379280,webrtc:346608838
> >
> > Change-Id: Ic6dea6c81db759d0d7ddd4054407103fd791f6c5
> > No-Try: true
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357121
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> > Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#42652}
>
> Bug: webrtc:368335257
> Change-Id: I07725c78be628bff71b79b8b9369677e39f5f5ac
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363080
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Philipp Hancke <phancke@meta.com>
> Cr-Commit-Position: refs/heads/main@{#43062}
Bug: webrtc:368335257
Change-Id: Idfae2efc1ebd7b97a2f7ebbd9d1e8c7bf6fcc348
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363842
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43113}
As of [1], a single VP9 encoder instance can produce simulcast 4:2:1.
When it does, the EncodedImage has its simulcast index set (0, 1, 2).
The bug is that if you then go back to a single encoder instance,
either because you're doing singlecast or because you're doing
simulcast with scaling factors that are not power of two (not 4:2:1),
then the simulcast index which was previously set to 2 is not reset due
to the old code path never calling SetSimulcastIndex.
Example repro:
1. Send VP9 simulcast {180p, 360p, 720p}, i.e. 4:2.1.
2. Reconfigure to {180p, 360p, 540p}, i.e. no longer 4:2:1.
What should happen: all three layers are sent.
What actually happened: 180p is not sent and the 540p layer flips flops
between 180p and 540p because the EncodedImage says simulcast index is
2 for both encodings[0] and encodings[2].
The fix is a one-line change: `SetSimulcastIndex(std::nullopt)` in the
case that we don't have a `simulcast_to_svc_converter_` that sets it
(0, 1, 2) for us.
[1] https://webrtc-review.googlesource.com/c/src/+/360280
Bug: chromium:370299916
Change-Id: I52bd4428bd12528f0e98869ec61626c06f589b43
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363941
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43109}
The code now uses NetEq directly instead of AcmReceiver.
Bug: webrtc:14867
Change-Id: I11c7e2ca00060ab15bba5ec67dfd92ec413196f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364140
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43108}
RTCVideoEncoder in chromium use it to generate dependency template
and generic frame info for hw encode accelerators after encoding.
https://chromium-review.googlesource.com/c/chromium/src/+/5849272
Bug: chromium:40763991
Change-Id: I96396ad972bf18790b09508e428c6362aae24a65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362151
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Yingying Ma <yingying.ma@intel.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43087}
Those trigger new warnings when importing the Chromium roll
Bug: None
Change-Id: Ica71cc83f5bbfd8fec4736185d389b9e82f2276e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363740
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43080}
If the upper limit is infinite, dont probe.
Bug: webrtc:42224658
Change-Id: Ia662cceded83969ec11ee013adb2100f983fbd13
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363660
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43079}
Add field trial parameter for setting scale factor of max allocated bitrate used for deciding when to skip probing.
Currently, a factor of 2 is used in most places for max allocated bitrate but not if the field trial skip_estimate_larger_than_fraction_of_max is used.
The purpose of this new field parameter is to be able to harmonize and always use the same factor.
Bug: webrtc:42224658
Change-Id: I5e1580b9bb18ef881b819affc0b4038094e94316
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363400
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43078}
This aligns to probe limits in ALR for example.
Bug: webrtc:369044000, b/369021234
Change-Id: I3823b308cf97a8b7060b35b2ac38864e75d6f983
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363301
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43074}
Ensure probing is not instantiated again until after timeout if a probe has been sent to max rate.
Bug: webrtc:42224658
Change-Id: I7d0d2edcfa81b1b454ea5748962af5a2070b347c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363240
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43068}
We currently specify stream parameters to be a range for both framerate
and resolution, where preferred value is specified. The preferred value
doesn't seem to be taken into account and we end up accepting resolution
from 1x1 to MAX_INTxMAX_INT. In case the other side tries to first match
with lower resolution than requested, we will happily match it and start
streaming low quality video. We should instead request the exact stream
parameters as specified by requested capability. This capability always
come from what has been originally reported as supported so it shouldn't
happen we don't find a matching stream. This also applies to requested
video format. We previously requested mjpg for streams with resolution
higher than 640x480, but it doesn't necessarily mean the camera supports
mjpg for the requested resolution. Again, refer to requested capability
in this case as it should indicate what is supported and we know we can
request exactly the same video format. It can happen that framerate is
set to 0 as unspecified. In that case keep using a range as before, but
with more sane values.
Bug: webrtc:42225999
Change-Id: I46d8e83c636e25e12c45a462596fee1d5e59888e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362820
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Reviewed-by: Andreas Pehrson <apehrson@mozilla.com>
Cr-Commit-Position: refs/heads/main@{#43067}
This reverts commit 3753c8190e3f0aca6758a5521e33f8b5d4f09ab4.
Reason for revert: Break assembling of hardware encoded h264 P frame on
weak network condition.
Original change's description:
> h264: fix first_packet_in_frame logic for multislice in a single rtp packet
>
> a frame must be (or should be) first when it contains either SPS (but not just PPS),
> is an IDR or is a slice with first_mb_in_slice == 0.
>
> Fixes an edge case where a STAP-A with SPS, PPS and multiple slices of an IDR fit
> into a single RTP packet which can happen with small 320x196 frames
>
> BUG=webrtc:352379280,webrtc:346608838
>
> Change-Id: Ic6dea6c81db759d0d7ddd4054407103fd791f6c5
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357121
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42652}
Bug: webrtc:368335257
Change-Id: I07725c78be628bff71b79b8b9369677e39f5f5ac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363080
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43062}
In many cases, the framerate can be specified as list of possible values
and in that case, we would end up with max FPS to be set to 0 as this
case was not handled.
Bug: webrtc:42225999
Change-Id: I036af6db1da3309b1310b754504369e8fe392d09
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362961
Commit-Queue: Jan Grulich <grulja@gmail.com>
Reviewed-by: Andreas Pehrson <apehrson@mozilla.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43057}
Passing Environment instead of Clock into this class simplifies some plumbing for downstream consumers that need to read field trials within this class.
Bug: webrtc:362762208
Change-Id: Ia501e9f7f1d91a8115a2f71fb005dd35146db172
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362535
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43048}
We need to have imported proto as proto_data_sources in BUILD.gn to
run the action remotely without workaround config in siso.
Bug: b/366137880
Change-Id: I053774f00b761520a8a85154e386da3edb8f39b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362680
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Auto-Submit: Takuto Ikuta <tikuta@google.com>
Commit-Queue: Takuto Ikuta <tikuta@google.com>
Cr-Commit-Position: refs/heads/main@{#43040}
Use the DTX state from inside the Opus encoder instead of trying to
mimic the logic outside.
Bug: None
Change-Id: I852044fee261a5b7f9255c557a27adfd0b1701bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362640
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43034}
They are now passed as part of the Environment
Bug: webrtc:362762208
Change-Id: I02868e9f41533a546f62fe30fdc6f3a7708eb346
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362084
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43032}
The class itself and its unit test remains, for now, but will be removed
later.
Bug: webrtc:14867
Change-Id: I36cec8fca7913663f63c53622ed2760e5e048c2f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362580
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43023}
Checks if the DirtyRegionMode property is present in GraphicsCaptureSession and logs a boolean histogram with the result.
Detecting support for this property means that the WGC API supports
dirty regions and it can be utilized to improve the capture
performance and the existing zero-herz support.
See also https://issues.chromium.org/issues/347991512 for more details
on how to detect support for dirty regions in WGC.
Bug: chromium:40259177
Change-Id: Ia316c4ece54bd93cfef1fa23c199675c64143f76
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362240
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43015}
AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR was added in https://aomedia-review.googlesource.com/c/aom/+/192402. It allows to configure max number of consecutive frame drops using time units. Use it instead of AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.
Bug: webrtc:351644568
Change-Id: I73265d5258d681926eb5b65e32c2a61b26c310ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360842
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42995}
to avoid relying on the global field trials.
Bug: webrtc:362762208
Change-Id: I94e96f0a3f16cfd64f7deb4deb4aaa924ac1bba8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361865
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42982}
SvcRateAllocator assumed no temporal layering for screencast content and allocated all bitrate to base temporal layer. Now it distributes bitrate to spatial and temporal layers (if configured) no matter of content type.
Bug: webrtc:351644568, b/364190191
Change-Id: I445f0157d2c14cad033648693dc0564ae97023e9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362080
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42979}
ChannelReceive is now owning and interfacing with NetEq directly.
A new ResamplerHelper is added to acm_resampler.cc/.h, to do the
audio resampling that was previously done inside AcmReceiver.
AcmReceiver still remains, since it is used in other places for now.
Bug: webrtc:14867
Change-Id: If3eb6415e06b9b5e729d393713f3fccb31b0570f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361820
Auto-Submit: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42974}
This makes it simpler to use in more contexts.
Bug: b/364184684
Change-Id: I1b08ebd24e51ba1b3f85261eed503a78cd006fd8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361480
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42956}