| 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 28 matching lines...) Expand all Loading... |
| 39 memset(captured_frame_buffer_.get(), 0, captured_frame_.data_size); | 39 memset(captured_frame_buffer_.get(), 0, captured_frame_.data_size); |
| 40 captured_frame_.data = captured_frame_buffer_.get(); | 40 captured_frame_.data = captured_frame_buffer_.get(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void VerifyFrame(cricket::VideoFrame* dest_frame, | 43 void VerifyFrame(cricket::VideoFrame* dest_frame, |
| 44 webrtc::VideoRotation src_rotation, | 44 webrtc::VideoRotation src_rotation, |
| 45 int src_width, | 45 int src_width, |
| 46 int src_height, | 46 int src_height, |
| 47 bool apply_rotation) { | 47 bool apply_rotation) { |
| 48 if (!apply_rotation) { | 48 if (!apply_rotation) { |
| 49 EXPECT_EQ(dest_frame->GetRotation(), src_rotation); | 49 EXPECT_EQ(dest_frame->GetVideoRotation(), src_rotation); |
| 50 EXPECT_EQ(dest_frame->GetWidth(), src_width); | 50 EXPECT_EQ(dest_frame->GetWidth(), src_width); |
| 51 EXPECT_EQ(dest_frame->GetHeight(), src_height); | 51 EXPECT_EQ(dest_frame->GetHeight(), src_height); |
| 52 } else { | 52 } else { |
| 53 EXPECT_EQ(dest_frame->GetRotation(), webrtc::kVideoRotation_0); | 53 EXPECT_EQ(dest_frame->GetVideoRotation(), webrtc::kVideoRotation_0); |
| 54 if (src_rotation == webrtc::kVideoRotation_90 || | 54 if (src_rotation == webrtc::kVideoRotation_90 || |
| 55 src_rotation == webrtc::kVideoRotation_270) { | 55 src_rotation == webrtc::kVideoRotation_270) { |
| 56 EXPECT_EQ(dest_frame->GetWidth(), src_height); | 56 EXPECT_EQ(dest_frame->GetWidth(), src_height); |
| 57 EXPECT_EQ(dest_frame->GetHeight(), src_width); | 57 EXPECT_EQ(dest_frame->GetHeight(), src_width); |
| 58 } else { | 58 } else { |
| 59 EXPECT_EQ(dest_frame->GetWidth(), src_width); | 59 EXPECT_EQ(dest_frame->GetWidth(), src_width); |
| 60 EXPECT_EQ(dest_frame->GetHeight(), src_height); | 60 EXPECT_EQ(dest_frame->GetHeight(), src_height); |
| 61 } | 61 } |
| 62 } | 62 } |
| 63 } | 63 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 cricket::WebRtcVideoFrameFactory factory_; | 98 cricket::WebRtcVideoFrameFactory factory_; |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 TEST_F(WebRtcVideoFrameFactoryTest, NoApplyRotation) { | 101 TEST_F(WebRtcVideoFrameFactoryTest, NoApplyRotation) { |
| 102 TestCreateAliasedFrame(false); | 102 TestCreateAliasedFrame(false); |
| 103 } | 103 } |
| 104 | 104 |
| 105 TEST_F(WebRtcVideoFrameFactoryTest, ApplyRotation) { | 105 TEST_F(WebRtcVideoFrameFactoryTest, ApplyRotation) { |
| 106 TestCreateAliasedFrame(true); | 106 TestCreateAliasedFrame(true); |
| 107 } | 107 } |
| OLD | NEW |