video capture test: use stock EXPECT_TRUE_WAIT
instead of a custom one. BUG=None Change-Id: I5c55acef6203a384748534c6c9701dcdd8dec211 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332940 Commit-Queue: Philipp Hancke <phancke@microsoft.com> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41526}
This commit is contained in:
parent
e5d60f8621
commit
edd804816c
@ -178,6 +178,7 @@ if (!build_with_chromium || is_linux || is_chromeos) {
|
||||
"../../api/video:video_frame",
|
||||
"../../api/video:video_rtp_headers",
|
||||
"../../common_video",
|
||||
"../../rtc_base:gunit_helpers",
|
||||
"../../rtc_base:timeutils",
|
||||
"../../rtc_base/synchronization:mutex",
|
||||
"../../system_wrappers",
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
#include "api/video/video_frame.h"
|
||||
#include "common_video/libyuv/include/webrtc_libyuv.h"
|
||||
#include "modules/video_capture/video_capture_factory.h"
|
||||
#include "rtc_base/gunit.h"
|
||||
#include "rtc_base/synchronization/mutex.h"
|
||||
#include "rtc_base/time_utils.h"
|
||||
#include "system_wrappers/include/sleep.h"
|
||||
@ -33,24 +34,6 @@ using webrtc::VideoCaptureCapability;
|
||||
using webrtc::VideoCaptureFactory;
|
||||
using webrtc::VideoCaptureModule;
|
||||
|
||||
#define WAIT_(ex, timeout, res) \
|
||||
do { \
|
||||
res = (ex); \
|
||||
int64_t start = rtc::TimeMillis(); \
|
||||
while (!res && rtc::TimeMillis() < start + timeout) { \
|
||||
SleepMs(5); \
|
||||
res = (ex); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define EXPECT_TRUE_WAIT(ex, timeout) \
|
||||
do { \
|
||||
bool res; \
|
||||
WAIT_(ex, timeout, res); \
|
||||
if (!res) \
|
||||
EXPECT_TRUE(ex); \
|
||||
} while (0)
|
||||
|
||||
static const int kTimeOut = 5000;
|
||||
#ifdef WEBRTC_MAC
|
||||
static const int kTestHeight = 288;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user