mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Rename "metronome" to "decode_metronome".
In preparation for experimentally supporting different types of metronomes and metronome use cases we'd like to rename for clarity. This is the first step, which introduces the new name and prefers it if it is set, but keeps the old name for backwards compat reasons. Once Chromium has migrated to the new name, we can delete the old name. Bug: webrtc:15704 Change-Id: I23077bf2415ebb2b2338320c9a14e3bd17d3abb6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330020 Commit-Queue: Henrik Boström <hbos@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Markus Handell <handellm@webrtc.org> Auto-Submit: Henrik Boström <hbos@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41319}
This commit is contained in:
parent
e125a3371f
commit
f887e07234
6 changed files with 19 additions and 11 deletions
|
@ -1441,6 +1441,11 @@ struct RTC_EXPORT PeerConnectionFactoryDependencies final {
|
|||
std::unique_ptr<FieldTrialsView> trials;
|
||||
std::unique_ptr<RtpTransportControllerSendFactoryInterface>
|
||||
transport_controller_send_factory;
|
||||
// Metronome used for decoding, must be called on the worker thread.
|
||||
std::unique_ptr<Metronome> decode_metronome;
|
||||
// Old name for `decode_metronome`.
|
||||
// TODO(https://crbug.com/webrtc/15704): When callers have migrated to
|
||||
// `decode_metronome`, delete this.
|
||||
std::unique_ptr<Metronome> metronome;
|
||||
|
||||
// Media specific dependencies. Unused when `media_factory == nullptr`.
|
||||
|
|
11
call/call.cc
11
call/call.cc
|
@ -659,11 +659,12 @@ Call::Call(Clock* clock,
|
|||
// must be made on `worker_thread_` (i.e. they're one and the same).
|
||||
network_thread_(config.network_task_queue_ ? config.network_task_queue_
|
||||
: worker_thread_),
|
||||
decode_sync_(config.metronome
|
||||
? std::make_unique<DecodeSynchronizer>(clock_,
|
||||
config.metronome,
|
||||
worker_thread_)
|
||||
: nullptr),
|
||||
decode_sync_(
|
||||
config.decode_metronome
|
||||
? std::make_unique<DecodeSynchronizer>(clock_,
|
||||
config.decode_metronome,
|
||||
worker_thread_)
|
||||
: nullptr),
|
||||
num_cpu_cores_(CpuInfo::DetectNumberOfCores()),
|
||||
call_stats_(new CallStats(clock_, worker_thread_)),
|
||||
bitrate_allocator_(new BitrateAllocator(this)),
|
||||
|
|
|
@ -68,7 +68,7 @@ struct CallConfig {
|
|||
RtpTransportControllerSendFactoryInterface*
|
||||
rtp_transport_controller_send_factory = nullptr;
|
||||
|
||||
Metronome* metronome = nullptr;
|
||||
Metronome* decode_metronome = nullptr;
|
||||
|
||||
// Enables send packet batching from the egress RTP sender.
|
||||
bool enable_send_packet_batching = false;
|
||||
|
|
|
@ -103,7 +103,9 @@ PeerConnectionFactory::PeerConnectionFactory(
|
|||
(dependencies->transport_controller_send_factory)
|
||||
? std::move(dependencies->transport_controller_send_factory)
|
||||
: std::make_unique<RtpTransportControllerSendFactory>()),
|
||||
metronome_(std::move(dependencies->metronome)) {}
|
||||
decode_metronome_(dependencies->decode_metronome
|
||||
? std::move(dependencies->decode_metronome)
|
||||
: std::move(dependencies->metronome)) {}
|
||||
|
||||
PeerConnectionFactory::PeerConnectionFactory(
|
||||
PeerConnectionFactoryDependencies dependencies)
|
||||
|
@ -118,7 +120,7 @@ PeerConnectionFactory::~PeerConnectionFactory() {
|
|||
RTC_DCHECK_RUN_ON(signaling_thread());
|
||||
worker_thread()->BlockingCall([this] {
|
||||
RTC_DCHECK_RUN_ON(worker_thread());
|
||||
metronome_ = nullptr;
|
||||
decode_metronome_ = nullptr;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -343,7 +345,7 @@ std::unique_ptr<Call> PeerConnectionFactory::CreateCall_w(
|
|||
|
||||
call_config.rtp_transport_controller_send_factory =
|
||||
transport_controller_send_factory_.get();
|
||||
call_config.metronome = metronome_.get();
|
||||
call_config.decode_metronome = decode_metronome_.get();
|
||||
return context_->call_factory()->CreateCall(call_config);
|
||||
}
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface {
|
|||
std::unique_ptr<NetEqFactory> neteq_factory_;
|
||||
const std::unique_ptr<RtpTransportControllerSendFactoryInterface>
|
||||
transport_controller_send_factory_;
|
||||
std::unique_ptr<Metronome> metronome_ RTC_GUARDED_BY(worker_thread());
|
||||
std::unique_ptr<Metronome> decode_metronome_ RTC_GUARDED_BY(worker_thread());
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
|
|
@ -773,7 +773,7 @@ class PeerConnectionIntegrationWrapper : public PeerConnectionObserver,
|
|||
pc_factory_dependencies.task_queue_factory =
|
||||
CreateDefaultTaskQueueFactory();
|
||||
pc_factory_dependencies.trials = std::make_unique<FieldTrialBasedConfig>();
|
||||
pc_factory_dependencies.metronome =
|
||||
pc_factory_dependencies.decode_metronome =
|
||||
std::make_unique<TaskQueueMetronome>(TimeDelta::Millis(8));
|
||||
|
||||
pc_factory_dependencies.adm = fake_audio_capture_module_;
|
||||
|
|
Loading…
Reference in a new issue