Index: webrtc/examples/peerconnection/client/main_wnd.cc |
diff --git a/webrtc/examples/peerconnection/client/main_wnd.cc b/webrtc/examples/peerconnection/client/main_wnd.cc |
index 72f85b9eb2732df87496791b27f669ca5aab9303..608e6dfe917f6cfd5bb1304aba3a15e439e0bc2e 100644 |
--- a/webrtc/examples/peerconnection/client/main_wnd.cc |
+++ b/webrtc/examples/peerconnection/client/main_wnd.cc |
@@ -576,11 +576,11 @@ MainWnd::VideoRenderer::VideoRenderer( |
bmi_.bmiHeader.biHeight = -height; |
bmi_.bmiHeader.biSizeImage = width * height * |
(bmi_.bmiHeader.biBitCount >> 3); |
- rendered_track_->AddRenderer(this); |
+ rendered_track_->AddOrUpdateSink(this, rtc::VideoSinkWants()); |
} |
MainWnd::VideoRenderer::~VideoRenderer() { |
- rendered_track_->RemoveRenderer(this); |
+ rendered_track_->RemoveSink(this); |
::DeleteCriticalSection(&buffer_lock_); |
} |
@@ -598,16 +598,14 @@ void MainWnd::VideoRenderer::SetSize(int width, int height) { |
image_.reset(new uint8_t[bmi_.bmiHeader.biSizeImage]); |
} |
-void MainWnd::VideoRenderer::RenderFrame( |
- const cricket::VideoFrame* video_frame) { |
- if (!video_frame) |
- return; |
+void MainWnd::VideoRenderer::OnFrame( |
+ const cricket::VideoFrame& video_frame) { |
{ |
AutoLock<VideoRenderer> lock(this); |
const cricket::VideoFrame* frame = |
- video_frame->GetCopyWithRotationApplied(); |
+ video_frame.GetCopyWithRotationApplied(); |
SetSize(static_cast<int>(frame->GetWidth()), |
static_cast<int>(frame->GetHeight())); |