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