Delete a chain of methods in ViE, VoE and ACM
The end goal is to remove AcmReceiver::SetInitialDelay. This change is in preparation for that goal. It turns out that AcmReceiver::SetInitialDelay was only invoked through the following call chain, where each method in the chain is never referenced from anywhere else (except from tests in some cases): ViEChannel::SetReceiverBufferingMode -> ViESyncModule::SetTargetBufferingDelay -> VoEVideoSync::SetInitialPlayoutDelay -> Channel::SetInitialPlayoutDelay -> AudioCodingModule::SetInitialPlayoutDelay -> AcmReceiver::SetInitialDelay The start of the chain, ViEChannel::SetReceiverBufferingMode was never referenced. This change deletes all the methods above except AcmReceiver::SetInitialDelay itself, which will be handled in a follow-up change. BUG=webrtc:3520 Review URL: https://codereview.webrtc.org/1421013006 Cr-Commit-Position: refs/heads/master@{#10471}
This commit is contained in:
committed by
Commit bot
parent
e502bbe138
commit
74f0f3551e
@ -765,17 +765,6 @@ int AudioCodingModuleImpl::UnregisterReceiveCodec(uint8_t payload_type) {
|
||||
return receiver_.RemoveCodec(payload_type);
|
||||
}
|
||||
|
||||
int AudioCodingModuleImpl::SetInitialPlayoutDelay(int delay_ms) {
|
||||
{
|
||||
CriticalSectionScoped lock(acm_crit_sect_.get());
|
||||
// Initialize receiver, if it is not initialized. Otherwise, initial delay
|
||||
// is reset upon initialization of the receiver.
|
||||
if (!receiver_initialized_)
|
||||
InitializeReceiverSafe();
|
||||
}
|
||||
return receiver_.SetInitialDelay(delay_ms);
|
||||
}
|
||||
|
||||
int AudioCodingModuleImpl::EnableNack(size_t max_nack_list_size) {
|
||||
return receiver_.EnableNack(max_nack_list_size);
|
||||
}
|
||||
|
||||
@ -150,10 +150,6 @@ class AudioCodingModuleImpl final : public AudioCodingModule {
|
||||
// Smallest latency NetEq will maintain.
|
||||
int LeastRequiredDelayMs() const override;
|
||||
|
||||
// Impose an initial delay on playout. ACM plays silence until |delay_ms|
|
||||
// audio is accumulated in NetEq buffer, then starts decoding payloads.
|
||||
int SetInitialPlayoutDelay(int delay_ms) override;
|
||||
|
||||
// Get playout timestamp.
|
||||
int PlayoutTimestamp(uint32_t* timestamp) override;
|
||||
|
||||
|
||||
@ -249,30 +249,6 @@ TEST_F(AudioCodingModuleTestOldApi, DISABLED_ON_ANDROID(InitializedToZero)) {
|
||||
EXPECT_EQ(0, stats.decoded_plc_cng);
|
||||
}
|
||||
|
||||
// Apply an initial playout delay. Calls to AudioCodingModule::PlayoutData10ms()
|
||||
// should result in generating silence, check the associated field.
|
||||
TEST_F(AudioCodingModuleTestOldApi,
|
||||
DISABLED_ON_ANDROID(SilenceGeneratorCalled)) {
|
||||
RegisterCodec();
|
||||
AudioDecodingCallStats stats;
|
||||
const int kInitialDelay = 100;
|
||||
|
||||
acm_->SetInitialPlayoutDelay(kInitialDelay);
|
||||
|
||||
int num_calls = 0;
|
||||
for (int time_ms = 0; time_ms < kInitialDelay;
|
||||
time_ms += kFrameSizeMs, ++num_calls) {
|
||||
InsertPacketAndPullAudio();
|
||||
}
|
||||
acm_->GetDecodingCallStatistics(&stats);
|
||||
EXPECT_EQ(0, stats.calls_to_neteq);
|
||||
EXPECT_EQ(num_calls, stats.calls_to_silence_generator);
|
||||
EXPECT_EQ(0, stats.decoded_normal);
|
||||
EXPECT_EQ(0, stats.decoded_cng);
|
||||
EXPECT_EQ(0, stats.decoded_plc);
|
||||
EXPECT_EQ(0, stats.decoded_plc_cng);
|
||||
}
|
||||
|
||||
// Insert some packets and pull audio. Check statistics are valid. Then,
|
||||
// simulate packet loss and check if PLC and PLC-to-CNG statistics are
|
||||
// correctly updated.
|
||||
|
||||
Reference in New Issue
Block a user