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

Side by Side Diff: webrtc/media/base/videoengine_unittest.h

Issue 1655793003: Make cricket::VideoCapturer implement VideoSourceInterface (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added dummy capturerenderadapter.cc Created 4 years, 10 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/media/base/videocapturer_unittest.cc ('k') | webrtc/media/base/videosinkinterface.h » ('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 (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // possible to test that the media processors are indeed being called when 79 // possible to test that the media processors are indeed being called when
80 // registered. 80 // registered.
81 template<class T> 81 template<class T>
82 class VideoEngineOverride : public T { 82 class VideoEngineOverride : public T {
83 public: 83 public:
84 VideoEngineOverride() : T() { 84 VideoEngineOverride() : T() {
85 } 85 }
86 virtual ~VideoEngineOverride() { 86 virtual ~VideoEngineOverride() {
87 } 87 }
88 bool is_camera_on() const { return T::GetVideoCapturer()->IsRunning(); } 88 bool is_camera_on() const { return T::GetVideoCapturer()->IsRunning(); }
89 void set_has_senders(bool has_senders) {
90 cricket::VideoCapturer* video_capturer = T::GetVideoCapturer();
91 if (has_senders) {
92 video_capturer->SignalVideoFrame.connect(this,
93 &VideoEngineOverride<T>::OnLocalFrame);
94 } else {
95 video_capturer->SignalVideoFrame.disconnect(this);
96 }
97 }
98 void OnLocalFrame(cricket::VideoCapturer*,
99 const cricket::VideoFrame*) {
100 }
101 void OnLocalFrameFormat(cricket::VideoCapturer*,
102 const cricket::VideoFormat*) {
103 }
104 89
105 void TriggerMediaFrame(uint32_t ssrc, 90 void TriggerMediaFrame(uint32_t ssrc,
106 cricket::VideoFrame* frame, 91 cricket::VideoFrame* frame,
107 bool* drop_frame) { 92 bool* drop_frame) {
108 T::SignalMediaFrame(ssrc, frame, drop_frame); 93 T::SignalMediaFrame(ssrc, frame, drop_frame);
109 } 94 }
110 }; 95 };
111 96
112 template<class E, class C> 97 template<class E, class C>
113 class VideoMediaChannelTest : public testing::Test, 98 class VideoMediaChannelTest : public testing::Test,
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 rtc::scoped_ptr<C> channel_; 1182 rtc::scoped_ptr<C> channel_;
1198 cricket::FakeNetworkInterface network_interface_; 1183 cricket::FakeNetworkInterface network_interface_;
1199 cricket::FakeVideoRenderer renderer_; 1184 cricket::FakeVideoRenderer renderer_;
1200 cricket::VideoMediaChannel::Error media_error_; 1185 cricket::VideoMediaChannel::Error media_error_;
1201 1186
1202 // Used by test cases where 2 streams are run on the same channel. 1187 // Used by test cases where 2 streams are run on the same channel.
1203 cricket::FakeVideoRenderer renderer2_; 1188 cricket::FakeVideoRenderer renderer2_;
1204 }; 1189 };
1205 1190
1206 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT 1191 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT
OLDNEW
« no previous file with comments | « webrtc/media/base/videocapturer_unittest.cc ('k') | webrtc/media/base/videosinkinterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698