2013-07-10 14:07:56 +00:00
|
|
|
|
/*
|
|
|
|
|
|
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
|
*
|
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
|
*/
|
|
|
|
|
|
#include <Windows.h>
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
|
#include <conio.h>
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
2019-10-21 09:24:27 +02:00
|
|
|
|
#include "rtc_base/task_queue_for_test.h"
|
2017-09-15 06:47:31 +02:00
|
|
|
|
#include "test/run_loop.h"
|
2019-07-05 19:08:33 +02:00
|
|
|
|
|
2013-07-10 14:07:56 +00:00
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
namespace test {
|
|
|
|
|
|
|
2019-10-21 15:00:53 +02:00
|
|
|
|
void PressEnterToContinue(TaskQueueBase* task_queue) {
|
2013-07-10 14:07:56 +00:00
|
|
|
|
puts(">> Press ENTER to continue...");
|
|
|
|
|
|
|
2018-10-25 10:45:47 -07:00
|
|
|
|
while (!_kbhit() || _getch() != '\r') {
|
|
|
|
|
|
// Drive the message loop for the thread running the task_queue
|
2019-10-21 15:00:53 +02:00
|
|
|
|
SendTask(RTC_FROM_HERE, task_queue, [&]() {
|
2018-10-25 10:45:47 -07:00
|
|
|
|
MSG msg;
|
|
|
|
|
|
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
|
|
|
|
|
|
TranslateMessage(&msg);
|
|
|
|
|
|
DispatchMessage(&msg);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
2013-07-10 14:07:56 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
} // namespace test
|
|
|
|
|
|
} // namespace webrtc
|