Delete deprecated PlatformThread looping
Bug: webrtc:10594, webrtc:7187 Change-Id: Icba3a5cf6dbe817ead427c27645b3ad7bc8819be Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134642 Commit-Queue: Niels Moller <nisse@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27833}
This commit is contained in:
@ -391,11 +391,14 @@ class TimedThreadApiProcessor {
|
||||
class CallSimulator : public ::testing::TestWithParam<SimulationConfig> {
|
||||
public:
|
||||
CallSimulator()
|
||||
: render_thread_(
|
||||
new rtc::PlatformThread(RenderProcessorThreadFunc, this, "render")),
|
||||
: render_thread_(new rtc::PlatformThread(RenderProcessorThreadFunc,
|
||||
this,
|
||||
"render",
|
||||
rtc::kRealtimePriority)),
|
||||
capture_thread_(new rtc::PlatformThread(CaptureProcessorThreadFunc,
|
||||
this,
|
||||
"capture")),
|
||||
"capture",
|
||||
rtc::kRealtimePriority)),
|
||||
rand_gen_(42U),
|
||||
simulation_config_(static_cast<SimulationConfig>(GetParam())) {}
|
||||
|
||||
@ -549,23 +552,23 @@ class CallSimulator : public ::testing::TestWithParam<SimulationConfig> {
|
||||
}
|
||||
|
||||
// Thread callback for the render thread.
|
||||
static bool RenderProcessorThreadFunc(void* context) {
|
||||
return reinterpret_cast<CallSimulator*>(context)
|
||||
->render_thread_state_->Process();
|
||||
static void RenderProcessorThreadFunc(void* context) {
|
||||
CallSimulator* call_simulator = reinterpret_cast<CallSimulator*>(context);
|
||||
while (call_simulator->render_thread_state_->Process()) {
|
||||
}
|
||||
}
|
||||
|
||||
// Thread callback for the capture thread.
|
||||
static bool CaptureProcessorThreadFunc(void* context) {
|
||||
return reinterpret_cast<CallSimulator*>(context)
|
||||
->capture_thread_state_->Process();
|
||||
static void CaptureProcessorThreadFunc(void* context) {
|
||||
CallSimulator* call_simulator = reinterpret_cast<CallSimulator*>(context);
|
||||
while (call_simulator->capture_thread_state_->Process()) {
|
||||
}
|
||||
}
|
||||
|
||||
// Start the threads used in the test.
|
||||
void StartThreads() {
|
||||
ASSERT_NO_FATAL_FAILURE(render_thread_->Start());
|
||||
render_thread_->SetPriority(rtc::kRealtimePriority);
|
||||
ASSERT_NO_FATAL_FAILURE(capture_thread_->Start());
|
||||
capture_thread_->SetPriority(rtc::kRealtimePriority);
|
||||
}
|
||||
|
||||
// Event handler for the test.
|
||||
|
||||
Reference in New Issue
Block a user