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

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

Issue 1324263004: Remove cricket::VideoFrame::Set/GetElapsedTime() (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased. Re-added CapturedFrame.elapsed_time. Remove once Chromium is updated. 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
« no previous file with comments | « talk/media/webrtc/webrtcvideoframe_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 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 26 matching lines...) Expand all
37 WebRtcVideoFrameFactoryTest() {} 37 WebRtcVideoFrameFactoryTest() {}
38 38
39 void InitFrame(webrtc::VideoRotation frame_rotation) { 39 void InitFrame(webrtc::VideoRotation frame_rotation) {
40 const int frame_width = 1920; 40 const int frame_width = 1920;
41 const int frame_height = 1080; 41 const int frame_height = 1080;
42 42
43 // Build the CapturedFrame. 43 // Build the CapturedFrame.
44 captured_frame_.fourcc = cricket::FOURCC_I420; 44 captured_frame_.fourcc = cricket::FOURCC_I420;
45 captured_frame_.pixel_width = 1; 45 captured_frame_.pixel_width = 1;
46 captured_frame_.pixel_height = 1; 46 captured_frame_.pixel_height = 1;
47 captured_frame_.elapsed_time = 1234;
48 captured_frame_.time_stamp = 5678; 47 captured_frame_.time_stamp = 5678;
49 captured_frame_.rotation = frame_rotation; 48 captured_frame_.rotation = frame_rotation;
50 captured_frame_.width = frame_width; 49 captured_frame_.width = frame_width;
51 captured_frame_.height = frame_height; 50 captured_frame_.height = frame_height;
52 captured_frame_.data_size = 51 captured_frame_.data_size =
53 (frame_width * frame_height) + 52 (frame_width * frame_height) +
54 ((frame_width + 1) / 2) * ((frame_height + 1) / 2) * 2; 53 ((frame_width + 1) / 2) * ((frame_height + 1) / 2) * 2;
55 captured_frame_buffer_.reset(new uint8[captured_frame_.data_size]); 54 captured_frame_buffer_.reset(new uint8[captured_frame_.data_size]);
56 // Initialize memory to satisfy DrMemory tests. 55 // Initialize memory to satisfy DrMemory tests.
57 memset(captured_frame_buffer_.get(), 0, captured_frame_.data_size); 56 memset(captured_frame_buffer_.get(), 0, captured_frame_.data_size);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 cricket::WebRtcVideoFrameFactory factory_; 115 cricket::WebRtcVideoFrameFactory factory_;
117 }; 116 };
118 117
119 TEST_F(WebRtcVideoFrameFactoryTest, NoApplyRotation) { 118 TEST_F(WebRtcVideoFrameFactoryTest, NoApplyRotation) {
120 TestCreateAliasedFrame(false); 119 TestCreateAliasedFrame(false);
121 } 120 }
122 121
123 TEST_F(WebRtcVideoFrameFactoryTest, ApplyRotation) { 122 TEST_F(WebRtcVideoFrameFactoryTest, ApplyRotation) {
124 TestCreateAliasedFrame(true); 123 TestCreateAliasedFrame(true);
125 } 124 }
OLDNEW
« no previous file with comments | « talk/media/webrtc/webrtcvideoframe_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698