diff --git a/AUTHORS b/AUTHORS index eec1a87a8c..eb393ef057 100644 --- a/AUTHORS +++ b/AUTHORS @@ -80,6 +80,7 @@ Maksim Sisov Maxim Pavlov Maxim Potapov Michael Iedema +Michael Klingbeil MichaƂ Zarach Michel Promonet Miguel Paris diff --git a/modules/audio_coding/neteq/tools/rtp_encode.cc b/modules/audio_coding/neteq/tools/rtp_encode.cc index e7fca1b5c5..0dfa8764b2 100644 --- a/modules/audio_coding/neteq/tools/rtp_encode.cc +++ b/modules/audio_coding/neteq/tools/rtp_encode.cc @@ -42,7 +42,7 @@ ABSL_FLAG(int, frame_len, 0, "Frame length in ms; 0 indicates codec default value"); -ABSL_FLAG(int, bitrate, 0, "Bitrate in kbps; 0 indicates codec default value"); +ABSL_FLAG(int, bitrate, 0, "Bitrate in bps; 0 indicates codec default value"); ABSL_FLAG(int, payload_type, -1, @@ -54,6 +54,8 @@ ABSL_FLAG(int, ABSL_FLAG(int, ssrc, 0, "SSRC to write to the RTP header"); ABSL_FLAG(bool, dtx, false, "Use DTX/CNG"); ABSL_FLAG(int, sample_rate, 48000, "Sample rate of the input file"); +ABSL_FLAG(bool, fec, false, "Use Opus FEC"); +ABSL_FLAG(int, expected_loss, 0, "Expected packet loss percentage"); namespace webrtc { namespace test { @@ -202,6 +204,7 @@ std::unique_ptr CreateEncoder(CodecType codec_type, config.bitrate_bps = absl::GetFlag(FLAGS_bitrate); } config.dtx_enabled = absl::GetFlag(FLAGS_dtx); + config.fec_enabled = absl::GetFlag(FLAGS_fec); RTC_CHECK(config.IsOk()); return AudioEncoderOpus::MakeAudioEncoder(config, payload_type); } @@ -309,6 +312,7 @@ int RunRtpEncode(int argc, char* argv[]) { const int timestamp_rate_hz = codec->RtpTimestampRateHz(); auto acm(AudioCodingModule::Create()); acm->SetEncoder(std::move(codec)); + acm->SetPacketLossRate(absl::GetFlag(FLAGS_expected_loss)); // Open files. printf("Input file: %s\n", args[1]);