Chromium Code Reviews| 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 |
| 11 #include <stdio.h> | 11 #include <stdio.h> |
| 12 #include <stdlib.h> | 12 #include <stdlib.h> |
| 13 #include <string.h> | 13 #include <string.h> |
| 14 #ifndef _WIN32 | 14 #ifndef _WIN32 |
| 15 #include <unistd.h> | 15 #include <unistd.h> |
| 16 #endif | 16 #endif |
| 17 | 17 |
| 18 #include <memory> | 18 #include <memory> |
| 19 #include <vector> | 19 #include <vector> |
| 20 | 20 |
| 21 #include "gflags/gflags.h" | 21 #include "gflags/gflags.h" |
| 22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
| 23 #include "webrtc/base/format_macros.h" | 23 #include "webrtc/base/format_macros.h" |
| 24 #include "webrtc/call/rtc_event_log.h" | |
| 25 #include "webrtc/engine_configurations.h" | 24 #include "webrtc/engine_configurations.h" |
| 26 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 25 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
| 27 #include "webrtc/test/channel_transport/channel_transport.h" | 26 #include "webrtc/test/channel_transport/channel_transport.h" |
| 28 #include "webrtc/test/testsupport/fileutils.h" | 27 #include "webrtc/test/testsupport/fileutils.h" |
| 29 #include "webrtc/test/testsupport/trace_to_stderr.h" | 28 #include "webrtc/test/testsupport/trace_to_stderr.h" |
| 30 #include "webrtc/voice_engine/include/voe_audio_processing.h" | 29 #include "webrtc/voice_engine/include/voe_audio_processing.h" |
| 31 #include "webrtc/voice_engine/include/voe_base.h" | 30 #include "webrtc/voice_engine/include/voe_base.h" |
| 32 #include "webrtc/voice_engine/include/voe_codec.h" | 31 #include "webrtc/voice_engine/include/voe_codec.h" |
| 33 #include "webrtc/voice_engine/include/voe_dtmf.h" | 32 #include "webrtc/voice_engine/include/voe_dtmf.h" |
| 34 #include "webrtc/voice_engine/include/voe_errors.h" | 33 #include "webrtc/voice_engine/include/voe_errors.h" |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 447 option_index++); | 446 option_index++); |
| 448 printf("%i. Add an additional file-playing channel \n", option_index++); | 447 printf("%i. Add an additional file-playing channel \n", option_index++); |
| 449 printf("%i. Remove a file-playing channel \n", option_index++); | 448 printf("%i. Remove a file-playing channel \n", option_index++); |
| 450 printf("%i. Toggle Opus stereo (Opus must be selected again to apply " | 449 printf("%i. Toggle Opus stereo (Opus must be selected again to apply " |
| 451 "the setting) \n", option_index++); | 450 "the setting) \n", option_index++); |
| 452 printf("%i. Set Opus maximum playback rate \n", option_index++); | 451 printf("%i. Set Opus maximum playback rate \n", option_index++); |
| 453 printf("%i. Toggle Opus DTX \n", option_index++); | 452 printf("%i. Toggle Opus DTX \n", option_index++); |
| 454 printf("%i. Set bit rate (only take effect on codecs that allow the " | 453 printf("%i. Set bit rate (only take effect on codecs that allow the " |
| 455 "change) \n", option_index++); | 454 "change) \n", option_index++); |
| 456 printf("%i. Toggle AECdump recording \n", option_index++); | 455 printf("%i. Toggle AECdump recording \n", option_index++); |
| 457 printf("%i. Record RtcEventLog file of 30 seconds \n", option_index++); | |
| 458 | 456 |
| 459 printf("Select action or %i to stop the call: ", option_index); | 457 printf("Select action or %i to stop the call: ", option_index); |
| 460 int option_selection; | 458 int option_selection; |
| 461 ASSERT_EQ(1, scanf("%i", &option_selection)); | 459 ASSERT_EQ(1, scanf("%i", &option_selection)); |
| 462 | 460 |
| 463 option_index = num_codecs; | 461 option_index = num_codecs; |
| 464 if (option_selection < option_index) { | 462 if (option_selection < option_index) { |
| 465 res = codec->GetCodec(option_selection, cinst); | 463 res = codec->GetCodec(option_selection, cinst); |
| 466 VALIDATE; | 464 VALIDATE; |
| 467 if (strcmp(cinst.plname, "red") == 0) { | 465 if (strcmp(cinst.plname, "red") == 0) { |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 794 } else if (option_selection == option_index++) { | 792 } else if (option_selection == option_index++) { |
| 795 const char* kDebugFileName = "audio.aecdump"; | 793 const char* kDebugFileName = "audio.aecdump"; |
| 796 if (debug_recording_started) { | 794 if (debug_recording_started) { |
| 797 apm->StopDebugRecording(); | 795 apm->StopDebugRecording(); |
| 798 printf("Debug recording named %s stopped\n", kDebugFileName); | 796 printf("Debug recording named %s stopped\n", kDebugFileName); |
| 799 } else { | 797 } else { |
| 800 apm->StartDebugRecording(kDebugFileName); | 798 apm->StartDebugRecording(kDebugFileName); |
| 801 printf("Debug recording named %s started\n", kDebugFileName); | 799 printf("Debug recording named %s started\n", kDebugFileName); |
| 802 } | 800 } |
| 803 debug_recording_started = !debug_recording_started; | 801 debug_recording_started = !debug_recording_started; |
| 804 } else if (option_selection == option_index++) { | |
| 805 const char* kDebugFileName = "eventlog.rel"; | |
| 806 codec->GetEventLog()->StartLogging(kDebugFileName, 30000); | |
|
the sun
2016/03/03 09:25:13
Add a test at the PeerConnection level which exerc
ivoc
2016/03/10 13:15:36
This is a little complicated to do, because there
| |
| 807 } else { | 802 } else { |
| 808 break; | 803 break; |
| 809 } | 804 } |
| 810 } | 805 } |
| 811 | 806 |
| 812 if (debug_recording_started) { | 807 if (debug_recording_started) { |
| 813 apm->StopDebugRecording(); | 808 apm->StopDebugRecording(); |
| 814 } | 809 } |
| 815 | 810 |
| 816 if (send) { | 811 if (send) { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 861 | 856 |
| 862 printf("Delete channels \n"); | 857 printf("Delete channels \n"); |
| 863 res = base1->DeleteChannel(chan); | 858 res = base1->DeleteChannel(chan); |
| 864 VALIDATE; | 859 VALIDATE; |
| 865 | 860 |
| 866 for (int i = 0; i < kMaxNumChannels; ++i) { | 861 for (int i = 0; i < kMaxNumChannels; ++i) { |
| 867 res = base1->DeleteChannel(channels[i]); | 862 res = base1->DeleteChannel(channels[i]); |
| 868 VALIDATE; | 863 VALIDATE; |
| 869 } | 864 } |
| 870 } | 865 } |
| OLD | NEW |