diff --git a/test/scenario/audio_stream.cc b/test/scenario/audio_stream.cc index d924275803..2cbd37d723 100644 --- a/test/scenario/audio_stream.cc +++ b/test/scenario/audio_stream.cc @@ -79,6 +79,8 @@ SendAudioStream::SendAudioStream( if (config.encoder.initial_frame_length != TimeDelta::ms(20)) sdp_params["ptime"] = std::to_string(config.encoder.initial_frame_length.ms()); + if (config.encoder.enable_dtx) + sdp_params["usedtx"] = "1"; // SdpAudioFormat::num_channels indicates that the encoder is capable of // stereo, but the actual channel count used is based on the "stereo" @@ -156,6 +158,10 @@ void SendAudioStream::Start() { sender_->call_->SignalChannelNetworkState(MediaType::AUDIO, kNetworkUp); } +void SendAudioStream::SetMuted(bool mute) { + send_stream_->SetMuted(mute); +} + ColumnPrinter SendAudioStream::StatsPrinter() { return ColumnPrinter::Lambda( "audio_target_rate", diff --git a/test/scenario/audio_stream.h b/test/scenario/audio_stream.h index 430e333470..2fc1fb7a34 100644 --- a/test/scenario/audio_stream.h +++ b/test/scenario/audio_stream.h @@ -29,6 +29,7 @@ class SendAudioStream { RTC_DISALLOW_COPY_AND_ASSIGN(SendAudioStream); ~SendAudioStream(); void Start(); + void SetMuted(bool mute); ColumnPrinter StatsPrinter(); private: diff --git a/test/scenario/scenario_config.h b/test/scenario/scenario_config.h index fc0da056fb..fb6e40e330 100644 --- a/test/scenario/scenario_config.h +++ b/test/scenario/scenario_config.h @@ -169,6 +169,7 @@ struct AudioStreamConfig { Encoder(const Encoder&); ~Encoder(); bool allocate_bitrate = false; + bool enable_dtx = false; absl::optional fixed_rate; absl::optional min_rate; absl::optional max_rate;