Revert "Reporting of decoding_codec_plc events"

This reverts commit 0a88ea050c.

Reason for revert: This CL breaks Chromium's FYI bots (example: https://ci.chromium.org/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20Linux%20Tester/4033).

Original change's description:
> Reporting of decoding_codec_plc events
> 
> Change-Id: Id71b37244bc98bffaf25131a519127b3d2b86a8f
> 
> Bug: webrtc:10838
> Change-Id: Id71b37244bc98bffaf25131a519127b3d2b86a8f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147263
> Commit-Queue: Alex Narest <alexnarest@google.com>
> Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28700}

TBR=mflodman@webrtc.org,alexnarest@google.com

Change-Id: I5e5dd29ee375ba422f79932d4b8c3fd028a53db4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10838
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147269
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28707}
This commit is contained in:
Mirko Bonadei 2019-07-30 14:38:53 +00:00 committed by Commit Bot
parent 74cebb3c6d
commit bedb7a8aea
17 changed files with 13 additions and 53 deletions

View file

@ -52,7 +52,6 @@ class AudioFrame {
kPLC = 1,
kCNG = 2,
kPLCCNG = 3,
kCodecPLC = 5,
kUndefined = 4
};

View file

@ -489,8 +489,6 @@ const char* StatsReport::Value::display_name() const {
return "googDecodingNormal";
case kStatsValueNameDecodingPLC:
return "googDecodingPLC";
case kStatsValueNameDecodingCodecPLC:
return "googDecodingCodecPLC";
case kStatsValueNameDecodingCNG:
return "googDecodingCNG";
case kStatsValueNameDecodingPLCCNG:

View file

@ -163,7 +163,6 @@ class StatsReport {
kStatsValueNameDecodingMutedOutput,
kStatsValueNameDecodingNormal,
kStatsValueNameDecodingPLC,
kStatsValueNameDecodingCodecPLC,
kStatsValueNameDecodingPLCCNG,
kStatsValueNameDer,
kStatsValueNameDtlsCipher,

View file

@ -237,8 +237,7 @@ webrtc::AudioReceiveStream::Stats AudioReceiveStream::GetStats() const {
stats.decoding_calls_to_silence_generator = ds.calls_to_silence_generator;
stats.decoding_calls_to_neteq = ds.calls_to_neteq;
stats.decoding_normal = ds.decoded_normal;
stats.decoding_plc = ds.decoded_neteq_plc;
stats.decoding_codec_plc = ds.decoded_codec_plc;
stats.decoding_plc = ds.decoded_plc;
stats.decoding_cng = ds.decoded_cng;
stats.decoding_plc_cng = ds.decoded_plc_cng;
stats.decoding_muted_output = ds.decoded_muted_output;

View file

@ -43,8 +43,7 @@ AudioDecodingCallStats MakeAudioDecodeStatsForTest() {
audio_decode_stats.calls_to_silence_generator = 234;
audio_decode_stats.calls_to_neteq = 567;
audio_decode_stats.decoded_normal = 890;
audio_decode_stats.decoded_neteq_plc = 123;
audio_decode_stats.decoded_codec_plc = 124;
audio_decode_stats.decoded_plc = 123;
audio_decode_stats.decoded_cng = 456;
audio_decode_stats.decoded_plc_cng = 789;
audio_decode_stats.decoded_muted_output = 987;
@ -307,8 +306,7 @@ TEST(AudioReceiveStreamTest, GetStats) {
stats.decoding_calls_to_silence_generator);
EXPECT_EQ(kAudioDecodeStats.calls_to_neteq, stats.decoding_calls_to_neteq);
EXPECT_EQ(kAudioDecodeStats.decoded_normal, stats.decoding_normal);
EXPECT_EQ(kAudioDecodeStats.decoded_neteq_plc, stats.decoding_plc);
EXPECT_EQ(kAudioDecodeStats.decoded_codec_plc, stats.decoding_codec_plc);
EXPECT_EQ(kAudioDecodeStats.decoded_plc, stats.decoding_plc);
EXPECT_EQ(kAudioDecodeStats.decoded_cng, stats.decoding_cng);
EXPECT_EQ(kAudioDecodeStats.decoded_plc_cng, stats.decoding_plc_cng);
EXPECT_EQ(kAudioDecodeStats.decoded_muted_output,

View file

@ -72,9 +72,7 @@ class AudioReceiveStream {
int32_t decoding_calls_to_silence_generator = 0;
int32_t decoding_calls_to_neteq = 0;
int32_t decoding_normal = 0;
// TODO(alexnarest): Consider decoding_neteq_plc for consistency
int32_t decoding_plc = 0;
int32_t decoding_codec_plc = 0;
int32_t decoding_cng = 0;
int32_t decoding_plc_cng = 0;
int32_t decoding_muted_output = 0;

View file

@ -522,9 +522,7 @@ struct VoiceReceiverInfo : public MediaReceiverInfo {
int decoding_calls_to_silence_generator = 0;
int decoding_calls_to_neteq = 0;
int decoding_normal = 0;
// TODO(alexnarest): Consider decoding_neteq_plc for consistency
int decoding_plc = 0;
int decoding_codec_plc = 0;
int decoding_cng = 0;
int decoding_plc_cng = 0;
int decoding_muted_output = 0;

View file

@ -2279,7 +2279,6 @@ bool WebRtcVoiceMediaChannel::GetStats(VoiceMediaInfo* info) {
rinfo.decoding_calls_to_neteq = stats.decoding_calls_to_neteq;
rinfo.decoding_normal = stats.decoding_normal;
rinfo.decoding_plc = stats.decoding_plc;
rinfo.decoding_codec_plc = stats.decoding_codec_plc;
rinfo.decoding_cng = stats.decoding_cng;
rinfo.decoding_plc_cng = stats.decoding_plc_cng;
rinfo.decoding_muted_output = stats.decoding_muted_output;

View file

@ -670,7 +670,6 @@ class WebRtcVoiceEngineTestFake : public ::testing::Test {
stats.decoding_calls_to_neteq = 345;
stats.decoding_normal = 67890;
stats.decoding_plc = 1234;
stats.decoding_codec_plc = 1236;
stats.decoding_cng = 5678;
stats.decoding_plc_cng = 9012;
stats.decoding_muted_output = 3456;
@ -720,7 +719,6 @@ class WebRtcVoiceEngineTestFake : public ::testing::Test {
EXPECT_EQ(info.decoding_calls_to_neteq, stats.decoding_calls_to_neteq);
EXPECT_EQ(info.decoding_normal, stats.decoding_normal);
EXPECT_EQ(info.decoding_plc, stats.decoding_plc);
EXPECT_EQ(info.decoding_codec_plc, stats.decoding_codec_plc);
EXPECT_EQ(info.decoding_cng, stats.decoding_cng);
EXPECT_EQ(info.decoding_plc_cng, stats.decoding_plc_cng);
EXPECT_EQ(info.decoding_muted_output, stats.decoding_muted_output);

View file

@ -266,7 +266,7 @@ TEST_F(AudioCodingModuleTestOldApi, MAYBE_InitializedToZero) {
EXPECT_EQ(0, stats.calls_to_silence_generator);
EXPECT_EQ(0, stats.decoded_normal);
EXPECT_EQ(0, stats.decoded_cng);
EXPECT_EQ(0, stats.decoded_neteq_plc);
EXPECT_EQ(0, stats.decoded_plc);
EXPECT_EQ(0, stats.decoded_plc_cng);
EXPECT_EQ(0, stats.decoded_muted_output);
}
@ -292,7 +292,7 @@ TEST_F(AudioCodingModuleTestOldApi, MAYBE_NetEqCalls) {
EXPECT_EQ(0, stats.calls_to_silence_generator);
EXPECT_EQ(kNumNormalCalls, stats.decoded_normal);
EXPECT_EQ(0, stats.decoded_cng);
EXPECT_EQ(0, stats.decoded_neteq_plc);
EXPECT_EQ(0, stats.decoded_plc);
EXPECT_EQ(0, stats.decoded_plc_cng);
EXPECT_EQ(0, stats.decoded_muted_output);
@ -308,7 +308,7 @@ TEST_F(AudioCodingModuleTestOldApi, MAYBE_NetEqCalls) {
EXPECT_EQ(0, stats.calls_to_silence_generator);
EXPECT_EQ(kNumNormalCalls, stats.decoded_normal);
EXPECT_EQ(0, stats.decoded_cng);
EXPECT_EQ(kNumPlc, stats.decoded_neteq_plc);
EXPECT_EQ(kNumPlc, stats.decoded_plc);
EXPECT_EQ(kNumPlcCng, stats.decoded_plc_cng);
EXPECT_EQ(0, stats.decoded_muted_output);
// TODO(henrik.lundin) Add a test with muted state enabled.

View file

@ -28,11 +28,7 @@ void CallStatistics::DecodedByNetEq(AudioFrame::SpeechType speech_type,
break;
}
case AudioFrame::kPLC: {
++decoding_stat_.decoded_neteq_plc;
break;
}
case AudioFrame::kCodecPLC: {
++decoding_stat_.decoded_codec_plc;
++decoding_stat_.decoded_plc;
break;
}
case AudioFrame::kCNG: {

View file

@ -25,7 +25,7 @@ TEST(CallStatisticsTest, InitializedZero) {
EXPECT_EQ(0, stats.calls_to_silence_generator);
EXPECT_EQ(0, stats.decoded_normal);
EXPECT_EQ(0, stats.decoded_cng);
EXPECT_EQ(0, stats.decoded_neteq_plc);
EXPECT_EQ(0, stats.decoded_plc);
EXPECT_EQ(0, stats.decoded_plc_cng);
EXPECT_EQ(0, stats.decoded_muted_output);
}
@ -37,17 +37,15 @@ TEST(CallStatisticsTest, AllCalls) {
call_stats.DecodedBySilenceGenerator();
call_stats.DecodedByNetEq(AudioFrame::kNormalSpeech, false);
call_stats.DecodedByNetEq(AudioFrame::kPLC, false);
call_stats.DecodedByNetEq(AudioFrame::kCodecPLC, false);
call_stats.DecodedByNetEq(AudioFrame::kPLCCNG, true); // Let this be muted.
call_stats.DecodedByNetEq(AudioFrame::kCNG, false);
stats = call_stats.GetDecodingStatistics();
EXPECT_EQ(5, stats.calls_to_neteq);
EXPECT_EQ(4, stats.calls_to_neteq);
EXPECT_EQ(1, stats.calls_to_silence_generator);
EXPECT_EQ(1, stats.decoded_normal);
EXPECT_EQ(1, stats.decoded_cng);
EXPECT_EQ(1, stats.decoded_neteq_plc);
EXPECT_EQ(1, stats.decoded_codec_plc);
EXPECT_EQ(1, stats.decoded_plc);
EXPECT_EQ(1, stats.decoded_plc_cng);
EXPECT_EQ(1, stats.decoded_muted_output);
}

View file

@ -57,8 +57,7 @@ struct AudioDecodingCallStats {
: calls_to_silence_generator(0),
calls_to_neteq(0),
decoded_normal(0),
decoded_neteq_plc(0),
decoded_codec_plc(0),
decoded_plc(0),
decoded_cng(0),
decoded_plc_cng(0),
decoded_muted_output(0) {}
@ -67,8 +66,7 @@ struct AudioDecodingCallStats {
// and NetEq was disengaged from decoding.
int calls_to_neteq; // Number of calls to NetEq.
int decoded_normal; // Number of calls where audio RTP packet decoded.
int decoded_neteq_plc; // Number of calls resulted in NetEq PLC.
int decoded_codec_plc; // Number of calls resulted in codec PLC.
int decoded_plc; // Number of calls resulted in PLC.
int decoded_cng; // Number of calls where comfort noise generated due to DTX.
int decoded_plc_cng; // Number of calls resulted where PLC faded to CNG.
int decoded_muted_output; // Number of calls returning a muted state output.

View file

@ -203,11 +203,6 @@ void SetAudioFrameActivityAndType(bool vad_enabled,
audio_frame->vad_activity_ = AudioFrame::kVadPassive;
break;
}
case NetEqImpl::OutputType::kCodecPLC: {
audio_frame->speech_type_ = AudioFrame::kCodecPLC;
audio_frame->vad_activity_ = last_vad_activity;
break;
}
default:
RTC_NOTREACHED();
}
@ -2093,8 +2088,6 @@ NetEqImpl::OutputType NetEqImpl::LastOutputType() {
return OutputType::kPLC;
} else if (vad_->running() && !vad_->active_speech()) {
return OutputType::kVadPassive;
} else if (last_mode_ == kModeCodecPlc) {
return OutputType::kCodecPLC;
} else {
return OutputType::kNormalSpeech;
}

View file

@ -64,14 +64,7 @@ struct PreemptiveExpandFactory;
class NetEqImpl : public webrtc::NetEq {
public:
enum class OutputType {
kNormalSpeech,
kPLC,
kCNG,
kPLCCNG,
kVadPassive,
kCodecPLC
};
enum class OutputType { kNormalSpeech, kPLC, kCNG, kPLCCNG, kVadPassive };
enum ErrorCodes {
kNoError = 0,

View file

@ -158,7 +158,6 @@ void ExtractStats(const cricket::VoiceReceiverInfo& info, StatsReport* report) {
info.decoding_muted_output},
{StatsReport::kStatsValueNameDecodingNormal, info.decoding_normal},
{StatsReport::kStatsValueNameDecodingPLC, info.decoding_plc},
{StatsReport::kStatsValueNameDecodingCodecPLC, info.decoding_codec_plc},
{StatsReport::kStatsValueNameDecodingPLCCNG, info.decoding_plc_cng},
{StatsReport::kStatsValueNameJitterBufferMs, info.jitter_buffer_ms},
{StatsReport::kStatsValueNameJitterReceived, info.jitter_ms},

View file

@ -374,9 +374,6 @@ void VerifyVoiceReceiverInfoReport(const StatsReport* report,
EXPECT_TRUE(GetValue(report, StatsReport::kStatsValueNameDecodingPLC,
&value_in_report));
EXPECT_EQ(rtc::ToString(info.decoding_plc), value_in_report);
EXPECT_TRUE(GetValue(report, StatsReport::kStatsValueNameDecodingCodecPLC,
&value_in_report));
EXPECT_EQ(rtc::ToString(info.decoding_codec_plc), value_in_report);
EXPECT_TRUE(GetValue(report, StatsReport::kStatsValueNameDecodingCNG,
&value_in_report));
EXPECT_EQ(rtc::ToString(info.decoding_cng), value_in_report);