Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: webrtc/media/engine/webrtcvideoframefactory_unittest.cc

Issue 1838353004: cricket::VideoFrame cleanup. New width() and height(). Deleted GetChroma* methods. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Use objc dot syntax. Delete chromaSize property. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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->GetVideoRotation(), src_rotation);
52 EXPECT_EQ(dest_frame->GetWidth(), src_width); 52 EXPECT_EQ(dest_frame->width(), src_width);
53 EXPECT_EQ(dest_frame->GetHeight(), 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->GetVideoRotation(), 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->GetWidth(), src_height); 58 EXPECT_EQ(dest_frame->width(), src_height);
59 EXPECT_EQ(dest_frame->GetHeight(), src_width); 59 EXPECT_EQ(dest_frame->height(), src_width);
60 } else { 60 } else {
61 EXPECT_EQ(dest_frame->GetWidth(), src_width); 61 EXPECT_EQ(dest_frame->width(), src_width);
62 EXPECT_EQ(dest_frame->GetHeight(), src_height); 62 EXPECT_EQ(dest_frame->height(), src_height);
63 } 63 }
64 } 64 }
65 } 65 }
66 66
67 void TestCreateAliasedFrame(bool apply_rotation) { 67 void TestCreateAliasedFrame(bool apply_rotation) {
68 cricket::VideoFrameFactory& factory = factory_; 68 cricket::VideoFrameFactory& factory = factory_;
69 factory.SetApplyRotation(apply_rotation); 69 factory.SetApplyRotation(apply_rotation);
70 InitFrame(webrtc::kVideoRotation_270); 70 InitFrame(webrtc::kVideoRotation_270);
71 const cricket::CapturedFrame& captured_frame = get_captured_frame(); 71 const cricket::CapturedFrame& captured_frame = get_captured_frame();
72 // Create the new frame from the CapturedFrame. 72 // Create the new frame from the CapturedFrame.
(...skipping 27 matching lines...) Expand all
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 }
OLDNEW
« webrtc/media/devices/gdivideorenderer.cc ('K') | « webrtc/media/engine/webrtcvideoframe_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698