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

Side by Side Diff: webrtc/modules/video_render/test/testAPI/testAPI.cc

Issue 1900673002: Delete webrtc::VideoFrame methods buffer and stride. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Update H.264 video_toolbox encoder. 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 } 269 }
270 return 0; 270 return 0;
271 } 271 }
272 int32_t _cnt; 272 int32_t _cnt;
273 }; 273 };
274 274
275 void GetTestVideoFrame(VideoFrame* frame, uint8_t startColor) { 275 void GetTestVideoFrame(VideoFrame* frame, uint8_t startColor) {
276 // changing color 276 // changing color
277 static uint8_t color = startColor; 277 static uint8_t color = startColor;
278 278
279 memset(frame->buffer(kYPlane), color, frame->allocated_size(kYPlane)); 279 memset(frame->video_frame_buffer()->MutableDataY(), color,
280 memset(frame->buffer(kUPlane), color, frame->allocated_size(kUPlane)); 280 frame->allocated_size(kYPlane));
281 memset(frame->buffer(kVPlane), color, frame->allocated_size(kVPlane)); 281 memset(frame->video_frame_buffer()->MutableDataU(), color,
282 frame->allocated_size(kUPlane));
283 memset(frame->video_frame_buffer()->MutableDataV(), color,
284 frame->allocated_size(kVPlane));
282 285
283 ++color; 286 ++color;
284 } 287 }
285 288
286 int TestSingleStream(VideoRender* renderModule) { 289 int TestSingleStream(VideoRender* renderModule) {
287 int error = 0; 290 int error = 0;
288 // Add settings for a stream to render 291 // Add settings for a stream to render
289 printf("Add stream 0 to entire window\n"); 292 printf("Add stream 0 to entire window\n");
290 const int streamId0 = 0; 293 const int streamId0 = 0;
291 VideoRenderCallback* renderCallback0 = renderModule->AddIncomingRenderStream (streamId0, 0, 0.0f, 0.0f, 1.0f, 1.0f); 294 VideoRenderCallback* renderCallback0 = renderModule->AddIncomingRenderStream (streamId0, 0, 0.0f, 0.0f, 1.0f, 1.0f);
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 Display* display; 639 Display* display;
637 WebRtcCreateWindow(&testWindow, &display, 0, 352, 288); 640 WebRtcCreateWindow(&testWindow, &display, 0, 352, 288);
638 VideoRenderType windowType = kRenderX11; 641 VideoRenderType windowType = kRenderX11;
639 window = (void*)testWindow; 642 window = (void*)testWindow;
640 #endif // WEBRTC_LINUX 643 #endif // WEBRTC_LINUX
641 644
642 RunVideoRenderTests(window, windowType); 645 RunVideoRenderTests(window, windowType);
643 return 0; 646 return 0;
644 } 647 }
645 #endif // !WEBRTC_MAC 648 #endif // !WEBRTC_MAC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698