From 4521e2d0bde20a475875095831faf25cc2348e31 Mon Sep 17 00:00:00 2001 From: "minyue@webrtc.org" Date: Thu, 14 Aug 2014 12:15:27 +0000 Subject: [PATCH] Adding online bitrate change to voe_cmd_test This is to verify a way of changing the bitrate on-the-fly under current WebRTC implementation. TEST=changing bit rate for different codecs. sound quality changed when bit rate was set successful. catched error when bit rate is invalid for a running codec. BUG= R=andrew@webrtc.org, tina.legrand@webrtc.org Review URL: https://webrtc-codereview.appspot.com/17059004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6901 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc b/webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc index 5e636459b..b5d2dca8c 100644 --- a/webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc +++ b/webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc @@ -446,6 +446,8 @@ void RunTest(std::string out_path) { printf("%i. Toggle Opus stereo (Opus must be selected again to apply " "the setting) \n", option_index++); printf("%i. Set Opus maximum audio bandwidth \n", option_index++); + printf("%i. Set bit rate (only take effect on codecs that allow the " + "change) \n", option_index++); printf("Select action or %i to stop the call: ", option_index); int option_selection; @@ -764,6 +766,13 @@ void RunTest(std::string out_path) { ASSERT_EQ(1, scanf("%i", &max_playback_rate)); res = codec->SetOpusMaxBandwidth(chan, max_playback_rate); VALIDATE; + } else if (option_selection == option_index++) { + res = codec->GetSendCodec(chan, cinst); + VALIDATE; + printf("Current bit rate is %i bps, set to: ", cinst.rate); + ASSERT_EQ(1, scanf("%i", &cinst.rate)); + res = codec->SetSendCodec(chan, cinst); + VALIDATE; } else { break; }