OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 <string.h> | 11 #include <string.h> |
12 | 12 |
13 #include <memory> | 13 #include <memory> |
14 | 14 |
15 #include "webrtc/media/base/videoframe_unittest.h" | 15 #include "webrtc/base/gunit.h" |
| 16 #include "webrtc/media/base/videocapturer.h" |
16 #include "webrtc/media/engine/webrtcvideoframe.h" | 17 #include "webrtc/media/engine/webrtcvideoframe.h" |
17 #include "webrtc/media/engine/webrtcvideoframefactory.h" | 18 #include "webrtc/media/engine/webrtcvideoframefactory.h" |
18 | 19 |
19 class WebRtcVideoFrameFactoryTest | 20 class WebRtcVideoFrameFactoryTest : public testing::Test { |
20 : public VideoFrameTest<cricket::WebRtcVideoFrameFactory> { | |
21 public: | 21 public: |
22 WebRtcVideoFrameFactoryTest() {} | 22 WebRtcVideoFrameFactoryTest() {} |
23 | 23 |
24 void InitFrame(webrtc::VideoRotation frame_rotation) { | 24 void InitFrame(webrtc::VideoRotation frame_rotation) { |
25 const int frame_width = 1920; | 25 const int frame_width = 1920; |
26 const int frame_height = 1080; | 26 const int frame_height = 1080; |
27 | 27 |
28 // Build the CapturedFrame. | 28 // Build the CapturedFrame. |
29 captured_frame_.fourcc = cricket::FOURCC_I420; | 29 captured_frame_.fourcc = cricket::FOURCC_I420; |
30 captured_frame_.pixel_width = 1; | 30 captured_frame_.pixel_width = 1; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 cricket::WebRtcVideoFrameFactory factory_; | 100 cricket::WebRtcVideoFrameFactory factory_; |
101 }; | 101 }; |
102 | 102 |
103 TEST_F(WebRtcVideoFrameFactoryTest, NoApplyRotation) { | 103 TEST_F(WebRtcVideoFrameFactoryTest, NoApplyRotation) { |
104 TestCreateAliasedFrame(false); | 104 TestCreateAliasedFrame(false); |
105 } | 105 } |
106 | 106 |
107 TEST_F(WebRtcVideoFrameFactoryTest, ApplyRotation) { | 107 TEST_F(WebRtcVideoFrameFactoryTest, ApplyRotation) { |
108 TestCreateAliasedFrame(true); | 108 TestCreateAliasedFrame(true); |
109 } | 109 } |
OLD | NEW |