This CL only adds variables necessary for the feature, which will be
implemented in later CLs.
Bug: webrtc:350555527
Change-Id: I71e56666e629f56168d316bf693150c0df0e2ecf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356740
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Dan Tan <dwtan@google.com>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42698}
VideoStreamEncoder creates VideoEncoders. To pass an Environment to VideoEncoder, it should be available in the VideoStreamEncoder.
Bug: webrtc:15860
Change-Id: Id89ac024ce61fdd9673bb66f03f94f243fc0c7f7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341840
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41861}
Ensure VideoSendStreamImpl does not register allocation on stray encoded
image if there is no active encodings.
Bug: chromium:41497180
Change-Id: I32afd7cc71f154dff240934e2be1745d8ead127c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338920
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41708}
Rename RtpVideoSender::SetActiveModules to SetSending to better match
what it does. When a RtpVideoSender::SetSending(true) RTP packets can be
sent on all associcated RTP streams (simulcast streams).
Move registration of RtpRtcpModules to RtpTransportControllerSend to
allow RtpTransportControllerSend to know when there are sending RTP
streams. Purpose is to in later CLs allow RtpTransportControllerSend to
trigger BWE probes.
Bug: webrtc:14928
Change-Id: Ibf6c040b86713cdc4763c4691b7fd794b251eb49
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335961
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41620}
Instead, always use VideoSendStream::Start.
VideoSendStream::StartPerRtpStream was used for controlling if
individual rtp stream for a RtpEncodingParameter should be able to send RTP packets. It was not used for controlling the actual encoder layers.
With this change RtpEncodingParameter.active still controls actual encoder layers but it does not control if RTP packets can be sent or not.
The cleanup is done to simplify code and in the future allow sending
probe packet on a RtpTransceiver that allows sending, regardless of the
RtpEncodingParameter.active flag.
Bug: webrtc:14928
Change-Id: I896c055ed4de76db58d76f452147c29783f77ae1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335042
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41619}
There is to reason to have two separate classes as they both represent the same thing.
Done in order to simplify further refactorings.
Bug: webrtc:14928
Change-Id: I33e5fe032c79396fbae970c8732c90eb2252accb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335040
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41561}
This reverts commit 75170be4ac.
Reason for revert: Perf regression not affecting open source.
Original change's description:
> Revert "Remame VideoSendStream::UpdateActiveSimulcastLayers to StartPerRtpStream"
>
> This reverts commit d8c4de7172.
>
> Reason for revert: Tentative revert due to possible perf regression. b/260123362
>
> Original change's description:
> > Remame VideoSendStream::UpdateActiveSimulcastLayers to StartPerRtpStream
> >
> > VideoSendStreamImpl::Start and VideoSendStream::Start are not used by PeerConnections, only StartPerRtpStream.
> > Therefore this cl:
> > - Change implementation of VideoSendStream::Start to use VideoSendStream::StartPerRtpStream. VideoSendstream::Start is kept for convenience.
> > - Remove VideoSendStreamImpl::Start() since it was only used by tests that use call and is confusing.
> > - RtpVideoSender::SetActive is removed/changed to RtpVideoSender::Stop(). For normal operations RtpVideoSender::SetActiveModules is used.
> >
> > Bug: none
> > Change-Id: I43b153250b07c02fe63c84e3c4cec18d4ec0d47a
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283660
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Commit-Queue: Per Kjellander <perkj@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#38698}
>
> Bug: none
> Change-Id: I4f0d27679e51361b9ec54d2ae8e4d972527875d1
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284940
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Auto-Submit: Per Kjellander <perkj@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38725}
Bug: b/260400659
Change-Id: Ie8e545edcad85284a7d612183a8e4201672d0b5e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285900
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#38794}
This reverts commit d8c4de7172.
Reason for revert: Tentative revert due to possible perf regression. b/260123362
Original change's description:
> Remame VideoSendStream::UpdateActiveSimulcastLayers to StartPerRtpStream
>
> VideoSendStreamImpl::Start and VideoSendStream::Start are not used by PeerConnections, only StartPerRtpStream.
> Therefore this cl:
> - Change implementation of VideoSendStream::Start to use VideoSendStream::StartPerRtpStream. VideoSendstream::Start is kept for convenience.
> - Remove VideoSendStreamImpl::Start() since it was only used by tests that use call and is confusing.
> - RtpVideoSender::SetActive is removed/changed to RtpVideoSender::Stop(). For normal operations RtpVideoSender::SetActiveModules is used.
>
> Bug: none
> Change-Id: I43b153250b07c02fe63c84e3c4cec18d4ec0d47a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283660
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38698}
Bug: none
Change-Id: I4f0d27679e51361b9ec54d2ae8e4d972527875d1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284940
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38725}
VideoSendStreamImpl::Start and VideoSendStream::Start are not used by PeerConnections, only StartPerRtpStream.
Therefore this cl:
- Change implementation of VideoSendStream::Start to use VideoSendStream::StartPerRtpStream. VideoSendstream::Start is kept for convenience.
- Remove VideoSendStreamImpl::Start() since it was only used by tests that use call and is confusing.
- RtpVideoSender::SetActive is removed/changed to RtpVideoSender::Stop(). For normal operations RtpVideoSender::SetActiveModules is used.
Bug: none
Change-Id: I43b153250b07c02fe63c84e3c4cec18d4ec0d47a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283660
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38698}
This spills to a few more clasess....
Change-Id: Iea79e3b4ac86b30db6f13da89a47ab7000c5440a
Bug: webrtc:14502
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277803
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38334}
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}