Metronome: disable & refactor for single-threaded operation.
The Chromium implementation unfortunately has a rare deadlock. Rather than patching that up, we're changing the metronome implementation to be able to use a single-threaded environment instead. The metronome functionality is disabled in VideoReceiveStream2 construction inside call.cc. The new design does not have listener registration or deresigstration and instead accepts and invokes callbacks, on the same sequence that requested the callback. This allows the clients to use features such as WeakPtrFactories or ScopedThreadSafety for cancellation. The CL will be followed up with cleanup CLs that removes registration APIs once downstream consumers have adapted. Bug: chromium:1381982 Change-Id: I43732d1971e2276c39b431a04365cd2fc3c55c25 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282280 Reviewed-by: Per Kjellander <perkj@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Evan Shrubsole <eshr@webrtc.org> Commit-Queue: Markus Handell <handellm@webrtc.org> Cr-Commit-Position: refs/heads/main@{#38582}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
822794d491
commit
be400e465b
@ -132,8 +132,7 @@ class VideoStreamBufferControllerFixture
|
||||
field_trials_(std::get<1>(GetParam())),
|
||||
time_controller_(kClockStart),
|
||||
clock_(time_controller_.GetClock()),
|
||||
fake_metronome_(time_controller_.GetTaskQueueFactory(),
|
||||
TimeDelta::Millis(16)),
|
||||
fake_metronome_(TimeDelta::Millis(16)),
|
||||
decode_sync_(clock_,
|
||||
&fake_metronome_,
|
||||
time_controller_.GetMainThread()),
|
||||
@ -163,7 +162,6 @@ class VideoStreamBufferControllerFixture
|
||||
if (buffer_) {
|
||||
buffer_->Stop();
|
||||
}
|
||||
fake_metronome_.Stop();
|
||||
time_controller_.AdvanceTime(TimeDelta::Zero());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user