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

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

Issue 1670153003: Introduce struct MediaConfig, with construction-time settings. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed test nit; use reference. 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/mediaengine.h ('k') | webrtc/media/engine/nullwebrtcvideoengine.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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 virtual cricket::VideoCodec DefaultCodec() = 0; 119 virtual cricket::VideoCodec DefaultCodec() = 0;
120 120
121 virtual cricket::StreamParams DefaultSendStreamParams() { 121 virtual cricket::StreamParams DefaultSendStreamParams() {
122 return cricket::StreamParams::CreateLegacy(kSsrc); 122 return cricket::StreamParams::CreateLegacy(kSsrc);
123 } 123 }
124 124
125 virtual void SetUp() { 125 virtual void SetUp() {
126 cricket::Device device("test", "device"); 126 cricket::Device device("test", "device");
127 engine_.Init(); 127 engine_.Init();
128 channel_.reset( 128 channel_.reset(engine_.CreateChannel(call_.get(), cricket::MediaConfig(),
129 engine_.CreateChannel(call_.get(), cricket::VideoOptions())); 129 cricket::VideoOptions()));
130 EXPECT_TRUE(channel_.get() != NULL); 130 EXPECT_TRUE(channel_.get() != NULL);
131 network_interface_.SetDestination(channel_.get()); 131 network_interface_.SetDestination(channel_.get());
132 channel_->SetInterface(&network_interface_); 132 channel_->SetInterface(&network_interface_);
133 media_error_ = cricket::VideoMediaChannel::ERROR_NONE; 133 media_error_ = cricket::VideoMediaChannel::ERROR_NONE;
134 cricket::VideoRecvParameters parameters; 134 cricket::VideoRecvParameters parameters;
135 parameters.codecs = engine_.codecs(); 135 parameters.codecs = engine_.codecs();
136 channel_->SetRecvParameters(parameters); 136 channel_->SetRecvParameters(parameters);
137 EXPECT_TRUE(channel_->AddSendStream(DefaultSendStreamParams())); 137 EXPECT_TRUE(channel_->AddSendStream(DefaultSendStreamParams()));
138 video_capturer_.reset(CreateFakeVideoCapturer()); 138 video_capturer_.reset(CreateFakeVideoCapturer());
139 cricket::VideoFormat format(640, 480, 139 cricket::VideoFormat format(640, 480,
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 rtc::scoped_ptr<C> channel_; 1197 rtc::scoped_ptr<C> channel_;
1198 cricket::FakeNetworkInterface network_interface_; 1198 cricket::FakeNetworkInterface network_interface_;
1199 cricket::FakeVideoRenderer renderer_; 1199 cricket::FakeVideoRenderer renderer_;
1200 cricket::VideoMediaChannel::Error media_error_; 1200 cricket::VideoMediaChannel::Error media_error_;
1201 1201
1202 // Used by test cases where 2 streams are run on the same channel. 1202 // Used by test cases where 2 streams are run on the same channel.
1203 cricket::FakeVideoRenderer renderer2_; 1203 cricket::FakeVideoRenderer renderer2_;
1204 }; 1204 };
1205 1205
1206 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT 1206 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT
OLDNEW
« no previous file with comments | « webrtc/media/base/mediaengine.h ('k') | webrtc/media/engine/nullwebrtcvideoengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698