From 85fa7d5311f218fe84fc40cfda79471d0108f1ec Mon Sep 17 00:00:00 2001 From: terelius Date: Thu, 24 Mar 2016 01:51:52 -0700 Subject: [PATCH] Move swap_queue.h to base/ This will let us use the SwapQueue as a message queue for the event log's output thread. See https://codereview.webrtc.org/1687703002/ Review URL: https://codereview.webrtc.org/1812823007 Cr-Commit-Position: refs/heads/master@{#12113} --- webrtc/base/BUILD.gn | 1 + webrtc/base/base.gyp | 1 + webrtc/base/base_tests.gyp | 1 + webrtc/{common_audio => base}/swap_queue.h | 6 +++--- webrtc/{common_audio => base}/swap_queue_unittest.cc | 2 +- webrtc/common_audio/BUILD.gn | 1 - webrtc/common_audio/common_audio.gyp | 2 -- webrtc/modules/audio_processing/echo_cancellation_impl.h | 3 ++- webrtc/modules/audio_processing/echo_control_mobile_impl.h | 3 ++- webrtc/modules/audio_processing/gain_control_impl.h | 2 +- .../intelligibility/intelligibility_enhancer.h | 2 +- 11 files changed, 13 insertions(+), 11 deletions(-) rename webrtc/{common_audio => base}/swap_queue.h (98%) rename webrtc/{common_audio => base}/swap_queue_unittest.cc (99%) diff --git a/webrtc/base/BUILD.gn b/webrtc/base/BUILD.gn index d1ff2fb91f..6f926a2a50 100644 --- a/webrtc/base/BUILD.gn +++ b/webrtc/base/BUILD.gn @@ -151,6 +151,7 @@ static_library("rtc_base_approved") { "stringencode.h", "stringutils.cc", "stringutils.h", + "swap_queue.h", "systeminfo.cc", "systeminfo.h", "template_util.h", diff --git a/webrtc/base/base.gyp b/webrtc/base/base.gyp index 8f2e72e4dd..f9b1eb2241 100644 --- a/webrtc/base/base.gyp +++ b/webrtc/base/base.gyp @@ -128,6 +128,7 @@ 'stringencode.h', 'stringutils.cc', 'stringutils.h', + 'swap_queue.h', 'systeminfo.cc', 'systeminfo.h', 'template_util.h', diff --git a/webrtc/base/base_tests.gyp b/webrtc/base/base_tests.gyp index 2467b7471a..caef35c385 100644 --- a/webrtc/base/base_tests.gyp +++ b/webrtc/base/base_tests.gyp @@ -103,6 +103,7 @@ 'stream_unittest.cc', 'stringencode_unittest.cc', 'stringutils_unittest.cc', + 'swap_queue_unittest.cc', # TODO(ronghuawu): Reenable this test. # 'systeminfo_unittest.cc', 'task_unittest.cc', diff --git a/webrtc/common_audio/swap_queue.h b/webrtc/base/swap_queue.h similarity index 98% rename from webrtc/common_audio/swap_queue.h rename to webrtc/base/swap_queue.h index d8bb5c024e..d3af225eb1 100644 --- a/webrtc/common_audio/swap_queue.h +++ b/webrtc/base/swap_queue.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_COMMON_AUDIO_SWAP_QUEUE_H_ -#define WEBRTC_COMMON_AUDIO_SWAP_QUEUE_H_ +#ifndef WEBRTC_BASE_SWAP_QUEUE_H_ +#define WEBRTC_BASE_SWAP_QUEUE_H_ #include #include @@ -207,4 +207,4 @@ class SwapQueue { } // namespace webrtc -#endif // WEBRTC_COMMON_AUDIO_SWAP_QUEUE_H_ +#endif // WEBRTC_BASE_SWAP_QUEUE_H_ diff --git a/webrtc/common_audio/swap_queue_unittest.cc b/webrtc/base/swap_queue_unittest.cc similarity index 99% rename from webrtc/common_audio/swap_queue_unittest.cc rename to webrtc/base/swap_queue_unittest.cc index 104e494bc6..21eb212eb0 100644 --- a/webrtc/common_audio/swap_queue_unittest.cc +++ b/webrtc/base/swap_queue_unittest.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "webrtc/common_audio/swap_queue.h" +#include "webrtc/base/swap_queue.h" #include diff --git a/webrtc/common_audio/BUILD.gn b/webrtc/common_audio/BUILD.gn index b4ec1d71ef..b01b31816b 100644 --- a/webrtc/common_audio/BUILD.gn +++ b/webrtc/common_audio/BUILD.gn @@ -87,7 +87,6 @@ source_set("common_audio") { "signal_processing/vector_scaling_operations.c", "sparse_fir_filter.cc", "sparse_fir_filter.h", - "swap_queue.h", "vad/include/vad.h", "vad/include/webrtc_vad.h", "vad/vad.cc", diff --git a/webrtc/common_audio/common_audio.gyp b/webrtc/common_audio/common_audio.gyp index ca1589ae3f..57d9f1ca64 100644 --- a/webrtc/common_audio/common_audio.gyp +++ b/webrtc/common_audio/common_audio.gyp @@ -101,7 +101,6 @@ 'signal_processing/vector_scaling_operations.c', 'sparse_fir_filter.cc', 'sparse_fir_filter.h', - 'swap_queue.h', 'vad/include/vad.h', 'vad/include/webrtc_vad.h', 'vad/vad.cc', @@ -256,7 +255,6 @@ 'signal_processing/real_fft_unittest.cc', 'signal_processing/signal_processing_unittest.cc', 'sparse_fir_filter_unittest.cc', - 'swap_queue_unittest.cc', 'vad/vad_core_unittest.cc', 'vad/vad_filterbank_unittest.cc', 'vad/vad_gmm_unittest.cc', diff --git a/webrtc/modules/audio_processing/echo_cancellation_impl.h b/webrtc/modules/audio_processing/echo_cancellation_impl.h index f196bcab3a..b91d23d823 100644 --- a/webrtc/modules/audio_processing/echo_cancellation_impl.h +++ b/webrtc/modules/audio_processing/echo_cancellation_impl.h @@ -12,10 +12,11 @@ #define WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_ #include +#include #include "webrtc/base/constructormagic.h" #include "webrtc/base/criticalsection.h" -#include "webrtc/common_audio/swap_queue.h" +#include "webrtc/base/swap_queue.h" #include "webrtc/modules/audio_processing/include/audio_processing.h" #include "webrtc/modules/audio_processing/render_queue_item_verifier.h" diff --git a/webrtc/modules/audio_processing/echo_control_mobile_impl.h b/webrtc/modules/audio_processing/echo_control_mobile_impl.h index b86af72fdf..c59a69610d 100644 --- a/webrtc/modules/audio_processing/echo_control_mobile_impl.h +++ b/webrtc/modules/audio_processing/echo_control_mobile_impl.h @@ -12,10 +12,11 @@ #define WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_ #include +#include #include "webrtc/base/constructormagic.h" #include "webrtc/base/criticalsection.h" -#include "webrtc/common_audio/swap_queue.h" +#include "webrtc/base/swap_queue.h" #include "webrtc/modules/audio_processing/include/audio_processing.h" #include "webrtc/modules/audio_processing/render_queue_item_verifier.h" diff --git a/webrtc/modules/audio_processing/gain_control_impl.h b/webrtc/modules/audio_processing/gain_control_impl.h index 6841d5d4f5..a7e787417c 100644 --- a/webrtc/modules/audio_processing/gain_control_impl.h +++ b/webrtc/modules/audio_processing/gain_control_impl.h @@ -16,8 +16,8 @@ #include "webrtc/base/constructormagic.h" #include "webrtc/base/criticalsection.h" +#include "webrtc/base/swap_queue.h" #include "webrtc/base/thread_annotations.h" -#include "webrtc/common_audio/swap_queue.h" #include "webrtc/modules/audio_processing/include/audio_processing.h" #include "webrtc/modules/audio_processing/render_queue_item_verifier.h" diff --git a/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h b/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h index 940b9c53e4..1413212934 100644 --- a/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h +++ b/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h @@ -15,9 +15,9 @@ #include #include +#include "webrtc/base/swap_queue.h" #include "webrtc/common_audio/lapped_transform.h" #include "webrtc/common_audio/channel_buffer.h" -#include "webrtc/common_audio/swap_queue.h" #include "webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h" #include "webrtc/modules/audio_processing/render_queue_item_verifier.h" #include "webrtc/modules/audio_processing/vad/voice_activity_detector.h"