Chromium Code Reviews| 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 virtual int StartDebugRecording(const char filename[kMaxFilenameSize]) = 0; |
| 395 | 395 |
| 396 // Same as above, but a maximum file size (in bytes) for the log can be | |
| 397 // specified. The logging is stopped once the limit has been reached. | |
| 398 virtual int StartDebugRecording(const char filename[kMaxFilenameSize], | |
|
the sun
2015/10/26 10:37:20
Consolidate to one interface, but keep a forwardin
ivoc
2015/11/05 13:14:46
Done.
| |
| 399 int max_log_size_bytes) = 0; | |
| 400 | |
| 396 // Same as above but uses an existing file handle. Takes ownership | 401 // Same as above but uses an existing file handle. Takes ownership |
| 397 // of |handle| and closes it at StopDebugRecording(). | 402 // of |handle| and closes it at StopDebugRecording(). |
| 398 virtual int StartDebugRecording(FILE* handle) = 0; | 403 virtual int StartDebugRecording(FILE* handle) = 0; |
| 399 | 404 |
| 405 // Same as above, but a maximum file size (in bytes) for the log can be | |
| 406 // specified. The logging is stopped once the limit has been reached. | |
| 407 virtual int StartDebugRecording(FILE* handle, int max_log_size_bytes) = 0; | |
| 408 | |
| 400 // Same as above but uses an existing PlatformFile handle. Takes ownership | 409 // Same as above but uses an existing PlatformFile handle. Takes ownership |
| 401 // of |handle| and closes it at StopDebugRecording(). | 410 // of |handle| and closes it at StopDebugRecording(). |
| 402 // TODO(xians): Make this interface pure virtual. | 411 // TODO(xians): Make this interface pure virtual. |
| 403 virtual int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle) { | 412 virtual int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle) { |
| 404 return -1; | 413 return -1; |
| 405 } | 414 } |
| 406 | 415 |
| 407 // Stops recording debugging information, and closes the file. Recording | 416 // Stops recording debugging information, and closes the file. Recording |
| 408 // cannot be resumed in the same file (without overwriting it). | 417 // cannot be resumed in the same file (without overwriting it). |
| 409 virtual int StopDebugRecording() = 0; | 418 virtual int StopDebugRecording() = 0; |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 929 // This does not impact the size of frames passed to |ProcessStream()|. | 938 // This does not impact the size of frames passed to |ProcessStream()|. |
| 930 virtual int set_frame_size_ms(int size) = 0; | 939 virtual int set_frame_size_ms(int size) = 0; |
| 931 virtual int frame_size_ms() const = 0; | 940 virtual int frame_size_ms() const = 0; |
| 932 | 941 |
| 933 protected: | 942 protected: |
| 934 virtual ~VoiceDetection() {} | 943 virtual ~VoiceDetection() {} |
| 935 }; | 944 }; |
| 936 } // namespace webrtc | 945 } // namespace webrtc |
| 937 | 946 |
| 938 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ | 947 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ |
| OLD | NEW |