| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 printf("%i. Toggle AECdump recording \n", option_index++); | 449 printf("%i. Toggle AECdump recording \n", option_index++); |
| 450 | 450 |
| 451 printf("Select action or %i to stop the call: ", option_index); | 451 printf("Select action or %i to stop the call: ", option_index); |
| 452 int option_selection; | 452 int option_selection; |
| 453 ASSERT_EQ(1, scanf("%i", &option_selection)); | 453 ASSERT_EQ(1, scanf("%i", &option_selection)); |
| 454 | 454 |
| 455 option_index = num_codecs; | 455 option_index = num_codecs; |
| 456 if (option_selection < option_index) { | 456 if (option_selection < option_index) { |
| 457 res = codec->GetCodec(option_selection, cinst); | 457 res = codec->GetCodec(option_selection, cinst); |
| 458 VALIDATE; | 458 VALIDATE; |
| 459 if (strcmp(cinst.plname, "red") == 0) { | 459 SetStereoIfOpus(opus_stereo, &cinst); |
| 460 printf("Enabling RED\n"); | 460 printf("Set primary codec\n"); |
| 461 res = rtp_rtcp->SetREDStatus(chan, true, cinst.pltype); | 461 res = codec->SetSendCodec(chan, cinst); |
| 462 } else { | |
| 463 SetStereoIfOpus(opus_stereo, &cinst); | |
| 464 printf("Set primary codec\n"); | |
| 465 res = codec->SetSendCodec(chan, cinst); | |
| 466 } | |
| 467 VALIDATE; | 462 VALIDATE; |
| 468 } else if (option_selection == option_index++) { | 463 } else if (option_selection == option_index++) { |
| 469 enable_cng = !enable_cng; | 464 enable_cng = !enable_cng; |
| 470 res = codec->SetVADStatus(0, enable_cng); | 465 res = codec->SetVADStatus(0, enable_cng); |
| 471 VALIDATE; | 466 VALIDATE; |
| 472 if (enable_cng) | 467 if (enable_cng) |
| 473 printf("\n CNG is now on! \n"); | 468 printf("\n CNG is now on! \n"); |
| 474 else | 469 else |
| 475 printf("\n CNG is now off! \n"); | 470 printf("\n CNG is now off! \n"); |
| 476 } else if (option_selection == option_index++) { | 471 } else if (option_selection == option_index++) { |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 | 845 |
| 851 printf("Delete channels \n"); | 846 printf("Delete channels \n"); |
| 852 res = base1->DeleteChannel(chan); | 847 res = base1->DeleteChannel(chan); |
| 853 VALIDATE; | 848 VALIDATE; |
| 854 | 849 |
| 855 for (int i = 0; i < kMaxNumChannels; ++i) { | 850 for (int i = 0; i < kMaxNumChannels; ++i) { |
| 856 res = base1->DeleteChannel(channels[i]); | 851 res = base1->DeleteChannel(channels[i]); |
| 857 VALIDATE; | 852 VALIDATE; |
| 858 } | 853 } |
| 859 } | 854 } |
| OLD | NEW |