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

Unified Diff: webrtc/media/devices/gtkvideorenderer.cc

Issue 1819103003: Delete cricket::VideoRenderer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. 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
« no previous file with comments | « webrtc/media/devices/gtkvideorenderer.h ('k') | webrtc/media/devices/videorendererfactory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/devices/gtkvideorenderer.cc
diff --git a/webrtc/media/devices/gtkvideorenderer.cc b/webrtc/media/devices/gtkvideorenderer.cc
index ec987768e682e2d98d110ed5f21f4c89b25cf08a..d4077c2922549db5fc90e22574f1bb3343df1e1d 100644
--- a/webrtc/media/devices/gtkvideorenderer.cc
+++ b/webrtc/media/devices/gtkvideorenderer.cc
@@ -59,7 +59,7 @@ GtkVideoRenderer::~GtkVideoRenderer() {
// implicitly destroyed by the above.
}
-bool GtkVideoRenderer::SetSize(int width, int height, int reserved) {
+bool GtkVideoRenderer::SetSize(int width, int height) {
ScopedGdkLock lock;
// If the dimension is the same, no-op.
@@ -80,16 +80,12 @@ bool GtkVideoRenderer::SetSize(int width, int height, int reserved) {
return true;
}
-bool GtkVideoRenderer::RenderFrame(const VideoFrame* video_frame) {
- if (!video_frame) {
- return false;
- }
-
- const VideoFrame* frame = video_frame->GetCopyWithRotationApplied();
+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(), 0)) {
- return false;
+ if (!SetSize(frame->GetWidth(), frame->GetHeight())) {
+ return;
}
// convert I420 frame to ABGR format, which is accepted by GTK
@@ -101,7 +97,7 @@ bool GtkVideoRenderer::RenderFrame(const VideoFrame* video_frame) {
ScopedGdkLock lock;
if (IsClosed()) {
- return false;
+ return;
}
// draw the ABGR image
@@ -117,7 +113,6 @@ bool GtkVideoRenderer::RenderFrame(const VideoFrame* video_frame) {
// Run the Gtk main loop to refresh the window.
Pump();
- return true;
}
bool GtkVideoRenderer::Initialize(int width, int height) {
« no previous file with comments | « webrtc/media/devices/gtkvideorenderer.h ('k') | webrtc/media/devices/videorendererfactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698