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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 struct ExperimentalNs { | 138 struct ExperimentalNs { |
139 ExperimentalNs() : enabled(false) {} | 139 ExperimentalNs() : enabled(false) {} |
140 explicit ExperimentalNs(bool enabled) : enabled(enabled) {} | 140 explicit ExperimentalNs(bool enabled) : enabled(enabled) {} |
141 static const ConfigOptionID identifier = ConfigOptionID::kExperimentalNs; | 141 static const ConfigOptionID identifier = ConfigOptionID::kExperimentalNs; |
142 bool enabled; | 142 bool enabled; |
143 }; | 143 }; |
144 | 144 |
145 // Use to enable beamforming. Must be provided through the constructor. It will | 145 // Use to enable beamforming. Must be provided through the constructor. It will |
146 // have no impact if used with AudioProcessing::SetExtraOptions(). | 146 // have no impact if used with AudioProcessing::SetExtraOptions(). |
147 struct Beamforming { | 147 struct Beamforming { |
148 Beamforming() | 148 Beamforming(); |
149 : enabled(false), | 149 Beamforming(bool enabled, const std::vector<Point>& array_geometry); |
150 array_geometry(), | |
151 target_direction( | |
152 SphericalPointf(static_cast<float>(M_PI) / 2.f, 0.f, 1.f)) {} | |
153 Beamforming(bool enabled, const std::vector<Point>& array_geometry) | |
154 : Beamforming(enabled, | |
155 array_geometry, | |
156 SphericalPointf(static_cast<float>(M_PI) / 2.f, 0.f, 1.f)) { | |
157 } | |
158 Beamforming(bool enabled, | 150 Beamforming(bool enabled, |
159 const std::vector<Point>& array_geometry, | 151 const std::vector<Point>& array_geometry, |
160 SphericalPointf target_direction) | 152 SphericalPointf target_direction); |
161 : enabled(enabled), | 153 ~Beamforming(); |
162 array_geometry(array_geometry), | 154 |
163 target_direction(target_direction) {} | |
164 static const ConfigOptionID identifier = ConfigOptionID::kBeamforming; | 155 static const ConfigOptionID identifier = ConfigOptionID::kBeamforming; |
165 const bool enabled; | 156 const bool enabled; |
166 const std::vector<Point> array_geometry; | 157 const std::vector<Point> array_geometry; |
167 const SphericalPointf target_direction; | 158 const SphericalPointf target_direction; |
168 }; | 159 }; |
169 | 160 |
170 // Use to enable intelligibility enhancer in audio processing. | 161 // Use to enable intelligibility enhancer in audio processing. |
171 // | 162 // |
172 // Note: If enabled and the reverse stream has more than one output channel, | 163 // Note: If enabled and the reverse stream has more than one output channel, |
173 // the reverse stream will become an upmixed mono signal. | 164 // the reverse stream will become an upmixed mono signal. |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 virtual int StartDebugRecording(FILE* handle, int64_t max_log_size_bytes) = 0; | 434 virtual int StartDebugRecording(FILE* handle, int64_t max_log_size_bytes) = 0; |
444 | 435 |
445 // TODO(ivoc): Remove this function after Chrome stops using it. | 436 // TODO(ivoc): Remove this function after Chrome stops using it. |
446 int StartDebugRecording(FILE* handle) { | 437 int StartDebugRecording(FILE* handle) { |
447 return StartDebugRecording(handle, -1); | 438 return StartDebugRecording(handle, -1); |
448 } | 439 } |
449 | 440 |
450 // Same as above but uses an existing PlatformFile handle. Takes ownership | 441 // Same as above but uses an existing PlatformFile handle. Takes ownership |
451 // of |handle| and closes it at StopDebugRecording(). | 442 // of |handle| and closes it at StopDebugRecording(). |
452 // TODO(xians): Make this interface pure virtual. | 443 // TODO(xians): Make this interface pure virtual. |
453 virtual int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle) { | 444 virtual int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle); |
454 return -1; | |
455 } | |
456 | 445 |
457 // Stops recording debugging information, and closes the file. Recording | 446 // Stops recording debugging information, and closes the file. Recording |
458 // cannot be resumed in the same file (without overwriting it). | 447 // cannot be resumed in the same file (without overwriting it). |
459 virtual int StopDebugRecording() = 0; | 448 virtual int StopDebugRecording() = 0; |
460 | 449 |
461 // Use to send UMA histograms at end of a call. Note that all histogram | 450 // Use to send UMA histograms at end of a call. Note that all histogram |
462 // specific member variables are reset. | 451 // specific member variables are reset. |
463 virtual void UpdateHistogramsOnCallEnd() = 0; | 452 virtual void UpdateHistogramsOnCallEnd() = 0; |
464 | 453 |
465 // These provide access to the component interfaces and should never return | 454 // These provide access to the component interfaces and should never return |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
985 // This does not impact the size of frames passed to |ProcessStream()|. | 974 // This does not impact the size of frames passed to |ProcessStream()|. |
986 virtual int set_frame_size_ms(int size) = 0; | 975 virtual int set_frame_size_ms(int size) = 0; |
987 virtual int frame_size_ms() const = 0; | 976 virtual int frame_size_ms() const = 0; |
988 | 977 |
989 protected: | 978 protected: |
990 virtual ~VoiceDetection() {} | 979 virtual ~VoiceDetection() {} |
991 }; | 980 }; |
992 } // namespace webrtc | 981 } // namespace webrtc |
993 | 982 |
994 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ | 983 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ |
OLD | NEW |