| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ // NOLINT | 11 #ifndef WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ // NOLINT |
| 12 #define WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ | 12 #define WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ |
| 13 | 13 |
| 14 #include <memory> | 14 #include <memory> |
| 15 #include <string> | 15 #include <string> |
| 16 #include <vector> | 16 #include <vector> |
| 17 | 17 |
| 18 #include "webrtc/base/bytebuffer.h" |
| 19 #include "webrtc/base/gunit.h" |
| 20 #include "webrtc/base/timeutils.h" |
| 18 #include "webrtc/call/call.h" | 21 #include "webrtc/call/call.h" |
| 19 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" | 22 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" |
| 20 #include "webrtc/media/base/fakenetworkinterface.h" | 23 #include "webrtc/media/base/fakenetworkinterface.h" |
| 21 #include "webrtc/media/base/fakevideocapturer.h" | 24 #include "webrtc/media/base/fakevideocapturer.h" |
| 22 #include "webrtc/media/base/fakevideorenderer.h" | 25 #include "webrtc/media/base/fakevideorenderer.h" |
| 23 #include "webrtc/media/base/mediachannel.h" | 26 #include "webrtc/media/base/mediachannel.h" |
| 24 #include "webrtc/media/base/streamparams.h" | 27 #include "webrtc/media/base/streamparams.h" |
| 25 #include "webrtc/media/engine/fakewebrtccall.h" | 28 #include "webrtc/media/engine/fakewebrtccall.h" |
| 26 #include "webrtc/rtc_base/bytebuffer.h" | |
| 27 #include "webrtc/rtc_base/gunit.h" | |
| 28 #include "webrtc/rtc_base/timeutils.h" | |
| 29 | 29 |
| 30 #define EXPECT_FRAME_WAIT(c, w, h, t) \ | 30 #define EXPECT_FRAME_WAIT(c, w, h, t) \ |
| 31 EXPECT_EQ_WAIT((c), renderer_.num_rendered_frames(), (t)); \ | 31 EXPECT_EQ_WAIT((c), renderer_.num_rendered_frames(), (t)); \ |
| 32 EXPECT_EQ((w), renderer_.width()); \ | 32 EXPECT_EQ((w), renderer_.width()); \ |
| 33 EXPECT_EQ((h), renderer_.height()); \ | 33 EXPECT_EQ((h), renderer_.height()); \ |
| 34 EXPECT_EQ(0, renderer_.errors()); \ | 34 EXPECT_EQ(0, renderer_.errors()); \ |
| 35 | 35 |
| 36 #define EXPECT_FRAME_ON_RENDERER_WAIT(r, c, w, h, t) \ | 36 #define EXPECT_FRAME_ON_RENDERER_WAIT(r, c, w, h, t) \ |
| 37 EXPECT_EQ_WAIT((c), (r).num_rendered_frames(), (t)); \ | 37 EXPECT_EQ_WAIT((c), (r).num_rendered_frames(), (t)); \ |
| 38 EXPECT_EQ((w), (r).width()); \ | 38 EXPECT_EQ((w), (r).width()); \ |
| (...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 std::unique_ptr<C> channel_; | 936 std::unique_ptr<C> channel_; |
| 937 cricket::FakeNetworkInterface network_interface_; | 937 cricket::FakeNetworkInterface network_interface_; |
| 938 cricket::FakeVideoRenderer renderer_; | 938 cricket::FakeVideoRenderer renderer_; |
| 939 cricket::VideoMediaChannel::Error media_error_; | 939 cricket::VideoMediaChannel::Error media_error_; |
| 940 | 940 |
| 941 // Used by test cases where 2 streams are run on the same channel. | 941 // Used by test cases where 2 streams are run on the same channel. |
| 942 cricket::FakeVideoRenderer renderer2_; | 942 cricket::FakeVideoRenderer renderer2_; |
| 943 }; | 943 }; |
| 944 | 944 |
| 945 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT | 945 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT |
| OLD | NEW |