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

Side by Side Diff: webrtc/api/test/fakevideotrackrenderer.h

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 unified diff | Download patch
« no previous file with comments | « webrtc/api/objc/RTCVideoTrack.mm ('k') | webrtc/api/videotrack_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 26 matching lines...) Expand all
37 37
38 int num_rendered_frames() const { 38 int num_rendered_frames() const {
39 return fake_renderer_.num_rendered_frames(); 39 return fake_renderer_.num_rendered_frames();
40 } 40 }
41 41
42 private: 42 private:
43 cricket::FakeVideoRenderer fake_renderer_; 43 cricket::FakeVideoRenderer fake_renderer_;
44 rtc::scoped_refptr<VideoTrackInterface> video_track_; 44 rtc::scoped_refptr<VideoTrackInterface> video_track_;
45 }; 45 };
46 46
47 // Similar class, testing the deprecated AddRenderer/RemoveRenderer methods.
48 class FakeVideoTrackRendererOld : public VideoRendererInterface {
49 public:
50 FakeVideoTrackRendererOld(VideoTrackInterface* video_track)
51 : video_track_(video_track) {
52 video_track_->AddRenderer(this);
53 }
54 ~FakeVideoTrackRendererOld() { video_track_->RemoveRenderer(this); }
55
56 virtual void RenderFrame(const cricket::VideoFrame* video_frame) override {
57 fake_renderer_.RenderFrame(video_frame);
58 }
59
60 int errors() const { return fake_renderer_.errors(); }
61 int width() const { return fake_renderer_.width(); }
62 int height() const { return fake_renderer_.height(); }
63 bool black_frame() const { return fake_renderer_.black_frame(); }
64
65 int num_rendered_frames() const {
66 return fake_renderer_.num_rendered_frames();
67 }
68
69 private:
70 cricket::FakeVideoRenderer fake_renderer_;
71 rtc::scoped_refptr<VideoTrackInterface> video_track_;
72 };
73
74 } // namespace webrtc 47 } // namespace webrtc
75 48
76 #endif // WEBRTC_API_TEST_FAKEVIDEOTRACKRENDERER_H_ 49 #endif // WEBRTC_API_TEST_FAKEVIDEOTRACKRENDERER_H_
OLDNEW
« no previous file with comments | « webrtc/api/objc/RTCVideoTrack.mm ('k') | webrtc/api/videotrack_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698