niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
stefan@webrtc.org | 8fe03af | 2012-01-23 14:56:14 +0000 | [diff] [blame] | 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #ifndef MODULES_VIDEO_CODING_TEST_TEST_UTIL_H_ |
| 12 | #define MODULES_VIDEO_CODING_TEST_TEST_UTIL_H_ |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 13 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 14 | #include "system_wrappers/include/event_wrapper.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 15 | |
stefan@webrtc.org | 2baf5f5 | 2013-03-13 08:46:25 +0000 | [diff] [blame] | 16 | class NullEventFactory : public webrtc::EventFactory { |
| 17 | public: |
| 18 | virtual ~NullEventFactory() {} |
| 19 | |
sakal | cc452e1 | 2017-02-09 04:53:45 -0800 | [diff] [blame] | 20 | webrtc::EventWrapper* CreateEvent() override { return new NullEvent; } |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 21 | |
solenberg@webrtc.org | 56b5f77 | 2013-04-16 10:31:56 +0000 | [diff] [blame] | 22 | private: |
tommi | 533aedc | 2017-03-17 08:11:11 -0700 | [diff] [blame] | 23 | // Private class to avoid more dependencies on it in tests. |
| 24 | class NullEvent : public webrtc::EventWrapper { |
| 25 | public: |
| 26 | ~NullEvent() override {} |
| 27 | bool Set() override { return true; } |
| 28 | webrtc::EventTypeWrapper Wait(unsigned long max_time) override { // NOLINT |
| 29 | return webrtc::kEventTimeout; |
| 30 | } |
| 31 | }; |
pbos@webrtc.org | d21406d | 2015-03-19 08:18:53 +0000 | [diff] [blame] | 32 | }; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 33 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 34 | #endif // MODULES_VIDEO_CODING_TEST_TEST_UTIL_H_ |