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

Unified Diff: webrtc/media/base/fakevideorenderer.h

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/examples/peerconnection/client/main_wnd.h ('k') | webrtc/media/base/videorenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/fakevideorenderer.h
diff --git a/webrtc/media/base/fakevideorenderer.h b/webrtc/media/base/fakevideorenderer.h
index 5cc1a59192afcd3deff4bde3ea2109317cdcb166..00fbc406ad215ae98bc41fb15aea370292557000 100644
--- a/webrtc/media/base/fakevideorenderer.h
+++ b/webrtc/media/base/fakevideorenderer.h
@@ -14,12 +14,12 @@
#include "webrtc/base/logging.h"
#include "webrtc/base/sigslot.h"
#include "webrtc/media/base/videoframe.h"
-#include "webrtc/media/base/videorenderer.h"
+#include "webrtc/media/base/videosinkinterface.h"
namespace cricket {
// Faked video renderer that has a callback for actions on rendering.
-class FakeVideoRenderer : public VideoRenderer {
+class FakeVideoRenderer : public rtc::VideoSinkInterface<cricket::VideoFrame> {
public:
FakeVideoRenderer()
: errors_(0),
@@ -30,24 +30,18 @@ class FakeVideoRenderer : public VideoRenderer {
num_rendered_frames_(0),
black_frame_(false) {}
- virtual bool RenderFrame(const VideoFrame* frame) {
+ virtual void OnFrame(const VideoFrame& frame) {
rtc::CritScope cs(&crit_);
// TODO(zhurunz) Check with VP8 team to see if we can remove this
// tolerance on Y values.
- black_frame_ = CheckFrameColorYuv(6, 48, 128, 128, 128, 128, frame);
+ black_frame_ = CheckFrameColorYuv(6, 48, 128, 128, 128, 128, &frame);
// Treat unexpected frame size as error.
- if (!frame) {
- LOG(LS_WARNING) << "RenderFrame expected non-null frame.";
- ++errors_;
- return false;
- }
++num_rendered_frames_;
- width_ = static_cast<int>(frame->GetWidth());
- height_ = static_cast<int>(frame->GetHeight());
- rotation_ = frame->GetVideoRotation();
- timestamp_ = frame->GetTimeStamp();
- SignalRenderFrame(frame);
- return true;
+ width_ = static_cast<int>(frame.GetWidth());
+ height_ = static_cast<int>(frame.GetHeight());
+ rotation_ = frame.GetVideoRotation();
+ timestamp_ = frame.GetTimeStamp();
+ SignalRenderFrame(&frame);
}
int errors() const { return errors_; }
« no previous file with comments | « webrtc/examples/peerconnection/client/main_wnd.h ('k') | webrtc/media/base/videorenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698