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

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

Issue 1817473002: Delete VideoRendererInterface. (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/examples/peerconnection/client/main_wnd.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()));
« no previous file with comments | « webrtc/examples/peerconnection/client/main_wnd.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698