Add unittests for APM with submodule creation disabled
This introduces a function AudioProcessingImpl::SetCreateOptionalSubmodulesForTesting to simulate the exclusion of build-optional submodules, and tests of the currently only excludable submodule. Bug: webrtc:11292 Change-Id: If492606205c9fdc669a6dce3a8989a434aeeed1f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173746 Commit-Queue: Sam Zackrisson <saza@webrtc.org> Reviewed-by: Per Åhgren <peah@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31138}
This commit is contained in:

committed by
Commit Bot

parent
62a0d647d9
commit
b37e59d198
@ -30,6 +30,7 @@
|
||||
#include "modules/audio_processing/include/audio_processing_statistics.h"
|
||||
#include "modules/audio_processing/level_estimator.h"
|
||||
#include "modules/audio_processing/ns/noise_suppressor.h"
|
||||
#include "modules/audio_processing/optionally_built_submodule_creators.h"
|
||||
#include "modules/audio_processing/render_queue_item_verifier.h"
|
||||
#include "modules/audio_processing/residual_echo_detector.h"
|
||||
#include "modules/audio_processing/rms_level.h"
|
||||
@ -141,6 +142,15 @@ class AudioProcessingImpl : public AudioProcessing {
|
||||
FRIEND_TEST_ALL_PREFIXES(ApmConfiguration, DefaultBehavior);
|
||||
FRIEND_TEST_ALL_PREFIXES(ApmConfiguration, ValidConfigBehavior);
|
||||
FRIEND_TEST_ALL_PREFIXES(ApmConfiguration, InValidConfigBehavior);
|
||||
FRIEND_TEST_ALL_PREFIXES(ApmWithSubmodulesExcludedTest,
|
||||
ToggleTransientSuppressor);
|
||||
FRIEND_TEST_ALL_PREFIXES(ApmWithSubmodulesExcludedTest,
|
||||
ReinitializeTransientSuppressor);
|
||||
FRIEND_TEST_ALL_PREFIXES(ApmWithSubmodulesExcludedTest,
|
||||
BitexactWithDisabledModules);
|
||||
|
||||
void OverrideSubmoduleCreationForTesting(
|
||||
const ApmSubmoduleCreationOverrides& overrides);
|
||||
|
||||
// Class providing thread-safe message pipe functionality for
|
||||
// |runtime_settings_|.
|
||||
@ -331,6 +341,10 @@ class AudioProcessingImpl : public AudioProcessing {
|
||||
// Struct containing the Config specifying the behavior of APM.
|
||||
AudioProcessing::Config config_;
|
||||
|
||||
// Overrides for testing the exclusion of some submodules from the build.
|
||||
ApmSubmoduleCreationOverrides submodule_creation_overrides_
|
||||
RTC_GUARDED_BY(crit_capture_);
|
||||
|
||||
// Class containing information about what submodules are active.
|
||||
SubmoduleStates submodule_states_;
|
||||
|
||||
|
Reference in New Issue
Block a user