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 |
(...skipping 30 matching lines...) Expand all Loading... |
41 memset(captured_frame_buffer_.get(), 0, captured_frame_.data_size); | 41 memset(captured_frame_buffer_.get(), 0, captured_frame_.data_size); |
42 captured_frame_.data = captured_frame_buffer_.get(); | 42 captured_frame_.data = captured_frame_buffer_.get(); |
43 } | 43 } |
44 | 44 |
45 void VerifyFrame(cricket::VideoFrame* dest_frame, | 45 void VerifyFrame(cricket::VideoFrame* dest_frame, |
46 webrtc::VideoRotation src_rotation, | 46 webrtc::VideoRotation src_rotation, |
47 int src_width, | 47 int src_width, |
48 int src_height, | 48 int src_height, |
49 bool apply_rotation) { | 49 bool apply_rotation) { |
50 if (!apply_rotation) { | 50 if (!apply_rotation) { |
51 EXPECT_EQ(dest_frame->GetVideoRotation(), src_rotation); | 51 EXPECT_EQ(dest_frame->rotation(), src_rotation); |
52 EXPECT_EQ(dest_frame->width(), src_width); | 52 EXPECT_EQ(dest_frame->width(), src_width); |
53 EXPECT_EQ(dest_frame->height(), src_height); | 53 EXPECT_EQ(dest_frame->height(), src_height); |
54 } else { | 54 } else { |
55 EXPECT_EQ(dest_frame->GetVideoRotation(), webrtc::kVideoRotation_0); | 55 EXPECT_EQ(dest_frame->rotation(), webrtc::kVideoRotation_0); |
56 if (src_rotation == webrtc::kVideoRotation_90 || | 56 if (src_rotation == webrtc::kVideoRotation_90 || |
57 src_rotation == webrtc::kVideoRotation_270) { | 57 src_rotation == webrtc::kVideoRotation_270) { |
58 EXPECT_EQ(dest_frame->width(), src_height); | 58 EXPECT_EQ(dest_frame->width(), src_height); |
59 EXPECT_EQ(dest_frame->height(), src_width); | 59 EXPECT_EQ(dest_frame->height(), src_width); |
60 } else { | 60 } else { |
61 EXPECT_EQ(dest_frame->width(), src_width); | 61 EXPECT_EQ(dest_frame->width(), src_width); |
62 EXPECT_EQ(dest_frame->height(), src_height); | 62 EXPECT_EQ(dest_frame->height(), src_height); |
63 } | 63 } |
64 } | 64 } |
65 } | 65 } |
(...skipping 34 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 |