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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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. |
393 static const size_t kMaxFilenameSize = 1024; | 393 static const size_t kMaxFilenameSize = 1024; |
394 virtual int StartDebugRecording(const char filename[kMaxFilenameSize]) = 0; | 394 int StartDebugRecording(const char filename[kMaxFilenameSize]) { |
395 return StartDebugRecording(filename, -1); | |
396 } | |
397 | |
398 // Same as above, but a maximum file size (in bytes) for the log can be | |
399 // specified. The logging is stopped once the limit has been reached. | |
400 virtual int StartDebugRecording(const char filename[kMaxFilenameSize], | |
401 int64_t max_log_size_bytes) = 0; | |
395 | 402 |
396 // Same as above but uses an existing file handle. Takes ownership | 403 // Same as above but uses an existing file handle. Takes ownership |
397 // of |handle| and closes it at StopDebugRecording(). | 404 // of |handle| and closes it at StopDebugRecording(). |
398 virtual int StartDebugRecording(FILE* handle) = 0; | 405 int StartDebugRecording(FILE* handle) { |
the sun
2015/11/11 15:54:42
Are both of these functions in use, or can we drop
ivoc
2015/11/11 16:44:31
It is used internally in a few places, mainly in t
| |
406 return StartDebugRecording(handle, -1); | |
407 } | |
408 | |
409 // Same as above, but a maximum file size (in bytes) for the log can be | |
410 // specified. The logging is stopped once the limit has been reached. | |
411 virtual int StartDebugRecording(FILE* handle, int64_t max_log_size_bytes) = 0; | |
399 | 412 |
400 // Same as above but uses an existing PlatformFile handle. Takes ownership | 413 // Same as above but uses an existing PlatformFile handle. Takes ownership |
401 // of |handle| and closes it at StopDebugRecording(). | 414 // of |handle| and closes it at StopDebugRecording(). |
402 // TODO(xians): Make this interface pure virtual. | 415 // TODO(xians): Make this interface pure virtual. |
403 virtual int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle) { | 416 virtual int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle) { |
404 return -1; | 417 return -1; |
405 } | 418 } |
406 | 419 |
407 // Stops recording debugging information, and closes the file. Recording | 420 // Stops recording debugging information, and closes the file. Recording |
408 // cannot be resumed in the same file (without overwriting it). | 421 // cannot be resumed in the same file (without overwriting it). |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
929 // This does not impact the size of frames passed to |ProcessStream()|. | 942 // This does not impact the size of frames passed to |ProcessStream()|. |
930 virtual int set_frame_size_ms(int size) = 0; | 943 virtual int set_frame_size_ms(int size) = 0; |
931 virtual int frame_size_ms() const = 0; | 944 virtual int frame_size_ms() const = 0; |
932 | 945 |
933 protected: | 946 protected: |
934 virtual ~VoiceDetection() {} | 947 virtual ~VoiceDetection() {} |
935 }; | 948 }; |
936 } // namespace webrtc | 949 } // namespace webrtc |
937 | 950 |
938 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ | 951 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ |
OLD | NEW |