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

Unified Diff: webrtc/media/devices/gtkvideorenderer.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, 9 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/media/devices/gtkvideorenderer.cc
diff --git a/webrtc/media/devices/gtkvideorenderer.cc b/webrtc/media/devices/gtkvideorenderer.cc
index d4077c2922549db5fc90e22574f1bb3343df1e1d..d7a4d6fb6c33444570a452170d4068d2602f5841 100644
--- a/webrtc/media/devices/gtkvideorenderer.cc
+++ b/webrtc/media/devices/gtkvideorenderer.cc
@@ -84,15 +84,16 @@ void GtkVideoRenderer::OnFrame(const VideoFrame& video_frame) {
const VideoFrame* frame = video_frame.GetCopyWithRotationApplied();
// Need to set size as the frame might be rotated.
- if (!SetSize(frame->GetWidth(), frame->GetHeight())) {
+ if (!SetSize(frame->width(), frame->height())) {
return;
}
// convert I420 frame to ABGR format, which is accepted by GTK
frame->ConvertToRgbBuffer(cricket::FOURCC_ABGR,
image_.get(),
- frame->GetWidth() * frame->GetHeight() * 4,
- frame->GetWidth() * 4);
+ static_cast<size_t>(frame->width()) *
+ frame->height() * 4,
+ frame->width() * 4);
ScopedGdkLock lock;
@@ -105,11 +106,11 @@ void GtkVideoRenderer::OnFrame(const VideoFrame& video_frame) {
draw_area_->style->fg_gc[GTK_STATE_NORMAL],
0,
0,
- frame->GetWidth(),
- frame->GetHeight(),
+ frame->width(),
+ frame->height(),
GDK_RGB_DITHER_MAX,
image_.get(),
- frame->GetWidth() * 4);
+ frame->width() * 4);
// Run the Gtk main loop to refresh the window.
Pump();

Powered by Google App Engine
This is Rietveld 408576698