Move PC e2e test framework into its own namespace
Bug: webrtc:10138
Change-Id: I7fc02967058d3c53da73e280a7a1533a0860ba4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128403
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Peter Slatala <psla@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27203}
diff --git a/test/pc/e2e/analyzer/audio/default_audio_quality_analyzer.cc b/test/pc/e2e/analyzer/audio/default_audio_quality_analyzer.cc
index a5b3e1b..ed21024 100644
--- a/test/pc/e2e/analyzer/audio/default_audio_quality_analyzer.cc
+++ b/test/pc/e2e/analyzer/audio/default_audio_quality_analyzer.cc
@@ -13,7 +13,7 @@
#include "rtc_base/logging.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
void DefaultAudioQualityAnalyzer::Start(std::string test_case_name) {
test_case_name_ = std::move(test_case_name);
@@ -25,5 +25,5 @@
// TODO(bugs.webrtc.org/10138): Implement audio stats collection.
}
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
diff --git a/test/pc/e2e/analyzer/audio/default_audio_quality_analyzer.h b/test/pc/e2e/analyzer/audio/default_audio_quality_analyzer.h
index 83bcbfc..c3478ae 100644
--- a/test/pc/e2e/analyzer/audio/default_audio_quality_analyzer.h
+++ b/test/pc/e2e/analyzer/audio/default_audio_quality_analyzer.h
@@ -16,7 +16,7 @@
#include "test/pc/e2e/api/audio_quality_analyzer_interface.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
class DefaultAudioQualityAnalyzer : public AudioQualityAnalyzerInterface {
public:
@@ -28,7 +28,7 @@
std::string test_case_name_;
};
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
#endif // TEST_PC_E2E_ANALYZER_AUDIO_DEFAULT_AUDIO_QUALITY_ANALYZER_H_
diff --git a/test/pc/e2e/analyzer/video/default_encoded_image_data_injector.cc b/test/pc/e2e/analyzer/video/default_encoded_image_data_injector.cc
index a7ae253..7127ef2 100644
--- a/test/pc/e2e/analyzer/video/default_encoded_image_data_injector.cc
+++ b/test/pc/e2e/analyzer/video/default_encoded_image_data_injector.cc
@@ -18,7 +18,7 @@
#include "rtc_base/checks.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
namespace {
// The amount on which encoded image buffer will be expanded to inject frame id.
@@ -126,5 +126,5 @@
return EncodedImageExtractionResult{id.value(), out, discard};
}
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
diff --git a/test/pc/e2e/analyzer/video/default_encoded_image_data_injector.h b/test/pc/e2e/analyzer/video/default_encoded_image_data_injector.h
index 2b6846d..9f2f530 100644
--- a/test/pc/e2e/analyzer/video/default_encoded_image_data_injector.h
+++ b/test/pc/e2e/analyzer/video/default_encoded_image_data_injector.h
@@ -23,7 +23,7 @@
#include "test/pc/e2e/analyzer/video/encoded_image_data_injector.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
// Injects frame id and discard flag into EncodedImage payload buffer. The
// payload buffer will be appended in the injector with 2 bytes frame id and 4
@@ -69,7 +69,7 @@
int coding_entity_id) override;
};
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
#endif // TEST_PC_E2E_ANALYZER_VIDEO_DEFAULT_ENCODED_IMAGE_DATA_INJECTOR_H_
diff --git a/test/pc/e2e/analyzer/video/default_encoded_image_data_injector_unittest.cc b/test/pc/e2e/analyzer/video/default_encoded_image_data_injector_unittest.cc
index 8dc341e..3ad978f 100644
--- a/test/pc/e2e/analyzer/video/default_encoded_image_data_injector_unittest.cc
+++ b/test/pc/e2e/analyzer/video/default_encoded_image_data_injector_unittest.cc
@@ -17,7 +17,7 @@
#include "test/gtest.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
namespace {
rtc::Buffer CreateBufferOfSizeNFilledWithValuesFromX(size_t n, uint8_t x) {
@@ -187,5 +187,5 @@
EXPECT_EQ(out.image.size(), 0ul);
}
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
diff --git a/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc b/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc
index f4f4ce3..579e1c0 100644
--- a/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc
+++ b/test/pc/e2e/analyzer/video/default_video_quality_analyzer.cc
@@ -20,7 +20,7 @@
#include "test/testsupport/perf_test.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
namespace {
constexpr int kMaxActiveComparisons = 10;
@@ -547,5 +547,5 @@
dropped(dropped),
frame_stats(std::move(frame_stats)) {}
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
diff --git a/test/pc/e2e/analyzer/video/default_video_quality_analyzer.h b/test/pc/e2e/analyzer/video/default_video_quality_analyzer.h
index 1703454..43edecf 100644
--- a/test/pc/e2e/analyzer/video/default_video_quality_analyzer.h
+++ b/test/pc/e2e/analyzer/video/default_video_quality_analyzer.h
@@ -30,7 +30,7 @@
#include "test/pc/e2e/api/video_quality_analyzer_interface.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
class RateCounter {
public:
@@ -275,7 +275,7 @@
rtc::Event comparison_available_event_;
};
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
#endif // TEST_PC_E2E_ANALYZER_VIDEO_DEFAULT_VIDEO_QUALITY_ANALYZER_H_
diff --git a/test/pc/e2e/analyzer/video/encoded_image_data_injector.h b/test/pc/e2e/analyzer/video/encoded_image_data_injector.h
index bf541ba..8e21862 100644
--- a/test/pc/e2e/analyzer/video/encoded_image_data_injector.h
+++ b/test/pc/e2e/analyzer/video/encoded_image_data_injector.h
@@ -17,7 +17,7 @@
#include "api/video/encoded_image.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
// Injects frame id into EncodedImage on encoder side
class EncodedImageDataInjector {
@@ -54,7 +54,7 @@
int coding_entity_id) = 0;
};
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
#endif // TEST_PC_E2E_ANALYZER_VIDEO_ENCODED_IMAGE_DATA_INJECTOR_H_
diff --git a/test/pc/e2e/analyzer/video/example_video_quality_analyzer.cc b/test/pc/e2e/analyzer/video/example_video_quality_analyzer.cc
index 2ff5633..cc5fba8 100644
--- a/test/pc/e2e/analyzer/video/example_video_quality_analyzer.cc
+++ b/test/pc/e2e/analyzer/video/example_video_quality_analyzer.cc
@@ -13,7 +13,7 @@
#include "rtc_base/logging.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
ExampleVideoQualityAnalyzer::ExampleVideoQualityAnalyzer() = default;
ExampleVideoQualityAnalyzer::~ExampleVideoQualityAnalyzer() = default;
@@ -149,5 +149,5 @@
return frames_dropped_;
}
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
diff --git a/test/pc/e2e/analyzer/video/example_video_quality_analyzer.h b/test/pc/e2e/analyzer/video/example_video_quality_analyzer.h
index 7bd9382..1db1cf4 100644
--- a/test/pc/e2e/analyzer/video/example_video_quality_analyzer.h
+++ b/test/pc/e2e/analyzer/video/example_video_quality_analyzer.h
@@ -22,7 +22,7 @@
#include "test/pc/e2e/api/video_quality_analyzer_interface.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
// This class is an example implementation of
// webrtc::VideoQualityAnalyzerInterface and calculates simple metrics
@@ -81,7 +81,7 @@
uint64_t frames_dropped_ RTC_GUARDED_BY(lock_) = 0;
};
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
#endif // TEST_PC_E2E_ANALYZER_VIDEO_EXAMPLE_VIDEO_QUALITY_ANALYZER_H_
diff --git a/test/pc/e2e/analyzer/video/id_generator.cc b/test/pc/e2e/analyzer/video/id_generator.cc
index 615defd..f1ead37 100644
--- a/test/pc/e2e/analyzer/video/id_generator.cc
+++ b/test/pc/e2e/analyzer/video/id_generator.cc
@@ -11,7 +11,7 @@
#include "test/pc/e2e/analyzer/video/id_generator.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
IntIdGenerator::IntIdGenerator(int start_value) : next_id_(start_value) {}
IntIdGenerator::~IntIdGenerator() = default;
@@ -20,5 +20,5 @@
return next_id_++;
}
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
diff --git a/test/pc/e2e/analyzer/video/id_generator.h b/test/pc/e2e/analyzer/video/id_generator.h
index 47bdcaf..8c988f2 100644
--- a/test/pc/e2e/analyzer/video/id_generator.h
+++ b/test/pc/e2e/analyzer/video/id_generator.h
@@ -14,7 +14,7 @@
#include <atomic>
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
// IdGenerator generates ids. All provided ids have to be unique. There is no
// any order guarantees for provided ids.
@@ -40,7 +40,7 @@
std::atomic<int> next_id_;
};
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
#endif // TEST_PC_E2E_ANALYZER_VIDEO_ID_GENERATOR_H_
diff --git a/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.cc b/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.cc
index e916143..88294df 100644
--- a/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.cc
+++ b/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.cc
@@ -21,7 +21,7 @@
#include "rtc_base/logging.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
namespace {
constexpr size_t kIrrelatedSimulcastStreamFrameWidth = 320;
@@ -285,5 +285,5 @@
id_generator_->GetNextId(), std::move(decoder), extractor_, analyzer_);
}
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
diff --git a/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.h b/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.h
index a323937..c912f25 100644
--- a/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.h
+++ b/test/pc/e2e/analyzer/video/quality_analyzing_video_decoder.h
@@ -27,7 +27,7 @@
#include "test/pc/e2e/api/video_quality_analyzer_interface.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
// QualityAnalyzingVideoDecoder is used to wrap origin video decoder and inject
// VideoQualityAnalyzerInterface before and after decoder.
@@ -155,7 +155,7 @@
VideoQualityAnalyzerInterface* const analyzer_;
};
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
#endif // TEST_PC_E2E_ANALYZER_VIDEO_QUALITY_ANALYZING_VIDEO_DECODER_H_
diff --git a/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc b/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc
index e2f16cc..2e86375 100644
--- a/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc
+++ b/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.cc
@@ -19,7 +19,7 @@
#include "rtc_base/logging.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
namespace {
constexpr size_t kMaxFrameInPipelineCount = 1000;
@@ -290,5 +290,5 @@
stream_required_spatial_index_, injector_, analyzer_);
}
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
diff --git a/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.h b/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.h
index 693817c..15c3a6f 100644
--- a/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.h
+++ b/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.h
@@ -27,7 +27,7 @@
#include "test/pc/e2e/api/video_quality_analyzer_interface.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
// QualityAnalyzingVideoEncoder is used to wrap origin video encoder and inject
// VideoQualityAnalyzerInterface before and after encoder.
@@ -178,7 +178,7 @@
VideoQualityAnalyzerInterface* const analyzer_;
};
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
#endif // TEST_PC_E2E_ANALYZER_VIDEO_QUALITY_ANALYZING_VIDEO_ENCODER_H_
diff --git a/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.cc b/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.cc
index dc0deee..8f2dfe2 100644
--- a/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.cc
+++ b/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.cc
@@ -18,7 +18,7 @@
#include "rtc_base/checks.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
namespace {
// Number of bytes from the beginning of the EncodedImage buffer that will be
@@ -145,5 +145,5 @@
SingleProcessEncodedImageDataInjector::ExtractionInfoVector::
~ExtractionInfoVector() = default;
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
diff --git a/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.h b/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.h
index 50141eb..3787cc5 100644
--- a/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.h
+++ b/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.h
@@ -22,7 +22,7 @@
#include "test/pc/e2e/analyzer/video/encoded_image_data_injector.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
// Based on assumption that all call participants are in the same OS process
// and uses same QualityAnalyzingVideoContext to obtain
@@ -87,7 +87,7 @@
RTC_GUARDED_BY(lock_);
};
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
#endif // TEST_PC_E2E_ANALYZER_VIDEO_SINGLE_PROCESS_ENCODED_IMAGE_DATA_INJECTOR_H_
diff --git a/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector_unittest.cc b/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector_unittest.cc
index 636877d..67cafa7 100644
--- a/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector_unittest.cc
+++ b/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector_unittest.cc
@@ -17,7 +17,7 @@
#include "test/gtest.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
namespace {
rtc::Buffer CreateBufferOfSizeNFilledWithValuesFromX(size_t n, uint8_t x) {
@@ -194,5 +194,5 @@
EXPECT_EQ(out.image.capacity(), 3 * 10ul);
}
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
diff --git a/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.cc b/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.cc
index d146e71..939f594 100644
--- a/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.cc
+++ b/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.cc
@@ -17,18 +17,18 @@
#include "test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
namespace {
// Intercepts generated frames and passes them also to video quality analyzer
// and into video frame writer, if the last one is provided.
-class InterceptingFrameGenerator : public FrameGenerator {
+class InterceptingFrameGenerator : public test::FrameGenerator {
public:
InterceptingFrameGenerator(std::string stream_label,
- std::unique_ptr<FrameGenerator> delegate,
+ std::unique_ptr<test::FrameGenerator> delegate,
VideoQualityAnalyzerInterface* analyzer,
- VideoFrameWriter* video_writer)
+ test::VideoFrameWriter* video_writer)
: stream_label_(std::move(stream_label)),
delegate_(std::move(delegate)),
analyzer_(analyzer),
@@ -54,9 +54,9 @@
private:
std::string stream_label_;
- std::unique_ptr<FrameGenerator> delegate_;
+ std::unique_ptr<test::FrameGenerator> delegate_;
VideoQualityAnalyzerInterface* analyzer_;
- VideoFrameWriter* video_writer_;
+ test::VideoFrameWriter* video_writer_;
};
// Implements the video sink, that forwards rendered frames to the video quality
@@ -64,7 +64,7 @@
class AnalyzingVideoSink : public rtc::VideoSinkInterface<VideoFrame> {
public:
AnalyzingVideoSink(VideoQualityAnalyzerInterface* analyzer,
- VideoFrameWriter* video_writer)
+ test::VideoFrameWriter* video_writer)
: analyzer_(analyzer), video_writer_(video_writer) {
RTC_DCHECK(analyzer_);
}
@@ -81,7 +81,7 @@
private:
VideoQualityAnalyzerInterface* analyzer_;
- VideoFrameWriter* video_writer_;
+ test::VideoFrameWriter* video_writer_;
};
} // namespace
@@ -118,18 +118,18 @@
analyzer_.get());
}
-std::unique_ptr<FrameGenerator>
+std::unique_ptr<test::FrameGenerator>
VideoQualityAnalyzerInjectionHelper::WrapFrameGenerator(
std::string stream_label,
- std::unique_ptr<FrameGenerator> delegate,
- VideoFrameWriter* writer) const {
+ std::unique_ptr<test::FrameGenerator> delegate,
+ test::VideoFrameWriter* writer) const {
return absl::make_unique<InterceptingFrameGenerator>(
std::move(stream_label), std::move(delegate), analyzer_.get(), writer);
}
std::unique_ptr<rtc::VideoSinkInterface<VideoFrame>>
VideoQualityAnalyzerInjectionHelper::CreateVideoSink(
- VideoFrameWriter* writer) const {
+ test::VideoFrameWriter* writer) const {
return absl::make_unique<AnalyzingVideoSink>(analyzer_.get(), writer);
}
@@ -148,5 +148,5 @@
analyzer_->Stop();
}
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
diff --git a/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.h b/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.h
index fbe93cb..8e880a4 100644
--- a/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.h
+++ b/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.h
@@ -28,7 +28,7 @@
#include "test/testsupport/video_frame_writer.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
// Provides factory methods for components, that will be used to inject
// VideoQualityAnalyzerInterface into PeerConnection pipeline.
@@ -54,15 +54,15 @@
// Wraps frame generator, so video quality analyzer will gain access to the
// captured frames. If |writer| in not nullptr, will dump captured frames
// with provided writer.
- std::unique_ptr<FrameGenerator> WrapFrameGenerator(
+ std::unique_ptr<test::FrameGenerator> WrapFrameGenerator(
std::string stream_label,
- std::unique_ptr<FrameGenerator> delegate,
- VideoFrameWriter* writer) const;
+ std::unique_ptr<test::FrameGenerator> delegate,
+ test::VideoFrameWriter* writer) const;
// Creates sink, that will allow video quality analyzer to get access to the
// rendered frames. If |writer| in not nullptr, will dump rendered frames
// with provided writer.
std::unique_ptr<rtc::VideoSinkInterface<VideoFrame>> CreateVideoSink(
- VideoFrameWriter* writer) const;
+ test::VideoFrameWriter* writer) const;
void Start(std::string test_case_name, int max_threads_count);
@@ -82,7 +82,7 @@
std::unique_ptr<IdGenerator<int>> encoding_entities_id_generator_;
};
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
#endif // TEST_PC_E2E_ANALYZER_VIDEO_VIDEO_QUALITY_ANALYZER_INJECTION_HELPER_H_
diff --git a/test/pc/e2e/api/audio_quality_analyzer_interface.h b/test/pc/e2e/api/audio_quality_analyzer_interface.h
index 66da75a..02d31cb 100644
--- a/test/pc/e2e/api/audio_quality_analyzer_interface.h
+++ b/test/pc/e2e/api/audio_quality_analyzer_interface.h
@@ -14,7 +14,7 @@
#include "test/pc/e2e/api/stats_observer_interface.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
class AudioQualityAnalyzerInterface : public StatsObserverInterface {
public:
@@ -26,7 +26,7 @@
virtual void Start(std::string test_case_name) = 0;
};
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
#endif // TEST_PC_E2E_API_AUDIO_QUALITY_ANALYZER_INTERFACE_H_
diff --git a/test/pc/e2e/api/create_peerconnection_quality_test_fixture.cc b/test/pc/e2e/api/create_peerconnection_quality_test_fixture.cc
index 3b69d56..355e939 100644
--- a/test/pc/e2e/api/create_peerconnection_quality_test_fixture.cc
+++ b/test/pc/e2e/api/create_peerconnection_quality_test_fixture.cc
@@ -16,17 +16,17 @@
#include "test/pc/e2e/peer_connection_quality_test.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
std::unique_ptr<PeerConnectionE2EQualityTestFixture>
CreatePeerConnectionE2EQualityTestFixture(
std::string test_case_name,
std::unique_ptr<AudioQualityAnalyzerInterface> audio_quality_analyzer,
std::unique_ptr<VideoQualityAnalyzerInterface> video_quality_analyzer) {
- return absl::make_unique<webrtc::test::PeerConnectionE2EQualityTest>(
+ return absl::make_unique<PeerConnectionE2EQualityTest>(
std::move(test_case_name), std::move(audio_quality_analyzer),
std::move(video_quality_analyzer));
}
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
diff --git a/test/pc/e2e/api/create_peerconnection_quality_test_fixture.h b/test/pc/e2e/api/create_peerconnection_quality_test_fixture.h
index b4dd2ab..0ab7776 100644
--- a/test/pc/e2e/api/create_peerconnection_quality_test_fixture.h
+++ b/test/pc/e2e/api/create_peerconnection_quality_test_fixture.h
@@ -17,7 +17,7 @@
#include "test/pc/e2e/api/video_quality_analyzer_interface.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
// API is in development. Can be changed/removed without notice.
// Create test fixture to establish test call between Alice and Bob.
@@ -30,7 +30,7 @@
std::unique_ptr<AudioQualityAnalyzerInterface> audio_quality_analyzer,
std::unique_ptr<VideoQualityAnalyzerInterface> video_quality_analyzer);
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
#endif // TEST_PC_E2E_API_CREATE_PEERCONNECTION_QUALITY_TEST_FIXTURE_H_
diff --git a/test/pc/e2e/api/peerconnection_quality_test_fixture.h b/test/pc/e2e/api/peerconnection_quality_test_fixture.h
index 8984398..e09b934 100644
--- a/test/pc/e2e/api/peerconnection_quality_test_fixture.h
+++ b/test/pc/e2e/api/peerconnection_quality_test_fixture.h
@@ -35,7 +35,7 @@
#include "test/pc/e2e/api/video_quality_analyzer_interface.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
// TODO(titovartem) move to API when it will be stabilized.
class PeerConnectionE2EQualityTestFixture {
@@ -230,7 +230,7 @@
virtual ~PeerConnectionE2EQualityTestFixture() = default;
};
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
#endif // TEST_PC_E2E_API_PEERCONNECTION_QUALITY_TEST_FIXTURE_H_
diff --git a/test/pc/e2e/api/stats_observer_interface.h b/test/pc/e2e/api/stats_observer_interface.h
index 40b4cc5..9782191 100644
--- a/test/pc/e2e/api/stats_observer_interface.h
+++ b/test/pc/e2e/api/stats_observer_interface.h
@@ -15,7 +15,7 @@
#include "api/stats_types.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
class StatsObserverInterface {
public:
@@ -27,7 +27,7 @@
const StatsReports& reports) = 0;
};
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
#endif // TEST_PC_E2E_API_STATS_OBSERVER_INTERFACE_H_
diff --git a/test/pc/e2e/api/video_quality_analyzer_interface.h b/test/pc/e2e/api/video_quality_analyzer_interface.h
index 5d90ab9..d7436e7 100644
--- a/test/pc/e2e/api/video_quality_analyzer_interface.h
+++ b/test/pc/e2e/api/video_quality_analyzer_interface.h
@@ -22,7 +22,7 @@
#include "test/pc/e2e/api/stats_observer_interface.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
// Base interface for video quality analyzer for peer connection level end-2-end
// tests. Interface has only one abstract method, which have to return frame id.
@@ -107,7 +107,7 @@
virtual std::string GetStreamLabel(uint16_t frame_id) = 0;
};
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
#endif // TEST_PC_E2E_API_VIDEO_QUALITY_ANALYZER_INTERFACE_H_
diff --git a/test/pc/e2e/peer_connection_e2e_smoke_test.cc b/test/pc/e2e/peer_connection_e2e_smoke_test.cc
index 9a8ae7b..04d5b6c 100644
--- a/test/pc/e2e/peer_connection_e2e_smoke_test.cc
+++ b/test/pc/e2e/peer_connection_e2e_smoke_test.cc
@@ -23,7 +23,7 @@
#include "test/testsupport/file_utils.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
namespace {
void PrintFrameCounters(const std::string& name,
@@ -139,5 +139,5 @@
}
}
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
diff --git a/test/pc/e2e/peer_connection_quality_test.cc b/test/pc/e2e/peer_connection_quality_test.cc
index b26c58e..91df376 100644
--- a/test/pc/e2e/peer_connection_quality_test.cc
+++ b/test/pc/e2e/peer_connection_quality_test.cc
@@ -32,7 +32,7 @@
#include "test/testsupport/file_utils.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
namespace {
using VideoConfig = PeerConnectionE2EQualityTestFixture::VideoConfig;
@@ -430,7 +430,8 @@
}
if (p->audio_config.value().mode == AudioConfig::Mode::kFile) {
RTC_CHECK(p->audio_config.value().input_file_name);
- RTC_CHECK(FileExists(p->audio_config.value().input_file_name.value()));
+ RTC_CHECK(
+ test::FileExists(p->audio_config.value().input_file_name.value()));
}
}
}
@@ -457,7 +458,7 @@
}
}
RTC_CHECK(video_config);
- VideoFrameWriter* writer = MaybeCreateVideoWriter(
+ test::VideoFrameWriter* writer = MaybeCreateVideoWriter(
video_config->output_dump_file_name, *video_config);
// It is safe to cast here, because it is checked above that
// track->kind() is kVideoKind.
@@ -509,12 +510,12 @@
std::vector<rtc::scoped_refptr<FrameGeneratorCapturerVideoTrackSource>> out;
for (auto video_config : params->video_configs) {
// Create video generator.
- std::unique_ptr<FrameGenerator> frame_generator =
+ std::unique_ptr<test::FrameGenerator> frame_generator =
CreateFrameGenerator(video_config);
// Wrap it to inject video quality analyzer and enable dump of input video
// if required.
- VideoFrameWriter* writer =
+ test::VideoFrameWriter* writer =
MaybeCreateVideoWriter(video_config.input_dump_file_name, video_config);
frame_generator =
video_quality_analyzer_injection_helper_->WrapFrameGenerator(
@@ -522,8 +523,8 @@
writer);
// Setup FrameGenerator into peer connection.
- std::unique_ptr<FrameGeneratorCapturer> capturer =
- absl::WrapUnique(FrameGeneratorCapturer::Create(
+ std::unique_ptr<test::FrameGeneratorCapturer> capturer =
+ absl::WrapUnique(test::FrameGeneratorCapturer::Create(
std::move(frame_generator), video_config.fps, clock_));
rtc::scoped_refptr<FrameGeneratorCapturerVideoTrackSource> source =
new rtc::RefCountedObject<FrameGeneratorCapturerVideoTrackSource>(
@@ -539,26 +540,26 @@
return out;
}
-std::unique_ptr<FrameGenerator>
+std::unique_ptr<test::FrameGenerator>
PeerConnectionE2EQualityTest::CreateFrameGenerator(
const VideoConfig& video_config) {
if (video_config.generator) {
- absl::optional<FrameGenerator::OutputType> frame_generator_type =
+ absl::optional<test::FrameGenerator::OutputType> frame_generator_type =
absl::nullopt;
if (video_config.generator == VideoGeneratorType::kDefault) {
- frame_generator_type = FrameGenerator::OutputType::I420;
+ frame_generator_type = test::FrameGenerator::OutputType::I420;
} else if (video_config.generator == VideoGeneratorType::kI420A) {
- frame_generator_type = FrameGenerator::OutputType::I420A;
+ frame_generator_type = test::FrameGenerator::OutputType::I420A;
} else if (video_config.generator == VideoGeneratorType::kI010) {
- frame_generator_type = FrameGenerator::OutputType::I010;
+ frame_generator_type = test::FrameGenerator::OutputType::I010;
}
- return FrameGenerator::CreateSquareGenerator(
+ return test::FrameGenerator::CreateSquareGenerator(
static_cast<int>(video_config.width),
static_cast<int>(video_config.height), frame_generator_type,
absl::nullopt);
}
if (video_config.input_file_name) {
- return FrameGenerator::CreateFromYuvFile(
+ return test::FrameGenerator::CreateFromYuvFile(
std::vector<std::string>(/*count=*/1,
video_config.input_file_name.value()),
video_config.width, video_config.height, /*frame_repeat_count=*/1);
@@ -634,15 +635,15 @@
bob_.reset();
}
-VideoFrameWriter* PeerConnectionE2EQualityTest::MaybeCreateVideoWriter(
+test::VideoFrameWriter* PeerConnectionE2EQualityTest::MaybeCreateVideoWriter(
absl::optional<std::string> file_name,
const VideoConfig& config) {
if (!file_name) {
return nullptr;
}
- auto video_writer = absl::make_unique<VideoFrameWriter>(
+ auto video_writer = absl::make_unique<test::VideoFrameWriter>(
file_name.value(), config.width, config.height, config.fps);
- VideoFrameWriter* out = video_writer.get();
+ test::VideoFrameWriter* out = video_writer.get();
video_writers_.push_back(std::move(video_writer));
return out;
}
@@ -659,5 +660,5 @@
interval(std::move(interval)),
func(std::move(func)) {}
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
diff --git a/test/pc/e2e/peer_connection_quality_test.h b/test/pc/e2e/peer_connection_quality_test.h
index af7a6ce..8da8464 100644
--- a/test/pc/e2e/peer_connection_quality_test.h
+++ b/test/pc/e2e/peer_connection_quality_test.h
@@ -31,7 +31,7 @@
#include "test/testsupport/video_frame_writer.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
class PeerConnectionE2EQualityTest
: public PeerConnectionE2EQualityTestFixture {
@@ -95,7 +95,7 @@
MaybeAddMedia(TestPeer* peer);
std::vector<rtc::scoped_refptr<FrameGeneratorCapturerVideoTrackSource>>
MaybeAddVideo(TestPeer* peer);
- std::unique_ptr<FrameGenerator> CreateFrameGenerator(
+ std::unique_ptr<test::FrameGenerator> CreateFrameGenerator(
const VideoConfig& video_config);
void MaybeAddAudio(TestPeer* peer);
void SetupCall();
@@ -103,7 +103,7 @@
const std::vector<
rtc::scoped_refptr<FrameGeneratorCapturerVideoTrackSource>>& sources);
void TearDownCall();
- VideoFrameWriter* MaybeCreateVideoWriter(
+ test::VideoFrameWriter* MaybeCreateVideoWriter(
absl::optional<std::string> file_name,
const VideoConfig& config);
Timestamp Now() const;
@@ -123,7 +123,7 @@
alice_video_sources_;
std::vector<rtc::scoped_refptr<FrameGeneratorCapturerVideoTrackSource>>
bob_video_sources_;
- std::vector<std::unique_ptr<VideoFrameWriter>> video_writers_;
+ std::vector<std::unique_ptr<test::VideoFrameWriter>> video_writers_;
std::vector<std::unique_ptr<rtc::VideoSinkInterface<VideoFrame>>>
output_video_sinks_;
@@ -148,7 +148,7 @@
std::unique_ptr<rtc::TaskQueue> task_queue_;
};
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
#endif // TEST_PC_E2E_PEER_CONNECTION_QUALITY_TEST_H_
diff --git a/test/pc/e2e/stats_poller.cc b/test/pc/e2e/stats_poller.cc
index 3bbb396..987f26e 100644
--- a/test/pc/e2e/stats_poller.cc
+++ b/test/pc/e2e/stats_poller.cc
@@ -15,7 +15,7 @@
#include "rtc_base/logging.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
void InternalStatsObserver::PollStats() {
peer_->pc()->GetStats(this, nullptr,
@@ -43,5 +43,5 @@
}
}
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
diff --git a/test/pc/e2e/stats_poller.h b/test/pc/e2e/stats_poller.h
index 3d44cfe..71c1689 100644
--- a/test/pc/e2e/stats_poller.h
+++ b/test/pc/e2e/stats_poller.h
@@ -21,7 +21,7 @@
#include "test/pc/e2e/test_peer.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
// Helper class that will notify all the webrtc::test::StatsObserverInterface
// objects subscribed.
@@ -58,7 +58,7 @@
std::vector<rtc::scoped_refptr<InternalStatsObserver>> pollers_;
};
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
#endif // TEST_PC_E2E_STATS_POLLER_H_
diff --git a/test/pc/e2e/test_peer.cc b/test/pc/e2e/test_peer.cc
index 54a9ce9..18736ea 100644
--- a/test/pc/e2e/test_peer.cc
+++ b/test/pc/e2e/test_peer.cc
@@ -27,7 +27,7 @@
#include "test/testsupport/copy_to_file_audio_capturer.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
namespace {
constexpr int16_t kGeneratedAudioMaxAmplitude = 32000;
@@ -91,7 +91,7 @@
RTC_DCHECK(capturer);
if (audio_config && audio_config->input_dump_file_name) {
- capturer = absl::make_unique<CopyToFileAudioCapturer>(
+ capturer = absl::make_unique<test::CopyToFileAudioCapturer>(
std::move(capturer), audio_config->input_dump_file_name.value());
}
@@ -297,5 +297,5 @@
std::move(observer)),
params_(std::move(params)) {}
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
diff --git a/test/pc/e2e/test_peer.h b/test/pc/e2e/test_peer.h
index 86f7f6a..fa2f8eb 100644
--- a/test/pc/e2e/test_peer.h
+++ b/test/pc/e2e/test_peer.h
@@ -26,7 +26,7 @@
#include "test/pc/e2e/api/peerconnection_quality_test_fixture.h"
namespace webrtc {
-namespace test {
+namespace webrtc_pc_e2e {
// Describes a single participant in the call.
class TestPeer final : public PeerConnectionWrapper {
@@ -72,7 +72,7 @@
std::unique_ptr<Params> params_;
};
-} // namespace test
+} // namespace webrtc_pc_e2e
} // namespace webrtc
#endif // TEST_PC_E2E_TEST_PEER_H_