OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |