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 |
11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ |
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ | 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ |
13 | 13 |
14 // MSVC++ requires this to be set before any other includes to get M_PI. | 14 // MSVC++ requires this to be set before any other includes to get M_PI. |
15 #define _USE_MATH_DEFINES | 15 #define _USE_MATH_DEFINES |
16 | 16 |
17 #include <math.h> | 17 #include <math.h> |
18 #include <stddef.h> // size_t | 18 #include <stddef.h> // size_t |
19 #include <stdio.h> // FILE | 19 #include <stdio.h> // FILE |
20 #include <vector> | 20 #include <vector> |
21 | 21 |
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 rtc { | |
29 class TaskQueue; | |
30 } // namespace rtc | |
31 | |
28 namespace webrtc { | 32 namespace webrtc { |
29 | 33 |
30 struct AecCore; | 34 struct AecCore; |
31 | 35 |
32 class AudioFrame; | 36 class AudioFrame; |
33 | 37 |
34 class NonlinearBeamformer; | 38 class NonlinearBeamformer; |
35 | 39 |
36 class StreamConfig; | 40 class StreamConfig; |
37 class ProcessingConfig; | 41 class ProcessingConfig; |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
447 virtual void set_delay_offset_ms(int offset) = 0; | 451 virtual void set_delay_offset_ms(int offset) = 0; |
448 virtual int delay_offset_ms() const = 0; | 452 virtual int delay_offset_ms() const = 0; |
449 | 453 |
450 // Starts recording debugging information to a file specified by |filename|, | 454 // Starts recording debugging information to a file specified by |filename|, |
451 // a NULL-terminated string. If there is an ongoing recording, the old file | 455 // a NULL-terminated string. If there is an ongoing recording, the old file |
452 // will be closed, and recording will continue in the newly specified file. | 456 // will be closed, and recording will continue in the newly specified file. |
453 // An already existing file will be overwritten without warning. A maximum | 457 // 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 | 458 // 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 | 459 // once the limit has been reached. If max_log_size_bytes is set to a value |
456 // <= 0, no limit will be used. | 460 // <= 0, no limit will be used. |
461 // When the AecDumper submodule is implemented, the file IO will be done on | |
462 // the passed task queue. Currently the worker queue is not used. | |
457 static const size_t kMaxFilenameSize = 1024; | 463 static const size_t kMaxFilenameSize = 1024; |
458 virtual int StartDebugRecording(const char filename[kMaxFilenameSize], | 464 virtual int StartDebugRecording(const char filename[kMaxFilenameSize], |
459 int64_t max_log_size_bytes) = 0; | 465 int64_t max_log_size_bytes, |
466 rtc::TaskQueue* worker_queue) = 0; | |
peah-webrtc
2017/03/31 07:24:43
These API changes will probably break quite a numb
aleloi
2017/04/06 15:46:11
I've added a new one as suggested by solenberg@ in
| |
460 | 467 |
461 // Same as above but uses an existing file handle. Takes ownership | 468 // Same as above but uses an existing file handle. Takes ownership |
462 // of |handle| and closes it at StopDebugRecording(). | 469 // of |handle| and closes it at StopDebugRecording(). |
463 virtual int StartDebugRecording(FILE* handle, int64_t max_log_size_bytes) = 0; | 470 virtual int StartDebugRecording(FILE* handle, |
471 int64_t max_log_size_bytes, | |
472 rtc::TaskQueue* worker_queue) = 0; | |
464 | 473 |
465 // TODO(ivoc): Remove this function after Chrome stops using it. | 474 // TODO(ivoc): Remove this function after Chrome stops using it. |
466 virtual int StartDebugRecording(FILE* handle) = 0; | 475 virtual int StartDebugRecording(FILE* handle, |
476 rtc::TaskQueue* worker_queue) = 0; | |
467 | 477 |
468 // Same as above but uses an existing PlatformFile handle. Takes ownership | 478 // Same as above but uses an existing PlatformFile handle. Takes ownership |
469 // of |handle| and closes it at StopDebugRecording(). | 479 // of |handle| and closes it at StopDebugRecording(). |
470 // TODO(xians): Make this interface pure virtual. | 480 // TODO(xians): Make this interface pure virtual. |
471 virtual int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle) = 0; | 481 virtual int StartDebugRecordingForPlatformFile( |
482 rtc::PlatformFile handle, | |
483 rtc::TaskQueue* worker_queue) = 0; | |
472 | 484 |
473 // Stops recording debugging information, and closes the file. Recording | 485 // Stops recording debugging information, and closes the file. Recording |
474 // cannot be resumed in the same file (without overwriting it). | 486 // cannot be resumed in the same file (without overwriting it). |
475 virtual int StopDebugRecording() = 0; | 487 virtual int StopDebugRecording() = 0; |
476 | 488 |
477 // Use to send UMA histograms at end of a call. Note that all histogram | 489 // Use to send UMA histograms at end of a call. Note that all histogram |
478 // specific member variables are reset. | 490 // specific member variables are reset. |
479 virtual void UpdateHistogramsOnCallEnd() = 0; | 491 virtual void UpdateHistogramsOnCallEnd() = 0; |
480 | 492 |
481 // TODO(ivoc): Remove when the calling code no longer uses the old Statistics | 493 // TODO(ivoc): Remove when the calling code no longer uses the old Statistics |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1071 // This does not impact the size of frames passed to |ProcessStream()|. | 1083 // This does not impact the size of frames passed to |ProcessStream()|. |
1072 virtual int set_frame_size_ms(int size) = 0; | 1084 virtual int set_frame_size_ms(int size) = 0; |
1073 virtual int frame_size_ms() const = 0; | 1085 virtual int frame_size_ms() const = 0; |
1074 | 1086 |
1075 protected: | 1087 protected: |
1076 virtual ~VoiceDetection() {} | 1088 virtual ~VoiceDetection() {} |
1077 }; | 1089 }; |
1078 } // namespace webrtc | 1090 } // namespace webrtc |
1079 | 1091 |
1080 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ | 1092 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ |
OLD | NEW |