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_errors.h" | 32 #include "webrtc/voice_engine/include/voe_errors.h" |
34 #include "webrtc/voice_engine/include/voe_external_media.h" | 33 #include "webrtc/voice_engine/include/voe_external_media.h" |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 option_index++); | 440 option_index++); |
442 printf("%i. Add an additional file-playing channel \n", option_index++); | 441 printf("%i. Add an additional file-playing channel \n", option_index++); |
443 printf("%i. Remove a file-playing channel \n", option_index++); | 442 printf("%i. Remove a file-playing channel \n", option_index++); |
444 printf("%i. Toggle Opus stereo (Opus must be selected again to apply " | 443 printf("%i. Toggle Opus stereo (Opus must be selected again to apply " |
445 "the setting) \n", option_index++); | 444 "the setting) \n", option_index++); |
446 printf("%i. Set Opus maximum playback rate \n", option_index++); | 445 printf("%i. Set Opus maximum playback rate \n", option_index++); |
447 printf("%i. Toggle Opus DTX \n", option_index++); | 446 printf("%i. Toggle Opus DTX \n", option_index++); |
448 printf("%i. Set bit rate (only take effect on codecs that allow the " | 447 printf("%i. Set bit rate (only take effect on codecs that allow the " |
449 "change) \n", option_index++); | 448 "change) \n", option_index++); |
450 printf("%i. Toggle AECdump recording \n", option_index++); | 449 printf("%i. Toggle AECdump recording \n", option_index++); |
451 printf("%i. Record RtcEventLog file of 30 seconds \n", option_index++); | |
452 | 450 |
453 printf("Select action or %i to stop the call: ", option_index); | 451 printf("Select action or %i to stop the call: ", option_index); |
454 int option_selection; | 452 int option_selection; |
455 ASSERT_EQ(1, scanf("%i", &option_selection)); | 453 ASSERT_EQ(1, scanf("%i", &option_selection)); |
456 | 454 |
457 option_index = num_codecs; | 455 option_index = num_codecs; |
458 if (option_selection < option_index) { | 456 if (option_selection < option_index) { |
459 res = codec->GetCodec(option_selection, cinst); | 457 res = codec->GetCodec(option_selection, cinst); |
460 VALIDATE; | 458 VALIDATE; |
461 if (strcmp(cinst.plname, "red") == 0) { | 459 if (strcmp(cinst.plname, "red") == 0) { |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 } else if (option_selection == option_index++) { | 786 } else if (option_selection == option_index++) { |
789 const char* kDebugFileName = "audio.aecdump"; | 787 const char* kDebugFileName = "audio.aecdump"; |
790 if (debug_recording_started) { | 788 if (debug_recording_started) { |
791 apm->StopDebugRecording(); | 789 apm->StopDebugRecording(); |
792 printf("Debug recording named %s stopped\n", kDebugFileName); | 790 printf("Debug recording named %s stopped\n", kDebugFileName); |
793 } else { | 791 } else { |
794 apm->StartDebugRecording(kDebugFileName); | 792 apm->StartDebugRecording(kDebugFileName); |
795 printf("Debug recording named %s started\n", kDebugFileName); | 793 printf("Debug recording named %s started\n", kDebugFileName); |
796 } | 794 } |
797 debug_recording_started = !debug_recording_started; | 795 debug_recording_started = !debug_recording_started; |
798 } else if (option_selection == option_index++) { | |
799 const char* kDebugFileName = "eventlog.rel"; | |
800 codec->GetEventLog()->StartLogging(kDebugFileName, 30000); | |
801 } else { | 796 } else { |
802 break; | 797 break; |
803 } | 798 } |
804 } | 799 } |
805 | 800 |
806 if (debug_recording_started) { | 801 if (debug_recording_started) { |
807 apm->StopDebugRecording(); | 802 apm->StopDebugRecording(); |
808 } | 803 } |
809 | 804 |
810 if (send) { | 805 if (send) { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 | 850 |
856 printf("Delete channels \n"); | 851 printf("Delete channels \n"); |
857 res = base1->DeleteChannel(chan); | 852 res = base1->DeleteChannel(chan); |
858 VALIDATE; | 853 VALIDATE; |
859 | 854 |
860 for (int i = 0; i < kMaxNumChannels; ++i) { | 855 for (int i = 0; i < kMaxNumChannels; ++i) { |
861 res = base1->DeleteChannel(channels[i]); | 856 res = base1->DeleteChannel(channels[i]); |
862 VALIDATE; | 857 VALIDATE; |
863 } | 858 } |
864 } | 859 } |
OLD | NEW |