| 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_AUDIO_PROCESSING_IMPL_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ |
| 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ | 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ |
| 13 | 13 |
| 14 #include <list> | 14 #include <list> |
| 15 #include <memory> | 15 #include <memory> |
| 16 #include <string> | |
| 17 #include <vector> | 16 #include <vector> |
| 18 | 17 |
| 19 #include "webrtc/base/criticalsection.h" | 18 #include "webrtc/base/criticalsection.h" |
| 20 #include "webrtc/base/function_view.h" | 19 #include "webrtc/base/function_view.h" |
| 21 #include "webrtc/base/gtest_prod_util.h" | 20 #include "webrtc/base/gtest_prod_util.h" |
| 22 #include "webrtc/base/ignore_wundef.h" | 21 #include "webrtc/base/ignore_wundef.h" |
| 22 #include "webrtc/base/protobuf_utils.h" |
| 23 #include "webrtc/base/swap_queue.h" | 23 #include "webrtc/base/swap_queue.h" |
| 24 #include "webrtc/base/thread_annotations.h" | 24 #include "webrtc/base/thread_annotations.h" |
| 25 #include "webrtc/modules/audio_processing/audio_buffer.h" | 25 #include "webrtc/modules/audio_processing/audio_buffer.h" |
| 26 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 26 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
| 27 #include "webrtc/modules/audio_processing/render_queue_item_verifier.h" | 27 #include "webrtc/modules/audio_processing/render_queue_item_verifier.h" |
| 28 #include "webrtc/modules/audio_processing/rms_level.h" | 28 #include "webrtc/modules/audio_processing/rms_level.h" |
| 29 #include "webrtc/system_wrappers/include/file_wrapper.h" | 29 #include "webrtc/system_wrappers/include/file_wrapper.h" |
| 30 | 30 |
| 31 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP | 31 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP |
| 32 // Files generated at build-time by the protobuf compiler. | 32 // *.pb.h files are generated at build-time by the protobuf compiler. |
| 33 RTC_PUSH_IGNORING_WUNDEF() | 33 RTC_PUSH_IGNORING_WUNDEF() |
| 34 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD | 34 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD |
| 35 #include "external/webrtc/webrtc/modules/audio_processing/debug.pb.h" | 35 #include "external/webrtc/webrtc/modules/audio_processing/debug.pb.h" |
| 36 #else | 36 #else |
| 37 #include "webrtc/modules/audio_processing/debug.pb.h" | 37 #include "webrtc/modules/audio_processing/debug.pb.h" |
| 38 #endif | 38 #endif |
| 39 RTC_POP_IGNORING_WUNDEF() | 39 RTC_POP_IGNORING_WUNDEF() |
| 40 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP | 40 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP |
| 41 | 41 |
| 42 namespace webrtc { | 42 namespace webrtc { |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 bool transient_suppressor_enabled_ = false; | 193 bool transient_suppressor_enabled_ = false; |
| 194 bool first_update_ = true; | 194 bool first_update_ = true; |
| 195 }; | 195 }; |
| 196 | 196 |
| 197 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP | 197 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP |
| 198 // State for the debug dump. | 198 // State for the debug dump. |
| 199 struct ApmDebugDumpThreadState { | 199 struct ApmDebugDumpThreadState { |
| 200 ApmDebugDumpThreadState(); | 200 ApmDebugDumpThreadState(); |
| 201 ~ApmDebugDumpThreadState(); | 201 ~ApmDebugDumpThreadState(); |
| 202 std::unique_ptr<audioproc::Event> event_msg; // Protobuf message. | 202 std::unique_ptr<audioproc::Event> event_msg; // Protobuf message. |
| 203 std::string event_str; // Memory for protobuf serialization. | 203 ProtoString event_str; // Memory for protobuf serialization. |
| 204 | 204 |
| 205 // Serialized string of last saved APM configuration. | 205 // Serialized string of last saved APM configuration. |
| 206 std::string last_serialized_config; | 206 ProtoString last_serialized_config; |
| 207 }; | 207 }; |
| 208 | 208 |
| 209 struct ApmDebugDumpState { | 209 struct ApmDebugDumpState { |
| 210 ApmDebugDumpState(); | 210 ApmDebugDumpState(); |
| 211 ~ApmDebugDumpState(); | 211 ~ApmDebugDumpState(); |
| 212 // Number of bytes that can still be written to the log before the maximum | 212 // Number of bytes that can still be written to the log before the maximum |
| 213 // size is reached. A value of <= 0 indicates that no limit is used. | 213 // size is reached. A value of <= 0 indicates that no limit is used. |
| 214 int64_t num_bytes_left_for_log_ = -1; | 214 int64_t num_bytes_left_for_log_ = -1; |
| 215 std::unique_ptr<FileWrapper> debug_file; | 215 std::unique_ptr<FileWrapper> debug_file; |
| 216 ApmDebugDumpThreadState render; | 216 ApmDebugDumpThreadState render; |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 std::unique_ptr< | 428 std::unique_ptr< |
| 429 SwapQueue<std::vector<int16_t>, RenderQueueItemVerifier<int16_t>>> | 429 SwapQueue<std::vector<int16_t>, RenderQueueItemVerifier<int16_t>>> |
| 430 agc_render_signal_queue_; | 430 agc_render_signal_queue_; |
| 431 std::unique_ptr<SwapQueue<std::vector<float>, RenderQueueItemVerifier<float>>> | 431 std::unique_ptr<SwapQueue<std::vector<float>, RenderQueueItemVerifier<float>>> |
| 432 red_render_signal_queue_; | 432 red_render_signal_queue_; |
| 433 }; | 433 }; |
| 434 | 434 |
| 435 } // namespace webrtc | 435 } // namespace webrtc |
| 436 | 436 |
| 437 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ | 437 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ |
| OLD | NEW |