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

Unified Diff: talk/app/webrtc/test/fakevideotrackrenderer.h

Issue 1313753003: Remove VideoRendererInterface::CanApplyRotation() (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 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 | « talk/app/webrtc/mediastreaminterface.h ('k') | talk/app/webrtc/videotrack_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/test/fakevideotrackrenderer.h
diff --git a/talk/app/webrtc/test/fakevideotrackrenderer.h b/talk/app/webrtc/test/fakevideotrackrenderer.h
index 8bd98fa8a9e861f9de9dc81d01244e1fbe423b4b..38b84a6aff5c129e44a7be8626e7803816b483df 100644
--- a/talk/app/webrtc/test/fakevideotrackrenderer.h
+++ b/talk/app/webrtc/test/fakevideotrackrenderer.h
@@ -36,16 +36,7 @@ namespace webrtc {
class FakeVideoTrackRenderer : public VideoRendererInterface {
public:
FakeVideoTrackRenderer(VideoTrackInterface* video_track)
- : video_track_(video_track),
- can_apply_rotation_(true),
- last_frame_(NULL) {
- video_track_->AddRenderer(this);
- }
- FakeVideoTrackRenderer(VideoTrackInterface* video_track,
- bool can_apply_rotation)
- : video_track_(video_track),
- can_apply_rotation_(can_apply_rotation),
- last_frame_(NULL) {
+ : video_track_(video_track), last_frame_(NULL) {
video_track_->AddRenderer(this);
}
~FakeVideoTrackRenderer() {
@@ -54,21 +45,15 @@ class FakeVideoTrackRenderer : public VideoRendererInterface {
virtual void RenderFrame(const cricket::VideoFrame* video_frame) override {
last_frame_ = const_cast<cricket::VideoFrame*>(video_frame);
-
- const cricket::VideoFrame* frame =
- can_apply_rotation_ ? video_frame
- : video_frame->GetCopyWithRotationApplied();
-
- if (!fake_renderer_.SetSize(static_cast<int>(frame->GetWidth()),
- static_cast<int>(frame->GetHeight()), 0)) {
+ if (!fake_renderer_.SetSize(static_cast<int>(video_frame->GetWidth()),
+ static_cast<int>(video_frame->GetHeight()),
+ 0)) {
return;
}
- fake_renderer_.RenderFrame(frame);
+ fake_renderer_.RenderFrame(video_frame);
}
- virtual bool CanApplyRotation() override { return can_apply_rotation_; }
-
int errors() const { return fake_renderer_.errors(); }
int width() const { return fake_renderer_.width(); }
int height() const { return fake_renderer_.height(); }
@@ -80,7 +65,6 @@ class FakeVideoTrackRenderer : public VideoRendererInterface {
private:
cricket::FakeVideoRenderer fake_renderer_;
rtc::scoped_refptr<VideoTrackInterface> video_track_;
- bool can_apply_rotation_;
// Weak reference for frame pointer comparison only.
cricket::VideoFrame* last_frame_;
« no previous file with comments | « talk/app/webrtc/mediastreaminterface.h ('k') | talk/app/webrtc/videotrack_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698