that rtc::Location parameter was used only as extra information for the
RTC_CHECKs directly in the function, thus call stack of the crash should
provide all the information about the caller.
Bug: webrtc:11318
Change-Id: Iec6dd2c5de547f3e1601647a614be7ce57a55734
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270920
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37748}
This removes the unused field trials
`WebRTC-SimulcastScreenshareUpswitchHysteresisPercent` and
`WebRTC-SimulcastScreenshareUpswitchHysteresisPercent` as well as the
`video_hysteresis` and `screenshare_hysteresis` parameters in
`WebRTC-VideoRateControl`.
The hysteresis parameters in `WebRTC-StableTargetRate` are currently
left, their future is unclear...
Bug: webrtc:9734
Change-Id: I9e6bbe4b630a0501d365bf69e87e65164c500122
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269207
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37635}
rtc::TaskQueue is a simple wrapper over TaskQueueBase and adds no
extra features when task queue is used without passing ownership.
Reducing usage of the internal rtc::TaskQueue wrapper gives users more flexibility how TaskQueueBase* is stored.
Bug: webrtc:14169
Change-Id: If5c8827544c843502c7dfcef775ac558de79ec3a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268189
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37549}
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}
This change achieves an Idle Wakeup savings of 200 Hz.
ModuleRtcRtcpImpl2 had Process() logic only active if TMMBR() is
enabled in RtcpSender, which it never is. Hence the Module
inheritance could be removed. The change removes all known
dependencies of the module inheritance, and any related mentions
of ProcessThread.
Fixed: webrtc:11581
Change-Id: I440942f07187fdb9ac18186dab088633969b340e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222604
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34358}
This reverts commit 10814873c5.
Reason for revert: Breaks down stream project
Original change's description:
> Avoid video stream allocation on configuration change after timeout.
>
> This is to prevent the video stream to get in a state where it is
> allocated but there is no activity.
>
> Bug: b/189842675
> Change-Id: I0793bd4cbf2a4faed92cf811550437ae75742102
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221618
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34276}
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: b/189842675
Change-Id: If930360000f5ca290100920a4f215358b8c3e644
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222652
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34314}
This is to prevent the video stream to get in a state where it is
allocated but there is no activity.
Bug: b/189842675
Change-Id: I0793bd4cbf2a4faed92cf811550437ae75742102
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221618
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34276}
* Make VideoSendStream and VideoSendStreamImpl construction non-blocking.
* Move ownership of the rtp video sender to VideoSendStream.
* Most state is constructed in initializer lists.
* More state is now const (including VideoSendStreamImpl ptr)
* Adding thread checks to classes that appear to have had a race before
E.g. RtpTransportControllerSend. The change in threading now actually
fixes an issue we weren't aware of.
* Moved from using weak_ptr to safety flag and made some PostTask calls
cancellable that could potentially have been problematic. Initalizing
the flag without thread synchronization is also simpler.
This should speed up renegotiation significantly when there are
multiple channels. A follow-up change will improve SetSend as well
which is another costly step during renegotiation.
Bug: webrtc:12840
Change-Id: If4b28da5a085643ce132c7cfcf80a62cd1a625c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221105
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34224}
This changes the default behavior to use pacing factor of 1.1x instead
of 2.5x, it also sets libvpx rate controler as trusted, turns on the
encoder pushback mechanism and sets spatial hysteresis to 1.2.
The unused "dynamic rate" settings in libvpx is removed.
The new settings matches what has been used in chromium since 2019.
If needed, the legacy behavior can be enabled using the field trial
WebRTC-VideoRateControl.
Bug: webrtc:10155
Change-Id: I8186b491aa5bef61e8f568e96c980ca68f0c208f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186661
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32477}
VideoBitrateAllocation is instead reported through the EncoderSink.
Enable VideoBitrateAllocation reporting from WebRtcVideoChannel::AddSendStream in preparation for
using the extension RtpVideoLayersAllocationExtension instead of RTCP XR.
Bug: webrtc:12000
Change-Id: I5ea8e4f237a1c4e84a89cbfd97ac4353d4c2984f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186940
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32347}
Unit test added to verify root cause is fixed.
Scenario test added to verify high-level behavior.
Bug: webrtc:11654
Change-Id: I1ad6e2750f5272e86b4198749edbbf5dfd8315c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176564
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31462}
With current congestion window pushback, when congestion window is filling up, it will reduce bitrate directly and encoder may reduce encode quality, resolution, or framerate to adapt to the allocated bitrate, the behavior is depending on the degradation preference.
This change enable congestion window to only drop frames to reduce bitrate (when needed) instead of reduce general bitrate allocation.
Bug: webrtc:11334
Change-Id: I9cf5c20a0858c4d07d006942abe72aa5e1f7cb38
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168059
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30483}
MediaTransport is deprecated and the code is unused.
No-Try: True
Bug: webrtc:9719
Change-Id: I5b864c1e74bf04df16c15f51b8fac3d407331dcd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160620
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29923}
The encoder can drop all frames for extended periods if it has produced over budget. After 2 seconds without any encoded frames, the video send stream times out and deallocates the stream.
Ideally the send stream should keep track if frames are captured instead of encoded, but keeping the stream alive using OnDroppedFrame can work as a proxy for that.
Bug: webrtc:11062
Change-Id: Id7ec1ff333427643453c4a36d1db03ca826cd9ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158700
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29662}
That allows to use SingleThreadedTaskQueueForTesting via TaskQueueBase interface
but still have access to test-only SendTask function.
Bug: webrtc:10933
Change-Id: I3cc397e55ea2f1ed9e5d885d6a2ccda412beb826
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156002
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29480}
The stable target rate is used to make smarter choices in the rate
to chose which layers to enable in SVC or simulcast modes.
the addition of hysteresis, we can improve a call quality by reducing
the amount of resolution switch.
Bug: webrtc:10126
Change-Id: I04d0df9e6bbe247e2f2a668207ff74d475e2464c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150642
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29112}
Deprecated the field BitrateAllocationUpdate::link_capacity since it is only
used by the Opus codec in order to smooth the target bitrate, which is
equivalent to the stable_target_bitrate field.
The unused field trial WebRTC-Bwe-StableBandwidthEstimate is also removed.
Bug: webrtc:10126
Change-Id: Ic4a8a9ca4202136d011b91dc23c3a27cfd00d975
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149839
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28941}
This removes PeerConnectionInterface::SetBitrateAllocationStrategy()
plus a ton of now-dead code.
Bug: webrtc:10556
Change-Id: Icfae3bdd011588552934d9db4df16000847db7c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133169
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28523}
The purpose of this interface is to allow VideoEncoder to override
the bandwidth allocation set by FecController in RtpVideoSender.
This CL defines the interface and sends it down to VideoSender.
Two upcoming CLs will:
1. Make LibvpxVp8Encoder pass it on to the (injectable)
FrameBufferController, where it might be put to good use.
2. Modify RtpVideoSender to respond to the message sent to it
via this API.
TBR=kwiberg@webrtc.org
Bug: webrtc:10769
Change-Id: I2ef82f0ddcde7fd078e32d8aabf6efe43e0f7f8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143962
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28416}
Add a version of RTPSenderVideo::GetSentRtpPacketInfo() that operates
over a set of numbers, so as to only grab the lock once.
Bug: webrtc:10501
Change-Id: I9453b0cb44dcd6e2ce196390b2c5c9a7dd6d800a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132014
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27544}
Semi-automatically created with:
git grep -l " testing::" | xargs sed -i "s/ testing::/ ::testing::/g"
git grep -l "(testing::" | xargs sed -i "s/(testing::/(::testing::/g"
git cl format
After this, two .cc files failed to compile and I have fixed them
manually.
Bug: webrtc:10523
Change-Id: I4741d3bcedc831b6c5fdc04485678617eb4ce031
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132018
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27526}
When a LossNotification RTCP message is received, the sequence numbers
it refers to must be converted to timestamps before passing the message
down to the encoder. This CL gives VideoSendStreamImpl access to that
information via VideoSendStreamImpl::rtp_video_sender_.
TBR=sprang@webrtc.org
Bug: webrtc:10501
Change-Id: If207f0b6d2fb344da35b525cc104e8ba5cc614ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131323
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27489}
This CL wires up the new SetRates() method of the video encoders, and
refactors a few things in the process:
Most notably, the VideoStreamEncoderInterface is update so that the
|target_headroom| parameter is replaced with |link_allocation|, meaning
that instead of indicating bitrate capacity in excess of the target
bitrate, it indicates to total network capacity allocated for the
stream including the target bitrate. This matches the VideoEncoder API.
The VideoEncoder::RateControlParameters struct gets a few new helper
methods.
In VideoStreamEncoder, instead of adding more fields to the
|last_observed_bitrate*| family, uses an optional struct that
inherits from VideoEncoder::RateControlParameters.
Bug: webrtc:10481
Change-Id: Iee3965531142ae9b964ed86c0d51db59b1cdd61c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131123
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27487}
This reverts commit ab65d8aab5.
Reason for revert: Fails video_engine_tests ExtendedReportsEndToEndTest.TestExtendedReportsCanSignalZeroTargetBitrate
https://ci.chromium.org/p/webrtc/builders/ci/Linux%20MSan/18366
Original change's description:
> Fix target bitrate RTCP messages behavior for SVC streams
>
> Before this CL for SVC streams (e.g VP9) still 3 separate RTP_RTCP senders
> were created. The RTCP target bitrate messages were treated as simulcast
> and were split and send for each separate spatial layer in a separate SSRC.
>
> To fix that an svc flag is now wired to VideoSendStream config
> and filled based on the encoder config in WebrtcVideoEngine. This flag is
> used to differentiate between simulcast and SVC mode in RtpVideoSender.
>
> Bug: webrtc:10485
> Change-Id: Ifa01d12a7d4f01fcbe448ad11e0cc39ab2d1df55
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129929
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27345}
TBR=ilnik@webrtc.org,nisse@webrtc.org,sprang@webrtc.org
Change-Id: I184f87289d9dccc67de165038d76a5690158a3b5
No-Tree-Checks: True
No-Try: True
Bug: webrtc:10485
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130467
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27355}
Before this CL for SVC streams (e.g VP9) still 3 separate RTP_RTCP senders
were created. The RTCP target bitrate messages were treated as simulcast
and were split and send for each separate spatial layer in a separate SSRC.
To fix that an svc flag is now wired to VideoSendStream config
and filled based on the encoder config in WebrtcVideoEngine. This flag is
used to differentiate between simulcast and SVC mode in RtpVideoSender.
Bug: webrtc:10485
Change-Id: Ifa01d12a7d4f01fcbe448ad11e0cc39ab2d1df55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129929
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27345}
In case protection bitrate (fec/nack) is used, don't allow encoder
(rate adjuster) to utilize those bits as that may result in pacer delay.
Bug: webrtc:10155
Change-Id: I5bceb100396f0ae2131db51039e8524ca068d13f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128873
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27283}
To remove global task factory, rtc::TaskQueue need to loose it's convenient constructor
TaskQueueForTest can be used instead in tests and keep the convenient constructor.
Also cleanup the TaskQueueForTest a bit:
move the class to webrtc namespace
add default constructor
disallow copy using language construct instead of macro
cleanup build dependencies
rename build target (to match move out of the rtc namespace)
Bug: webrtc:10284
Change-Id: I17fddf3f8d4f363df7d495c28a5b0a28abda1ba7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127571
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27193}
These are manual edits please verify there are no typos.
Feel free to auto-submit if there are no issues.
Bug: webrtc:10410
Change-Id: Iedb3be944828a1caba55bbbd4dc0b56c55bbb7d5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127624
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27123}
This is not used in practice as there's functionality on
other levels that serves the same purpose.
Bug: None
Change-Id: I0488dc42459b07607363eba0f2b06f4c50f7cda4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125520
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27061}
This CL plumbs an additional signal from VideoSendStream down to
VideoStreamEncoder, namely the amount of headroom that's left between
the encoder max bitrate and the current bitrate allocation for the
media track.
This will be used in follow-up CLs to tune encoder rate adjustment
and some codec specific paramaters a bit differently, based on the
knowledge if we are network constrained or not.
Bug: webrtc:10155
Change-Id: Ic6ccc79be5c6845468bab65b4ca9918b56923fa4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125981
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27008}