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

Unified Diff: webrtc/examples/peerconnection/client/linux/main_wnd.cc

Issue 1684423002: Make VideoTrack and VideoTrackRenderers implement rtc::VideoSourceInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Delete unused last_frame method and corresponding member. Created 4 years, 10 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/examples/peerconnection/client/linux/main_wnd.cc
diff --git a/webrtc/examples/peerconnection/client/linux/main_wnd.cc b/webrtc/examples/peerconnection/client/linux/main_wnd.cc
index cf98c1cac7934efb4c6ce689d99b6a7d6b069167..5a9c26817552b05b72f3ce521d75aaaa262cabf1 100644
--- a/webrtc/examples/peerconnection/client/linux/main_wnd.cc
+++ b/webrtc/examples/peerconnection/client/linux/main_wnd.cc
@@ -460,11 +460,11 @@ GtkMainWnd::VideoRenderer::VideoRenderer(
height_(0),
main_wnd_(main_wnd),
rendered_track_(track_to_render) {
- rendered_track_->AddRenderer(this);
+ rendered_track_->AddOrUpdateSink(this, rtc::VideoSinkWants());
}
GtkMainWnd::VideoRenderer::~VideoRenderer() {
- rendered_track_->RemoveRenderer(this);
+ rendered_track_->RemoveSink(this);
}
void GtkMainWnd::VideoRenderer::SetSize(int width, int height) {
@@ -480,11 +480,11 @@ void GtkMainWnd::VideoRenderer::SetSize(int width, int height) {
gdk_threads_leave();
}
-void GtkMainWnd::VideoRenderer::RenderFrame(
- const cricket::VideoFrame* video_frame) {
+void GtkMainWnd::VideoRenderer::OnFrame(
+ const cricket::VideoFrame& video_frame) {
gdk_threads_enter();
- const cricket::VideoFrame* frame = video_frame->GetCopyWithRotationApplied();
+ const cricket::VideoFrame* frame = video_frame.GetCopyWithRotationApplied();
SetSize(static_cast<int>(frame->GetWidth()),
static_cast<int>(frame->GetHeight()));
@@ -511,5 +511,3 @@ void GtkMainWnd::VideoRenderer::RenderFrame(
g_idle_add(Redraw, main_wnd_);
}
-
-

Powered by Google App Engine
This is Rietveld 408576698