OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "webrtc/api/test/fakevideotrackrenderer.h" | 14 #include "webrtc/api/test/fakevideotrackrenderer.h" |
15 #include "webrtc/api/videocapturertracksource.h" | 15 #include "webrtc/api/videocapturertracksource.h" |
16 #include "webrtc/api/videotrack.h" | 16 #include "webrtc/api/videotrack.h" |
17 #include "webrtc/base/gunit.h" | 17 #include "webrtc/base/gunit.h" |
18 #include "webrtc/media/base/fakevideocapturer.h" | 18 #include "webrtc/media/base/fakevideocapturer.h" |
19 #include "webrtc/media/base/fakemediaengine.h" | 19 #include "webrtc/media/base/fakemediaengine.h" |
20 #include "webrtc/media/engine/webrtcvideoframe.h" | |
21 | 20 |
22 using webrtc::FakeVideoTrackRenderer; | 21 using webrtc::FakeVideoTrackRenderer; |
23 using webrtc::MediaSourceInterface; | 22 using webrtc::MediaSourceInterface; |
24 using webrtc::MediaStreamTrackInterface; | 23 using webrtc::MediaStreamTrackInterface; |
25 using webrtc::VideoTrackSource; | 24 using webrtc::VideoTrackSource; |
26 using webrtc::VideoTrack; | 25 using webrtc::VideoTrack; |
27 using webrtc::VideoTrackInterface; | 26 using webrtc::VideoTrackInterface; |
28 | 27 |
29 class VideoTrackTest : public testing::Test { | 28 class VideoTrackTest : public testing::Test { |
30 public: | 29 public: |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 video_track_->set_enabled(false); | 84 video_track_->set_enabled(false); |
86 capturer_.CaptureFrame(); | 85 capturer_.CaptureFrame(); |
87 EXPECT_EQ(2, renderer->num_rendered_frames()); | 86 EXPECT_EQ(2, renderer->num_rendered_frames()); |
88 EXPECT_TRUE(renderer->black_frame()); | 87 EXPECT_TRUE(renderer->black_frame()); |
89 | 88 |
90 video_track_->set_enabled(true); | 89 video_track_->set_enabled(true); |
91 capturer_.CaptureFrame(); | 90 capturer_.CaptureFrame(); |
92 EXPECT_EQ(3, renderer->num_rendered_frames()); | 91 EXPECT_EQ(3, renderer->num_rendered_frames()); |
93 EXPECT_FALSE(renderer->black_frame()); | 92 EXPECT_FALSE(renderer->black_frame()); |
94 } | 93 } |
OLD | NEW |