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

Side by Side Diff: webrtc/voice_engine/voe_audio_processing_impl.cc

Issue 1413483003: Added option to specify a maximum file size when recording an AEC dump. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Initial version Created 5 years, 1 month 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
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), 923 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
924 "StartDebugRecording()"); 924 "StartDebugRecording()");
925 if (!_shared->statistics().Initialized()) { 925 if (!_shared->statistics().Initialized()) {
926 _shared->SetLastError(VE_NOT_INITED, kTraceError); 926 _shared->SetLastError(VE_NOT_INITED, kTraceError);
927 return -1; 927 return -1;
928 } 928 }
929 929
930 return _shared->audio_processing()->StartDebugRecording(fileNameUTF8); 930 return _shared->audio_processing()->StartDebugRecording(fileNameUTF8);
931 } 931 }
932 932
933 int VoEAudioProcessingImpl::StartDebugRecording(const char* fileNameUTF8,
934 int max_size_bytes) {
935 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
936 "StartDebugRecording()");
937 if (!_shared->statistics().Initialized()) {
938 _shared->SetLastError(VE_NOT_INITED, kTraceError);
939 return -1;
940 }
941
942 return _shared->audio_processing()->StartDebugRecording(fileNameUTF8,
943 max_size_bytes);
944 }
kwiberg-webrtc 2015/10/25 02:29:12 Duplicates code from the preceding function. Can y
ivoc 2015/11/05 13:14:46 This code has been removed in the new version.
945
933 int VoEAudioProcessingImpl::StartDebugRecording(FILE* file_handle) { 946 int VoEAudioProcessingImpl::StartDebugRecording(FILE* file_handle) {
934 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), 947 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
935 "StartDebugRecording()"); 948 "StartDebugRecording()");
936 if (!_shared->statistics().Initialized()) { 949 if (!_shared->statistics().Initialized()) {
937 _shared->SetLastError(VE_NOT_INITED, kTraceError); 950 _shared->SetLastError(VE_NOT_INITED, kTraceError);
938 return -1; 951 return -1;
939 } 952 }
940 953
941 return _shared->audio_processing()->StartDebugRecording(file_handle); 954 return _shared->audio_processing()->StartDebugRecording(file_handle);
942 } 955 }
943 956
957 int VoEAudioProcessingImpl::StartDebugRecording(FILE* file_handle,
958 int max_size_bytes) {
959 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
960 "StartDebugRecording()");
961 if (!_shared->statistics().Initialized()) {
962 _shared->SetLastError(VE_NOT_INITED, kTraceError);
963 return -1;
964 }
965
966 return _shared->audio_processing()->StartDebugRecording(file_handle,
967 max_size_bytes);
968 }
kwiberg-webrtc 2015/10/25 02:29:12 Code dup; one call the other?
ivoc 2015/11/05 13:14:46 This code has been removed in the new version.
969
944 int VoEAudioProcessingImpl::StopDebugRecording() { 970 int VoEAudioProcessingImpl::StopDebugRecording() {
945 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), 971 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
946 "StopDebugRecording()"); 972 "StopDebugRecording()");
947 if (!_shared->statistics().Initialized()) { 973 if (!_shared->statistics().Initialized()) {
948 _shared->SetLastError(VE_NOT_INITED, kTraceError); 974 _shared->SetLastError(VE_NOT_INITED, kTraceError);
949 return -1; 975 return -1;
950 } 976 }
951 977
952 return _shared->audio_processing()->StopDebugRecording(); 978 return _shared->audio_processing()->StopDebugRecording();
953 } 979 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 } 1069 }
1044 1070
1045 bool VoEAudioProcessingImpl::IsStereoChannelSwappingEnabled() { 1071 bool VoEAudioProcessingImpl::IsStereoChannelSwappingEnabled() {
1046 LOG_API0(); 1072 LOG_API0();
1047 return _shared->transmit_mixer()->IsStereoChannelSwappingEnabled(); 1073 return _shared->transmit_mixer()->IsStereoChannelSwappingEnabled();
1048 } 1074 }
1049 1075
1050 #endif // #ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API 1076 #endif // #ifdef WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API
1051 1077
1052 } // namespace webrtc 1078 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698