aboutsummaryrefslogtreecommitdiff
path: root/call/rampup_tests.h
diff options
context:
space:
mode:
authorTommi <tommi@webrtc.org>2019-08-05 15:29:14 +0200
committerCommit Bot <commit-bot@chromium.org>2019-08-06 08:18:07 +0000
commit5e005f4b2d8fe1eb234f054dc86452ed9a97f3a3 (patch)
tree9ebcf643ea1e9c3ba744ae71e31e60b1d7d8ef78 /call/rampup_tests.h
parentbdc909653e31a33b3a7ce652fd6f823bedc29b46 (diff)
downloadwebrtc-5e005f4b2d8fe1eb234f054dc86452ed9a97f3a3.tar.gz
Fix RampUp tests to call Call::GetStats() from the right thread - and remove the need for a dedicated polling thread.
Bug: webrtc:10847 Change-Id: I01492d2e385840e50d2d94f498063b5e4eea3665 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148067 Reviewed-by: Magnus Flodman <mflodman@webrtc.org> Commit-Queue: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28764}
Diffstat (limited to 'call/rampup_tests.h')
-rw-r--r--call/rampup_tests.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/call/rampup_tests.h b/call/rampup_tests.h
index b7d4af5f5a..e3ab5f29da 100644
--- a/call/rampup_tests.h
+++ b/call/rampup_tests.h
@@ -42,7 +42,8 @@ class RampUpTester : public test::EndToEndTest {
const std::string& extension_type,
bool rtx,
bool red,
- bool report_perf_stats);
+ bool report_perf_stats,
+ test::SingleThreadedTaskQueueForTesting* task_queue);
~RampUpTester() override;
size_t GetNumVideoStreams() const override;
@@ -101,8 +102,6 @@ class RampUpTester : public test::EndToEndTest {
std::vector<FlexfecReceiveStream::Config>* receive_configs) override;
void OnCallsCreated(Call* sender_call, Call* receiver_call) override;
- static void BitrateStatsPollingThread(void* obj);
-
const int start_bitrate_bps_;
const int64_t min_run_time_ms_;
int expected_bitrate_bps_;
@@ -114,7 +113,9 @@ class RampUpTester : public test::EndToEndTest {
std::vector<uint32_t> video_rtx_ssrcs_;
std::vector<uint32_t> audio_ssrcs_;
- rtc::PlatformThread poller_thread_;
+ protected:
+ test::SingleThreadedTaskQueueForTesting* const task_queue_;
+ test::SingleThreadedTaskQueueForTesting::TaskId pending_task_ = -1;
};
class RampUpDownUpTester : public RampUpTester {
@@ -127,7 +128,8 @@ class RampUpDownUpTester : public RampUpTester {
bool rtx,
bool red,
const std::vector<int>& loss_rates,
- bool report_perf_stats);
+ bool report_perf_stats,
+ test::SingleThreadedTaskQueueForTesting* task_queue);
~RampUpDownUpTester() override;
protected: