Re-enable almost all NetEqDecodingTests for Android
All but three tests in NetEqDecodingTest could be re-enabled without any changes. Also making sure that the TestNetworkStatistics test exits on first diff. (Otherwise, the log output gets flooded with error messages.) The tests that are still disabled are: NetEqDecodingTest.TestBitExactness NetEqDecodingTest.TestNetworkStatistics NetEqDecodingTest.DecoderError BUG=3343 R=turaj@webrtc.org Review URL: https://webrtc-codereview.appspot.com/20489004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6168 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
7cb4752184
commit
b4e80e095f
@ -141,7 +141,7 @@ void RefFiles::ReadFromFileAndCompare(
|
|||||||
NetEqNetworkStatistics ref_stats;
|
NetEqNetworkStatistics ref_stats;
|
||||||
ASSERT_EQ(1u, fread(&ref_stats, stat_size, 1, input_fp_));
|
ASSERT_EQ(1u, fread(&ref_stats, stat_size, 1, input_fp_));
|
||||||
// Compare
|
// Compare
|
||||||
EXPECT_EQ(0, memcmp(&stats, &ref_stats, stat_size));
|
ASSERT_EQ(0, memcmp(&stats, &ref_stats, stat_size));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,11 +174,11 @@ void RefFiles::ReadFromFileAndCompare(
|
|||||||
ASSERT_EQ(1u, fread(&(ref_stats.jitter), sizeof(ref_stats.jitter), 1,
|
ASSERT_EQ(1u, fread(&(ref_stats.jitter), sizeof(ref_stats.jitter), 1,
|
||||||
input_fp_));
|
input_fp_));
|
||||||
// Compare
|
// Compare
|
||||||
EXPECT_EQ(ref_stats.fraction_lost, stats.fraction_lost);
|
ASSERT_EQ(ref_stats.fraction_lost, stats.fraction_lost);
|
||||||
EXPECT_EQ(ref_stats.cumulative_lost, stats.cumulative_lost);
|
ASSERT_EQ(ref_stats.cumulative_lost, stats.cumulative_lost);
|
||||||
EXPECT_EQ(ref_stats.extended_max_sequence_number,
|
ASSERT_EQ(ref_stats.extended_max_sequence_number,
|
||||||
stats.extended_max_sequence_number);
|
stats.extended_max_sequence_number);
|
||||||
EXPECT_EQ(ref_stats.jitter, stats.jitter);
|
ASSERT_EQ(ref_stats.jitter, stats.jitter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -381,19 +381,20 @@ void NetEqDecodingTest::DecodeAndCheckStats(const std::string &rtp_file,
|
|||||||
ASSERT_GT(rtp.readFromFile(rtp_fp_), 0);
|
ASSERT_GT(rtp.readFromFile(rtp_fp_), 0);
|
||||||
while (rtp.dataLen() >= 0) {
|
while (rtp.dataLen() >= 0) {
|
||||||
int out_len;
|
int out_len;
|
||||||
Process(&rtp, &out_len);
|
ASSERT_NO_FATAL_FAILURE(Process(&rtp, &out_len));
|
||||||
|
|
||||||
// Query the network statistics API once per second
|
// Query the network statistics API once per second
|
||||||
if (sim_clock_ % 1000 == 0) {
|
if (sim_clock_ % 1000 == 0) {
|
||||||
// Process NetworkStatistics.
|
// Process NetworkStatistics.
|
||||||
NetEqNetworkStatistics network_stats;
|
NetEqNetworkStatistics network_stats;
|
||||||
ASSERT_EQ(0, neteq_->NetworkStatistics(&network_stats));
|
ASSERT_EQ(0, neteq_->NetworkStatistics(&network_stats));
|
||||||
network_stat_files.ProcessReference(network_stats);
|
ASSERT_NO_FATAL_FAILURE(
|
||||||
|
network_stat_files.ProcessReference(network_stats));
|
||||||
|
|
||||||
// Process RTCPstat.
|
// Process RTCPstat.
|
||||||
RtcpStatistics rtcp_stats;
|
RtcpStatistics rtcp_stats;
|
||||||
neteq_->GetRtcpStatistics(&rtcp_stats);
|
neteq_->GetRtcpStatistics(&rtcp_stats);
|
||||||
rtcp_stat_files.ProcessReference(rtcp_stats);
|
ASSERT_NO_FATAL_FAILURE(rtcp_stat_files.ProcessReference(rtcp_stats));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -573,7 +574,7 @@ TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(TestNetworkStatistics)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO(hlundin): Re-enable test once the statistics interface is up and again.
|
// TODO(hlundin): Re-enable test once the statistics interface is up and again.
|
||||||
TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(TestFrameWaitingTimeStatistics)) {
|
TEST_F(NetEqDecodingTest, TestFrameWaitingTimeStatistics) {
|
||||||
// Use fax mode to avoid time-scaling. This is to simplify the testing of
|
// Use fax mode to avoid time-scaling. This is to simplify the testing of
|
||||||
// packet waiting times in the packet buffer.
|
// packet waiting times in the packet buffer.
|
||||||
neteq_->SetPlayoutMode(kPlayoutFax);
|
neteq_->SetPlayoutMode(kPlayoutFax);
|
||||||
@ -647,8 +648,7 @@ TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(TestFrameWaitingTimeStatistics)) {
|
|||||||
EXPECT_EQ(100u, waiting_times.size());
|
EXPECT_EQ(100u, waiting_times.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(NetEqDecodingTest,
|
TEST_F(NetEqDecodingTest, TestAverageInterArrivalTimeNegative) {
|
||||||
DISABLED_ON_ANDROID(TestAverageInterArrivalTimeNegative)) {
|
|
||||||
const int kNumFrames = 3000; // Needed for convergence.
|
const int kNumFrames = 3000; // Needed for convergence.
|
||||||
int frame_index = 0;
|
int frame_index = 0;
|
||||||
const int kSamples = 10 * 16;
|
const int kSamples = 10 * 16;
|
||||||
@ -679,8 +679,7 @@ TEST_F(NetEqDecodingTest,
|
|||||||
EXPECT_EQ(-103196, network_stats.clockdrift_ppm);
|
EXPECT_EQ(-103196, network_stats.clockdrift_ppm);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(NetEqDecodingTest,
|
TEST_F(NetEqDecodingTest, TestAverageInterArrivalTimePositive) {
|
||||||
DISABLED_ON_ANDROID(TestAverageInterArrivalTimePositive)) {
|
|
||||||
const int kNumFrames = 5000; // Needed for convergence.
|
const int kNumFrames = 5000; // Needed for convergence.
|
||||||
int frame_index = 0;
|
int frame_index = 0;
|
||||||
const int kSamples = 10 * 16;
|
const int kSamples = 10 * 16;
|
||||||
@ -847,7 +846,7 @@ void NetEqDecodingTest::LongCngWithClockDrift(double drift_factor,
|
|||||||
EXPECT_GE(delay_after, delay_before - delay_tolerance_ms * 16);
|
EXPECT_GE(delay_after, delay_before - delay_tolerance_ms * 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(LongCngWithNegativeClockDrift)) {
|
TEST_F(NetEqDecodingTest, LongCngWithNegativeClockDrift) {
|
||||||
// Apply a clock drift of -25 ms / s (sender faster than receiver).
|
// Apply a clock drift of -25 ms / s (sender faster than receiver).
|
||||||
const double kDriftFactor = 1000.0 / (1000.0 + 25.0);
|
const double kDriftFactor = 1000.0 / (1000.0 + 25.0);
|
||||||
const double kNetworkFreezeTimeMs = 0.0;
|
const double kNetworkFreezeTimeMs = 0.0;
|
||||||
@ -861,7 +860,7 @@ TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(LongCngWithNegativeClockDrift)) {
|
|||||||
kMaxTimeToSpeechMs);
|
kMaxTimeToSpeechMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(LongCngWithPositiveClockDrift)) {
|
TEST_F(NetEqDecodingTest, LongCngWithPositiveClockDrift) {
|
||||||
// Apply a clock drift of +25 ms / s (sender slower than receiver).
|
// Apply a clock drift of +25 ms / s (sender slower than receiver).
|
||||||
const double kDriftFactor = 1000.0 / (1000.0 - 25.0);
|
const double kDriftFactor = 1000.0 / (1000.0 - 25.0);
|
||||||
const double kNetworkFreezeTimeMs = 0.0;
|
const double kNetworkFreezeTimeMs = 0.0;
|
||||||
@ -875,8 +874,7 @@ TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(LongCngWithPositiveClockDrift)) {
|
|||||||
kMaxTimeToSpeechMs);
|
kMaxTimeToSpeechMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(NetEqDecodingTest,
|
TEST_F(NetEqDecodingTest, LongCngWithNegativeClockDriftNetworkFreeze) {
|
||||||
DISABLED_ON_ANDROID(LongCngWithNegativeClockDriftNetworkFreeze)) {
|
|
||||||
// Apply a clock drift of -25 ms / s (sender faster than receiver).
|
// Apply a clock drift of -25 ms / s (sender faster than receiver).
|
||||||
const double kDriftFactor = 1000.0 / (1000.0 + 25.0);
|
const double kDriftFactor = 1000.0 / (1000.0 + 25.0);
|
||||||
const double kNetworkFreezeTimeMs = 5000.0;
|
const double kNetworkFreezeTimeMs = 5000.0;
|
||||||
@ -890,8 +888,7 @@ TEST_F(NetEqDecodingTest,
|
|||||||
kMaxTimeToSpeechMs);
|
kMaxTimeToSpeechMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(NetEqDecodingTest,
|
TEST_F(NetEqDecodingTest, LongCngWithPositiveClockDriftNetworkFreeze) {
|
||||||
DISABLED_ON_ANDROID(LongCngWithPositiveClockDriftNetworkFreeze)) {
|
|
||||||
// Apply a clock drift of +25 ms / s (sender slower than receiver).
|
// Apply a clock drift of +25 ms / s (sender slower than receiver).
|
||||||
const double kDriftFactor = 1000.0 / (1000.0 - 25.0);
|
const double kDriftFactor = 1000.0 / (1000.0 - 25.0);
|
||||||
const double kNetworkFreezeTimeMs = 5000.0;
|
const double kNetworkFreezeTimeMs = 5000.0;
|
||||||
@ -905,9 +902,7 @@ TEST_F(NetEqDecodingTest,
|
|||||||
kMaxTimeToSpeechMs);
|
kMaxTimeToSpeechMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(
|
TEST_F(NetEqDecodingTest, LongCngWithPositiveClockDriftNetworkFreezeExtraPull) {
|
||||||
NetEqDecodingTest,
|
|
||||||
DISABLED_ON_ANDROID(LongCngWithPositiveClockDriftNetworkFreezeExtraPull)) {
|
|
||||||
// Apply a clock drift of +25 ms / s (sender slower than receiver).
|
// Apply a clock drift of +25 ms / s (sender slower than receiver).
|
||||||
const double kDriftFactor = 1000.0 / (1000.0 - 25.0);
|
const double kDriftFactor = 1000.0 / (1000.0 - 25.0);
|
||||||
const double kNetworkFreezeTimeMs = 5000.0;
|
const double kNetworkFreezeTimeMs = 5000.0;
|
||||||
@ -921,7 +916,7 @@ TEST_F(
|
|||||||
kMaxTimeToSpeechMs);
|
kMaxTimeToSpeechMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(LongCngWithoutClockDrift)) {
|
TEST_F(NetEqDecodingTest, LongCngWithoutClockDrift) {
|
||||||
const double kDriftFactor = 1.0; // No drift.
|
const double kDriftFactor = 1.0; // No drift.
|
||||||
const double kNetworkFreezeTimeMs = 0.0;
|
const double kNetworkFreezeTimeMs = 0.0;
|
||||||
const bool kGetAudioDuringFreezeRecovery = false;
|
const bool kGetAudioDuringFreezeRecovery = false;
|
||||||
@ -934,7 +929,7 @@ TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(LongCngWithoutClockDrift)) {
|
|||||||
kMaxTimeToSpeechMs);
|
kMaxTimeToSpeechMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(UnknownPayloadType)) {
|
TEST_F(NetEqDecodingTest, UnknownPayloadType) {
|
||||||
const int kPayloadBytes = 100;
|
const int kPayloadBytes = 100;
|
||||||
uint8_t payload[kPayloadBytes] = {0};
|
uint8_t payload[kPayloadBytes] = {0};
|
||||||
WebRtcRTPHeader rtp_info;
|
WebRtcRTPHeader rtp_info;
|
||||||
@ -984,7 +979,7 @@ TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(DecoderError)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(GetAudioBeforeInsertPacket)) {
|
TEST_F(NetEqDecodingTest, GetAudioBeforeInsertPacket) {
|
||||||
NetEqOutputType type;
|
NetEqOutputType type;
|
||||||
// Set all of |out_data_| to 1, and verify that it was set to 0 by the call
|
// Set all of |out_data_| to 1, and verify that it was set to 0 by the call
|
||||||
// to GetAudio.
|
// to GetAudio.
|
||||||
@ -1007,7 +1002,7 @@ TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(GetAudioBeforeInsertPacket)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(BackgroundNoise)) {
|
TEST_F(NetEqDecodingTest, BackgroundNoise) {
|
||||||
neteq_->SetBackgroundNoiseMode(kBgnOn);
|
neteq_->SetBackgroundNoiseMode(kBgnOn);
|
||||||
CheckBgnOff(8000, kBgnOn);
|
CheckBgnOff(8000, kBgnOn);
|
||||||
CheckBgnOff(16000, kBgnOn);
|
CheckBgnOff(16000, kBgnOn);
|
||||||
@ -1027,7 +1022,7 @@ TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(BackgroundNoise)) {
|
|||||||
EXPECT_EQ(kBgnFade, neteq_->BackgroundNoiseMode());
|
EXPECT_EQ(kBgnFade, neteq_->BackgroundNoiseMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(SyncPacketInsert)) {
|
TEST_F(NetEqDecodingTest, SyncPacketInsert) {
|
||||||
WebRtcRTPHeader rtp_info;
|
WebRtcRTPHeader rtp_info;
|
||||||
uint32_t receive_timestamp = 0;
|
uint32_t receive_timestamp = 0;
|
||||||
// For the readability use the following payloads instead of the defaults of
|
// For the readability use the following payloads instead of the defaults of
|
||||||
@ -1109,7 +1104,7 @@ TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(SyncPacketInsert)) {
|
|||||||
// TODO(turajs) we will have a better test if we have a referece NetEq, and
|
// TODO(turajs) we will have a better test if we have a referece NetEq, and
|
||||||
// when Sync packets are inserted in "test" NetEq we insert all-zero payload
|
// when Sync packets are inserted in "test" NetEq we insert all-zero payload
|
||||||
// in reference NetEq and compare the output of those two.
|
// in reference NetEq and compare the output of those two.
|
||||||
TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(SyncPacketDecode)) {
|
TEST_F(NetEqDecodingTest, SyncPacketDecode) {
|
||||||
WebRtcRTPHeader rtp_info;
|
WebRtcRTPHeader rtp_info;
|
||||||
PopulateRtpInfo(0, 0, &rtp_info);
|
PopulateRtpInfo(0, 0, &rtp_info);
|
||||||
const int kPayloadBytes = kBlockSize16kHz * sizeof(int16_t);
|
const int kPayloadBytes = kBlockSize16kHz * sizeof(int16_t);
|
||||||
@ -1188,8 +1183,7 @@ TEST_F(NetEqDecodingTest, DISABLED_ON_ANDROID(SyncPacketDecode)) {
|
|||||||
// sync packets. Also, test if network packets override sync packets. That is to
|
// sync packets. Also, test if network packets override sync packets. That is to
|
||||||
// prefer decoding a network packet to a sync packet, if both have same sequence
|
// prefer decoding a network packet to a sync packet, if both have same sequence
|
||||||
// number and timestamp.
|
// number and timestamp.
|
||||||
TEST_F(NetEqDecodingTest,
|
TEST_F(NetEqDecodingTest, SyncPacketBufferSizeAndOverridenByNetworkPackets) {
|
||||||
DISABLED_ON_ANDROID(SyncPacketBufferSizeAndOverridenByNetworkPackets)) {
|
|
||||||
WebRtcRTPHeader rtp_info;
|
WebRtcRTPHeader rtp_info;
|
||||||
PopulateRtpInfo(0, 0, &rtp_info);
|
PopulateRtpInfo(0, 0, &rtp_info);
|
||||||
const int kPayloadBytes = kBlockSize16kHz * sizeof(int16_t);
|
const int kPayloadBytes = kBlockSize16kHz * sizeof(int16_t);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user