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

Side by Side Diff: talk/media/webrtc/webrtcvideoframe_unittest.cc

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… Created 5 years, 2 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 * libjingle 2 * libjingle
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 cricket::CapturedFrame captured_frame; 65 cricket::CapturedFrame captured_frame;
66 captured_frame.fourcc = cricket::FOURCC_I420; 66 captured_frame.fourcc = cricket::FOURCC_I420;
67 captured_frame.pixel_width = 1; 67 captured_frame.pixel_width = 1;
68 captured_frame.pixel_height = 1; 68 captured_frame.pixel_height = 1;
69 captured_frame.time_stamp = 5678; 69 captured_frame.time_stamp = 5678;
70 captured_frame.rotation = frame_rotation; 70 captured_frame.rotation = frame_rotation;
71 captured_frame.width = frame_width; 71 captured_frame.width = frame_width;
72 captured_frame.height = frame_height; 72 captured_frame.height = frame_height;
73 captured_frame.data_size = (frame_width * frame_height) + 73 captured_frame.data_size = (frame_width * frame_height) +
74 ((frame_width + 1) / 2) * ((frame_height + 1) / 2) * 2; 74 ((frame_width + 1) / 2) * ((frame_height + 1) / 2) * 2;
75 rtc::scoped_ptr<uint8[]> captured_frame_buffer( 75 rtc::scoped_ptr<uint8_t[]> captured_frame_buffer(
76 new uint8[captured_frame.data_size]); 76 new uint8_t[captured_frame.data_size]);
77 // Initialize memory to satisfy DrMemory tests. 77 // Initialize memory to satisfy DrMemory tests.
78 memset(captured_frame_buffer.get(), 0, captured_frame.data_size); 78 memset(captured_frame_buffer.get(), 0, captured_frame.data_size);
79 captured_frame.data = captured_frame_buffer.get(); 79 captured_frame.data = captured_frame_buffer.get();
80 80
81 // Create the new frame from the CapturedFrame. 81 // Create the new frame from the CapturedFrame.
82 cricket::WebRtcVideoFrame frame; 82 cricket::WebRtcVideoFrame frame;
83 EXPECT_TRUE( 83 EXPECT_TRUE(
84 frame.Init(&captured_frame, cropped_width, cropped_height, 84 frame.Init(&captured_frame, cropped_width, cropped_height,
85 apply_rotation)); 85 apply_rotation));
86 86
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 343
344 // Claim the frame 2 needs to be rotated for another 270 degree. The output 344 // Claim the frame 2 needs to be rotated for another 270 degree. The output
345 // from frame 2 rotation should be the same as frame 1. 345 // from frame 2 rotation should be the same as frame 1.
346 applied90->SetRotation(webrtc::kVideoRotation_270); 346 applied90->SetRotation(webrtc::kVideoRotation_270);
347 const cricket::VideoFrame* applied360 = 347 const cricket::VideoFrame* applied360 =
348 applied90->GetCopyWithRotationApplied(); 348 applied90->GetCopyWithRotationApplied();
349 EXPECT_TRUE(applied360); 349 EXPECT_TRUE(applied360);
350 EXPECT_EQ(applied360->GetVideoRotation(), webrtc::kVideoRotation_0); 350 EXPECT_EQ(applied360->GetVideoRotation(), webrtc::kVideoRotation_0);
351 EXPECT_TRUE(IsEqual(applied0, *applied360, 0)); 351 EXPECT_TRUE(IsEqual(applied0, *applied360, 0));
352 } 352 }
OLDNEW
« no previous file with comments | « talk/media/webrtc/webrtcvideoframe.cc ('k') | talk/media/webrtc/webrtcvideoframefactory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698