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 11 matching lines...) Expand all Loading... |
22 #include "webrtc/base/arraysize.h" | 22 #include "webrtc/base/arraysize.h" |
23 #include "webrtc/base/platform_file.h" | 23 #include "webrtc/base/platform_file.h" |
24 #include "webrtc/modules/audio_processing/beamformer/array_util.h" | 24 #include "webrtc/modules/audio_processing/beamformer/array_util.h" |
25 #include "webrtc/modules/audio_processing/include/config.h" | 25 #include "webrtc/modules/audio_processing/include/config.h" |
26 #include "webrtc/typedefs.h" | 26 #include "webrtc/typedefs.h" |
27 | 27 |
28 namespace webrtc { | 28 namespace webrtc { |
29 | 29 |
30 struct AecCore; | 30 struct AecCore; |
31 | 31 |
| 32 class AecDump; |
32 class AudioFrame; | 33 class AudioFrame; |
33 | 34 |
34 class NonlinearBeamformer; | 35 class NonlinearBeamformer; |
35 | 36 |
36 class StreamConfig; | 37 class StreamConfig; |
37 class ProcessingConfig; | 38 class ProcessingConfig; |
38 | 39 |
39 class EchoCancellation; | 40 class EchoCancellation; |
40 class EchoControlMobile; | 41 class EchoControlMobile; |
41 class GainControl; | 42 class GainControl; |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 virtual void set_stream_key_pressed(bool key_pressed) = 0; | 441 virtual void set_stream_key_pressed(bool key_pressed) = 0; |
441 | 442 |
442 // Sets a delay |offset| in ms to add to the values passed in through | 443 // Sets a delay |offset| in ms to add to the values passed in through |
443 // set_stream_delay_ms(). May be positive or negative. | 444 // set_stream_delay_ms(). May be positive or negative. |
444 // | 445 // |
445 // Note that this could cause an otherwise valid value passed to | 446 // Note that this could cause an otherwise valid value passed to |
446 // set_stream_delay_ms() to return an error. | 447 // set_stream_delay_ms() to return an error. |
447 virtual void set_delay_offset_ms(int offset) = 0; | 448 virtual void set_delay_offset_ms(int offset) = 0; |
448 virtual int delay_offset_ms() const = 0; | 449 virtual int delay_offset_ms() const = 0; |
449 | 450 |
450 // Starts recording debugging information to a file specified by |filename|, | 451 // TODO(aleloi): doc |
451 // a NULL-terminated string. If there is an ongoing recording, the old file | 452 virtual void StartDebugRecording(std::unique_ptr<AecDump> aec_dump) = 0; |
452 // will be closed, and recording will continue in the newly specified file. | |
453 // An already existing file will be overwritten without warning. A maximum | |
454 // file size (in bytes) for the log can be specified. The logging is stopped | |
455 // once the limit has been reached. If max_log_size_bytes is set to a value | |
456 // <= 0, no limit will be used. | |
457 static const size_t kMaxFilenameSize = 1024; | |
458 virtual int StartDebugRecording(const char filename[kMaxFilenameSize], | |
459 int64_t max_log_size_bytes) = 0; | |
460 | |
461 // Same as above but uses an existing file handle. Takes ownership | |
462 // of |handle| and closes it at StopDebugRecording(). | |
463 virtual int StartDebugRecording(FILE* handle, int64_t max_log_size_bytes) = 0; | |
464 | |
465 // TODO(ivoc): Remove this function after Chrome stops using it. | |
466 virtual int StartDebugRecording(FILE* handle) = 0; | |
467 | |
468 // Same as above but uses an existing PlatformFile handle. Takes ownership | |
469 // of |handle| and closes it at StopDebugRecording(). | |
470 // TODO(xians): Make this interface pure virtual. | |
471 virtual int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle) = 0; | |
472 | 453 |
473 // Stops recording debugging information, and closes the file. Recording | 454 // Stops recording debugging information, and closes the file. Recording |
474 // cannot be resumed in the same file (without overwriting it). | 455 // cannot be resumed in the same file (without overwriting it). |
475 virtual int StopDebugRecording() = 0; | 456 virtual void StopDebugRecording() = 0; |
476 | 457 |
477 // Use to send UMA histograms at end of a call. Note that all histogram | 458 // Use to send UMA histograms at end of a call. Note that all histogram |
478 // specific member variables are reset. | 459 // specific member variables are reset. |
479 virtual void UpdateHistogramsOnCallEnd() = 0; | 460 virtual void UpdateHistogramsOnCallEnd() = 0; |
480 | 461 |
481 // TODO(ivoc): Remove when the calling code no longer uses the old Statistics | 462 // TODO(ivoc): Remove when the calling code no longer uses the old Statistics |
482 // API. | 463 // API. |
483 struct Statistic { | 464 struct Statistic { |
484 int instant = 0; // Instantaneous value. | 465 int instant = 0; // Instantaneous value. |
485 int average = 0; // Long-term average. | 466 int average = 0; // Long-term average. |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1071 // This does not impact the size of frames passed to |ProcessStream()|. | 1052 // This does not impact the size of frames passed to |ProcessStream()|. |
1072 virtual int set_frame_size_ms(int size) = 0; | 1053 virtual int set_frame_size_ms(int size) = 0; |
1073 virtual int frame_size_ms() const = 0; | 1054 virtual int frame_size_ms() const = 0; |
1074 | 1055 |
1075 protected: | 1056 protected: |
1076 virtual ~VoiceDetection() {} | 1057 virtual ~VoiceDetection() {} |
1077 }; | 1058 }; |
1078 } // namespace webrtc | 1059 } // namespace webrtc |
1079 | 1060 |
1080 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ | 1061 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ |
OLD | NEW |