Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc

Issue 2111813002: Revert of Move RtcEventLog object from inside VoiceEngine to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
24 #include "webrtc/engine_configurations.h" 25 #include "webrtc/engine_configurations.h"
25 #include "webrtc/modules/audio_processing/include/audio_processing.h" 26 #include "webrtc/modules/audio_processing/include/audio_processing.h"
26 #include "webrtc/test/channel_transport/channel_transport.h" 27 #include "webrtc/test/channel_transport/channel_transport.h"
27 #include "webrtc/test/testsupport/fileutils.h" 28 #include "webrtc/test/testsupport/fileutils.h"
28 #include "webrtc/test/testsupport/trace_to_stderr.h" 29 #include "webrtc/test/testsupport/trace_to_stderr.h"
29 #include "webrtc/voice_engine/include/voe_audio_processing.h" 30 #include "webrtc/voice_engine/include/voe_audio_processing.h"
30 #include "webrtc/voice_engine/include/voe_base.h" 31 #include "webrtc/voice_engine/include/voe_base.h"
31 #include "webrtc/voice_engine/include/voe_codec.h" 32 #include "webrtc/voice_engine/include/voe_codec.h"
32 #include "webrtc/voice_engine/include/voe_errors.h" 33 #include "webrtc/voice_engine/include/voe_errors.h"
33 #include "webrtc/voice_engine/include/voe_external_media.h" 34 #include "webrtc/voice_engine/include/voe_external_media.h"
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 option_index++); 441 option_index++);
441 printf("%i. Add an additional file-playing channel \n", option_index++); 442 printf("%i. Add an additional file-playing channel \n", option_index++);
442 printf("%i. Remove a file-playing channel \n", option_index++); 443 printf("%i. Remove a file-playing channel \n", option_index++);
443 printf("%i. Toggle Opus stereo (Opus must be selected again to apply " 444 printf("%i. Toggle Opus stereo (Opus must be selected again to apply "
444 "the setting) \n", option_index++); 445 "the setting) \n", option_index++);
445 printf("%i. Set Opus maximum playback rate \n", option_index++); 446 printf("%i. Set Opus maximum playback rate \n", option_index++);
446 printf("%i. Toggle Opus DTX \n", option_index++); 447 printf("%i. Toggle Opus DTX \n", option_index++);
447 printf("%i. Set bit rate (only take effect on codecs that allow the " 448 printf("%i. Set bit rate (only take effect on codecs that allow the "
448 "change) \n", option_index++); 449 "change) \n", option_index++);
449 printf("%i. Toggle AECdump recording \n", option_index++); 450 printf("%i. Toggle AECdump recording \n", option_index++);
451 printf("%i. Record RtcEventLog file of 30 seconds \n", option_index++);
450 452
451 printf("Select action or %i to stop the call: ", option_index); 453 printf("Select action or %i to stop the call: ", option_index);
452 int option_selection; 454 int option_selection;
453 ASSERT_EQ(1, scanf("%i", &option_selection)); 455 ASSERT_EQ(1, scanf("%i", &option_selection));
454 456
455 option_index = num_codecs; 457 option_index = num_codecs;
456 if (option_selection < option_index) { 458 if (option_selection < option_index) {
457 res = codec->GetCodec(option_selection, cinst); 459 res = codec->GetCodec(option_selection, cinst);
458 VALIDATE; 460 VALIDATE;
459 if (strcmp(cinst.plname, "red") == 0) { 461 if (strcmp(cinst.plname, "red") == 0) {
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 } else if (option_selection == option_index++) { 788 } else if (option_selection == option_index++) {
787 const char* kDebugFileName = "audio.aecdump"; 789 const char* kDebugFileName = "audio.aecdump";
788 if (debug_recording_started) { 790 if (debug_recording_started) {
789 apm->StopDebugRecording(); 791 apm->StopDebugRecording();
790 printf("Debug recording named %s stopped\n", kDebugFileName); 792 printf("Debug recording named %s stopped\n", kDebugFileName);
791 } else { 793 } else {
792 apm->StartDebugRecording(kDebugFileName); 794 apm->StartDebugRecording(kDebugFileName);
793 printf("Debug recording named %s started\n", kDebugFileName); 795 printf("Debug recording named %s started\n", kDebugFileName);
794 } 796 }
795 debug_recording_started = !debug_recording_started; 797 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);
796 } else { 801 } else {
797 break; 802 break;
798 } 803 }
799 } 804 }
800 805
801 if (debug_recording_started) { 806 if (debug_recording_started) {
802 apm->StopDebugRecording(); 807 apm->StopDebugRecording();
803 } 808 }
804 809
805 if (send) { 810 if (send) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 855
851 printf("Delete channels \n"); 856 printf("Delete channels \n");
852 res = base1->DeleteChannel(chan); 857 res = base1->DeleteChannel(chan);
853 VALIDATE; 858 VALIDATE;
854 859
855 for (int i = 0; i < kMaxNumChannels; ++i) { 860 for (int i = 0; i < kMaxNumChannels; ++i) {
856 res = base1->DeleteChannel(channels[i]); 861 res = base1->DeleteChannel(channels[i]);
857 VALIDATE; 862 VALIDATE;
858 } 863 }
859 } 864 }
OLDNEW
« no previous file with comments | « webrtc/voice_engine/test/auto_test/standard/codec_test.cc ('k') | webrtc/voice_engine/voe_codec_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698