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

Side by Side Diff: webrtc/examples/peerconnection/client/main_wnd.cc

Issue 1838353004: cricket::VideoFrame cleanup. New width() and height(). Deleted GetChroma* methods. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix int vs size_t comparison. 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 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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::VideoFrame* frame =
608 video_frame.GetCopyWithRotationApplied(); 608 video_frame.GetCopyWithRotationApplied();
609 609
610 SetSize(static_cast<int>(frame->GetWidth()), 610 SetSize(frame->width(), frame->height());
611 static_cast<int>(frame->GetHeight()));
612 611
613 ASSERT(image_.get() != NULL); 612 ASSERT(image_.get() != NULL);
614 frame->ConvertToRgbBuffer(cricket::FOURCC_ARGB, 613 frame->ConvertToRgbBuffer(cricket::FOURCC_ARGB,
615 image_.get(), 614 image_.get(),
616 bmi_.bmiHeader.biSizeImage, 615 bmi_.bmiHeader.biSizeImage,
617 bmi_.bmiHeader.biWidth * 616 bmi_.bmiHeader.biWidth *
618 bmi_.bmiHeader.biBitCount / 8); 617 bmi_.bmiHeader.biBitCount / 8);
619 } 618 }
620 InvalidateRect(wnd_, NULL, TRUE); 619 InvalidateRect(wnd_, NULL, TRUE);
621 } 620 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698