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

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: Added function to avoid breaking Chromium. Created 5 years 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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 // set_stream_delay_ms(). May be positive or negative. 397 // set_stream_delay_ms(). May be positive or negative.
398 // 398 //
399 // Note that this could cause an otherwise valid value passed to 399 // Note that this could cause an otherwise valid value passed to
400 // set_stream_delay_ms() to return an error. 400 // set_stream_delay_ms() to return an error.
401 virtual void set_delay_offset_ms(int offset) = 0; 401 virtual void set_delay_offset_ms(int offset) = 0;
402 virtual int delay_offset_ms() const = 0; 402 virtual int delay_offset_ms() const = 0;
403 403
404 // Starts recording debugging information to a file specified by |filename|, 404 // Starts recording debugging information to a file specified by |filename|,
405 // a NULL-terminated string. If there is an ongoing recording, the old file 405 // a NULL-terminated string. If there is an ongoing recording, the old file
406 // will be closed, and recording will continue in the newly specified file. 406 // will be closed, and recording will continue in the newly specified file.
407 // An already existing file will be overwritten without warning. 407 // An already existing file will be overwritten without warning. A maximum
408 // file size (in bytes) for the log can be specified. The logging is stopped
409 // once the limit has been reached. If max_log_size_bytes is set to a value
410 // <= 0, no limit will be used.
408 static const size_t kMaxFilenameSize = 1024; 411 static const size_t kMaxFilenameSize = 1024;
409 virtual int StartDebugRecording(const char filename[kMaxFilenameSize]) = 0; 412 virtual int StartDebugRecording(const char filename[kMaxFilenameSize],
413 int64_t max_log_size_bytes) = 0;
410 414
411 // Same as above but uses an existing file handle. Takes ownership 415 // Same as above but uses an existing file handle. Takes ownership
412 // of |handle| and closes it at StopDebugRecording(). 416 // of |handle| and closes it at StopDebugRecording().
413 virtual int StartDebugRecording(FILE* handle) = 0; 417 virtual int StartDebugRecording(FILE* handle, int64_t max_log_size_bytes) = 0;
418
419 // TODO(ivoc): Remove this function after Chromium switches to the one above.
420 virtual int StartDebugRecording(FILE* handle) {
421 return StartDebugRecording(handle, -1);
422 }
414 423
415 // Same as above but uses an existing PlatformFile handle. Takes ownership 424 // Same as above but uses an existing PlatformFile handle. Takes ownership
416 // of |handle| and closes it at StopDebugRecording(). 425 // of |handle| and closes it at StopDebugRecording().
417 // TODO(xians): Make this interface pure virtual. 426 // TODO(xians): Make this interface pure virtual.
418 virtual int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle) { 427 virtual int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle) {
419 return -1; 428 return -1;
420 } 429 }
421 430
422 // Stops recording debugging information, and closes the file. Recording 431 // Stops recording debugging information, and closes the file. Recording
423 // cannot be resumed in the same file (without overwriting it). 432 // cannot be resumed in the same file (without overwriting it).
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 // This does not impact the size of frames passed to |ProcessStream()|. 953 // This does not impact the size of frames passed to |ProcessStream()|.
945 virtual int set_frame_size_ms(int size) = 0; 954 virtual int set_frame_size_ms(int size) = 0;
946 virtual int frame_size_ms() const = 0; 955 virtual int frame_size_ms() const = 0;
947 956
948 protected: 957 protected:
949 virtual ~VoiceDetection() {} 958 virtual ~VoiceDetection() {}
950 }; 959 };
951 } // namespace webrtc 960 } // namespace webrtc
952 961
953 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ 962 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698