Cleanup NetEqControllerFactory interface
Finalize change started in https://webrtc-review.googlesource.com/c/src/+/359243 Remove fallback to old interface and unneeded clock member in the config struct. Bug: None Change-Id: I4c2b65a09dd1c8a0d44ee76320b095516e2c61fb Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359561 Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/main@{#42782}
This commit is contained in:
parent
ce807810be
commit
eb26634e6a
@ -56,8 +56,6 @@ rtc_source_set("neteq_controller_api") {
|
||||
deps = [
|
||||
":neteq_api",
|
||||
":tick_timer",
|
||||
"../../rtc_base:checks",
|
||||
"../../system_wrappers:system_wrappers",
|
||||
"../environment",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
|
||||
@ -19,7 +19,6 @@
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/neteq/neteq.h"
|
||||
#include "api/neteq/tick_timer.h"
|
||||
#include "system_wrappers/include/clock.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -67,8 +66,6 @@ class NetEqController {
|
||||
int max_packets_in_buffer;
|
||||
int base_min_delay_ms;
|
||||
TickTimer* tick_timer;
|
||||
// Deprecated, instead use clock passed along with Config in Environment.
|
||||
webrtc::Clock* clock = nullptr;
|
||||
};
|
||||
|
||||
struct PacketInfo {
|
||||
|
||||
@ -15,7 +15,6 @@
|
||||
|
||||
#include "api/environment/environment.h"
|
||||
#include "api/neteq/neteq_controller.h"
|
||||
#include "rtc_base/checks.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -28,17 +27,7 @@ class NetEqControllerFactory {
|
||||
// Creates a new NetEqController object, with parameters set in `config`.
|
||||
virtual std::unique_ptr<NetEqController> Create(
|
||||
const Environment& env,
|
||||
const NetEqController::Config& config) const {
|
||||
return CreateNetEqController(config);
|
||||
}
|
||||
|
||||
private:
|
||||
// TODO: bugs.webrtc.org/42220378 - Remove when downstream implements Create
|
||||
virtual std::unique_ptr<NetEqController> CreateNetEqController(
|
||||
const NetEqController::Config& config) const {
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return nullptr;
|
||||
}
|
||||
const NetEqController::Config& config) const = 0;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -112,8 +112,7 @@ NetEqImpl::Dependencies::Dependencies(
|
||||
.max_packets_in_buffer =
|
||||
static_cast<int>(config.max_packets_in_buffer),
|
||||
.base_min_delay_ms = config.min_delay_ms,
|
||||
.tick_timer = tick_timer.get(),
|
||||
.clock = &env.clock()})),
|
||||
.tick_timer = tick_timer.get()})),
|
||||
red_payload_splitter(new RedPayloadSplitter),
|
||||
timestamp_scaler(new TimestampScaler(*decoder_database)),
|
||||
accelerate_factory(new AccelerateFactory),
|
||||
|
||||
@ -127,7 +127,6 @@ class NetEqImplTest : public ::testing::Test {
|
||||
controller_config.base_min_delay_ms = config_.min_delay_ms;
|
||||
controller_config.allow_time_stretching = true;
|
||||
controller_config.max_packets_in_buffer = config_.max_packets_in_buffer;
|
||||
controller_config.clock = &clock_;
|
||||
deps.neteq_controller =
|
||||
std::make_unique<DecisionLogic>(env_, std::move(controller_config));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user