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

Side by Side Diff: webrtc/modules/audio_processing/include/audio_processing.h

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: Addressed more review comments. 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 // set_stream_delay_ms(). May be positive or negative. 382 // set_stream_delay_ms(). May be positive or negative.
383 // 383 //
384 // Note that this could cause an otherwise valid value passed to 384 // Note that this could cause an otherwise valid value passed to
385 // set_stream_delay_ms() to return an error. 385 // set_stream_delay_ms() to return an error.
386 virtual void set_delay_offset_ms(int offset) = 0; 386 virtual void set_delay_offset_ms(int offset) = 0;
387 virtual int delay_offset_ms() const = 0; 387 virtual int delay_offset_ms() const = 0;
388 388
389 // Starts recording debugging information to a file specified by |filename|, 389 // Starts recording debugging information to a file specified by |filename|,
390 // a NULL-terminated string. If there is an ongoing recording, the old file 390 // a NULL-terminated string. If there is an ongoing recording, the old file
391 // will be closed, and recording will continue in the newly specified file. 391 // will be closed, and recording will continue in the newly specified file.
392 // An already existing file will be overwritten without warning. 392 // An already existing file will be overwritten without warning. A maximum
393 // file size (in bytes) for the log can be specified. The logging is stopped
394 // once the limit has been reached. If max_log_size_bytes is set to a value
395 // <= 0, no limit will be used.
393 static const size_t kMaxFilenameSize = 1024; 396 static const size_t kMaxFilenameSize = 1024;
394 virtual int StartDebugRecording(const char filename[kMaxFilenameSize]) = 0; 397 virtual int StartDebugRecording(const char filename[kMaxFilenameSize],
398 int64_t max_log_size_bytes) = 0;
395 399
396 // Same as above but uses an existing file handle. Takes ownership 400 // Same as above but uses an existing file handle. Takes ownership
397 // of |handle| and closes it at StopDebugRecording(). 401 // of |handle| and closes it at StopDebugRecording(). A maximum file size
398 virtual int StartDebugRecording(FILE* handle) = 0; 402 // (in bytes) for the log can be specified. The logging is stopped once the
403 // limit has been reached.
Andrew MacDonald 2015/11/24 17:28:59 nit: Just refer to the comments above rather than
ivoc 2015/12/01 15:17:16 Done.
404 virtual int StartDebugRecording(FILE* handle, int64_t max_log_size_bytes) = 0;
399 405
400 // Same as above but uses an existing PlatformFile handle. Takes ownership 406 // Same as above but uses an existing PlatformFile handle. Takes ownership
401 // of |handle| and closes it at StopDebugRecording(). 407 // of |handle| and closes it at StopDebugRecording().
402 // TODO(xians): Make this interface pure virtual. 408 // TODO(xians): Make this interface pure virtual.
403 virtual int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle) { 409 virtual int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle) {
Andrew MacDonald 2015/11/24 17:28:59 Any reason this one doesn't take a max size parame
ivoc 2015/12/01 15:17:16 I think this is the function that Chrome calls to
Andrew MacDonald 2015/12/02 00:11:12 OK. Perhaps mention that no logging limit will be
404 return -1; 410 return -1;
405 } 411 }
406 412
407 // Stops recording debugging information, and closes the file. Recording 413 // Stops recording debugging information, and closes the file. Recording
408 // cannot be resumed in the same file (without overwriting it). 414 // cannot be resumed in the same file (without overwriting it).
409 virtual int StopDebugRecording() = 0; 415 virtual int StopDebugRecording() = 0;
410 416
411 // Use to send UMA histograms at end of a call. Note that all histogram 417 // Use to send UMA histograms at end of a call. Note that all histogram
412 // specific member variables are reset. 418 // specific member variables are reset.
413 virtual void UpdateHistogramsOnCallEnd() = 0; 419 virtual void UpdateHistogramsOnCallEnd() = 0;
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 // This does not impact the size of frames passed to |ProcessStream()|. 935 // This does not impact the size of frames passed to |ProcessStream()|.
930 virtual int set_frame_size_ms(int size) = 0; 936 virtual int set_frame_size_ms(int size) = 0;
931 virtual int frame_size_ms() const = 0; 937 virtual int frame_size_ms() const = 0;
932 938
933 protected: 939 protected:
934 virtual ~VoiceDetection() {} 940 virtual ~VoiceDetection() {}
935 }; 941 };
936 } // namespace webrtc 942 } // namespace webrtc
937 943
938 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ 944 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698