Index: webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc |
diff --git a/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc b/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc |
index eee586d1dd6d2e1292942bae8c50e9d90f4ed9d4..809995c5a485b4582bb37e0cc3434cafea831b3a 100644 |
--- a/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc |
+++ b/webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc |
@@ -28,22 +28,9 @@ const int kOutputSizeMs = 10; |
const int kInitSeed = 0x12345678; |
const int kPacketLossTimeUnitMs = 10; |
-// Common validator for file names. |
-static bool ValidateFilename(const string& value, bool write) { |
- FILE* fid = write ? fopen(value.c_str(), "wb") : fopen(value.c_str(), "rb"); |
- if (fid == nullptr) |
- return false; |
- fclose(fid); |
- return true; |
-} |
- |
// Define switch for input file name. |
static bool ValidateInFilename(const char* flagname, const string& value) { |
- if (!ValidateFilename(value, false)) { |
- printf("Invalid input filename."); |
- return false; |
- } |
- return true; |
+ return false; |
} |
DEFINE_string( |
@@ -57,9 +44,6 @@ static const bool in_filename_dummy = |
// Define switch for sample rate. |
static bool ValidateSampleRate(const char* flagname, int32_t value) { |
- if (value == 8000 || value == 16000 || value == 32000 || value == 48000) |
- return true; |
- printf("Invalid sample rate should be 8000, 16000, 32000 or 48000 Hz."); |
return false; |
} |
@@ -70,9 +54,6 @@ static const bool sample_rate_dummy = |
// Define switch for channels. |
static bool ValidateChannels(const char* flagname, int32_t value) { |
- if (value == 1) |
- return true; |
- printf("Invalid number of channels, current support only 1."); |
return false; |
} |
@@ -83,11 +64,7 @@ static const bool channels_dummy = |
// Define switch for output file name. |
static bool ValidateOutFilename(const char* flagname, const string& value) { |
- if (!ValidateFilename(value, true)) { |
- printf("Invalid output filename."); |
- return false; |
- } |
- return true; |
+ return false; |
} |
DEFINE_string(out_filename, |
@@ -99,17 +76,11 @@ static const bool out_filename_dummy = |
// Define switch for packet loss rate. |
static bool ValidatePacketLossRate(const char* /* flag_name */, int32_t value) { |
- if (value >= 0 && value <= 100) |
- return true; |
- printf("Invalid packet loss percentile, should be between 0 and 100."); |
return false; |
} |
// Define switch for runtime. |
static bool ValidateRuntime(const char* flagname, int32_t value) { |
- if (value > 0) |
- return true; |
- printf("Invalid runtime, should be greater than 0."); |
return false; |
} |
@@ -125,9 +96,6 @@ static const bool packet_loss_rate_dummy = |
// Define switch for random loss mode. |
static bool ValidateRandomLossMode(const char* /* flag_name */, int32_t value) { |
- if (value >= 0 && value <= 2) |
- return true; |
- printf("Invalid random packet loss mode, should be between 0 and 2."); |
return false; |
} |
@@ -138,10 +106,6 @@ static const bool random_loss_mode_dummy = |
// Define switch for burst length. |
static bool ValidateBurstLength(const char* /* flag_name */, int32_t value) { |
- if (value >= kPacketLossTimeUnitMs) |
- return true; |
- printf("Invalid burst length, should be greater than %d ms.", |
- kPacketLossTimeUnitMs); |
return false; |
} |
@@ -153,9 +117,6 @@ static const bool burst_length_dummy = |
// Define switch for drift factor. |
static bool ValidateDriftFactor(const char* /* flag_name */, double value) { |
- if (value > -0.1) |
- return true; |
- printf("Invalid drift factor, should be greater than -0.1."); |
return false; |
} |