Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 597 (bmi_.bmiHeader.biBitCount >> 3); | 597 (bmi_.bmiHeader.biBitCount >> 3); |
| 598 image_.reset(new uint8_t[bmi_.bmiHeader.biSizeImage]); | 598 image_.reset(new uint8_t[bmi_.bmiHeader.biSizeImage]); |
| 599 } | 599 } |
| 600 | 600 |
| 601 void MainWnd::VideoRenderer::OnFrame( | 601 void MainWnd::VideoRenderer::OnFrame( |
| 602 const cricket::VideoFrame& video_frame) { | 602 const cricket::VideoFrame& video_frame) { |
| 603 | 603 |
| 604 { | 604 { |
| 605 AutoLock<VideoRenderer> lock(this); | 605 AutoLock<VideoRenderer> lock(this); |
| 606 | 606 |
| 607 const cricket::VideoFrame* frame = | 607 const cricket::WebRtcVideoFrame frame( |
| 608 video_frame.GetCopyWithRotationApplied(); | 608 webrtc::VideoFrameBuffer::Rotate(video_frame.video_frame_buffer(), |
| 609 video_frame.rotation()), | |
| 610 webrtc::kVideoRotation_0, | |
| 611 video_frame.timestamp_us()); | |
| 609 | 612 |
| 610 SetSize(frame->width(), frame->height()); | 613 SetSize(frame.width(), frame.height()); |
| 611 | 614 |
| 612 ASSERT(image_.get() != NULL); | 615 ASSERT(image_.get() != NULL); |
| 613 frame->ConvertToRgbBuffer(cricket::FOURCC_ARGB, | 616 frame.ConvertToRgbBuffer(cricket::FOURCC_ARGB, |
| 614 image_.get(), | 617 image_.get(), |
|
magjed_webrtc
2016/08/26 12:04:15
you need to adjust indentation here
nisse-webrtc
2016/08/26 12:31:40
Done.
| |
| 615 bmi_.bmiHeader.biSizeImage, | 618 bmi_.bmiHeader.biSizeImage, |
| 616 bmi_.bmiHeader.biWidth * | 619 bmi_.bmiHeader.biWidth * |
| 617 bmi_.bmiHeader.biBitCount / 8); | 620 bmi_.bmiHeader.biBitCount / 8); |
| 618 } | 621 } |
| 619 InvalidateRect(wnd_, NULL, TRUE); | 622 InvalidateRect(wnd_, NULL, TRUE); |
| 620 } | 623 } |
| OLD | NEW |