Delete deprecated AcmReceiver contstructor

Bug: webrtc:356878416
Change-Id: Ic7e444e7f35c6927722a61f2f9ba6042cf10002f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358600
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42731}
This commit is contained in:
Danil Chapovalov 2024-08-06 16:04:07 +02:00 committed by WebRTC LUCI CQ
parent 843e14b36a
commit 3b0424bc41
2 changed files with 4 additions and 18 deletions

View File

@ -57,20 +57,10 @@ AcmReceiver::Config::Config(const Config&) = default;
AcmReceiver::Config::~Config() = default;
AcmReceiver::AcmReceiver(const Environment& env, Config config)
: clock_(env.clock()),
: env_(env),
neteq_(CreateNetEq(config.neteq_factory,
config.neteq_config,
&clock_,
config.decoder_factory)),
resampled_last_output_frame_(true) {
ClearSamples(last_audio_buffer_);
}
AcmReceiver::AcmReceiver(const Config& config)
: clock_(*Clock::GetRealTimeClock()),
neteq_(CreateNetEq(config.neteq_factory,
config.neteq_config,
&clock_,
&env_.clock(),
config.decoder_factory)),
resampled_last_output_frame_(true) {
ClearSamples(last_audio_buffer_);
@ -348,7 +338,7 @@ uint32_t AcmReceiver::NowInTimestamp(int decoder_sampling_rate) const {
// We masked 6 most significant bits of 32-bit so there is no overflow in
// the conversion from milliseconds to timestamp.
const uint32_t now_in_ms =
static_cast<uint32_t>(clock_.TimeInMilliseconds() & 0x03ffffff);
static_cast<uint32_t>(env_.clock().TimeInMilliseconds() & 0x03ffffff);
return static_cast<uint32_t>((decoder_sampling_rate / 1000) * now_in_ms);
}

View File

@ -38,7 +38,6 @@
namespace webrtc {
class Clock;
class NetEq;
struct RTPHeader;
@ -57,9 +56,6 @@ class AcmReceiver {
NetEqFactory* neteq_factory = nullptr;
};
[[deprecated("bugs.webrtc.org/356878416")]] explicit AcmReceiver(
const Config& config);
AcmReceiver(const Environment& env, Config config);
// Destructor of the class.
@ -232,7 +228,7 @@ class AcmReceiver {
uint32_t NowInTimestamp(int decoder_sampling_rate) const;
Clock& clock_;
const Environment env_;
mutable Mutex mutex_;
absl::optional<DecoderInfo> last_decoder_ RTC_GUARDED_BY(mutex_);
ACMResampler resampler_ RTC_GUARDED_BY(mutex_);