blob: 9b0def6f83a34d4f50c79198f2384e8006e584ba [file] [log] [blame]
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +00001/*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10#include <stdio.h>
11
12#include <deque>
13#include <map>
14
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000015#include "gflags/gflags.h"
pbos@webrtc.org69215d82013-07-10 15:02:02 +000016#include "testing/gtest/include/gtest/gtest.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000017
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000018#include "webrtc/call.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000019#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
20#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
21#include "webrtc/system_wrappers/interface/clock.h"
22#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
23#include "webrtc/system_wrappers/interface/event_wrapper.h"
24#include "webrtc/system_wrappers/interface/scoped_ptr.h"
pbos@webrtc.org94015242013-10-16 11:05:37 +000025#include "webrtc/system_wrappers/interface/sleep.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000026#include "webrtc/test/testsupport/fileutils.h"
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000027#include "webrtc/test/direct_transport.h"
28#include "webrtc/test/frame_generator_capturer.h"
pbos@webrtc.org16e03b72013-10-28 16:32:01 +000029#include "webrtc/test/statistics.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000030#include "webrtc/typedefs.h"
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000031
32DEFINE_int32(seconds, 10, "Seconds to run each clip.");
33
34namespace webrtc {
35
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +000036static const uint32_t kSendSsrc = 0x654321;
37
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000038struct FullStackTestParams {
39 const char* test_label;
40 struct {
41 const char* name;
pbos@webrtc.orgf3f13582013-07-09 14:04:46 +000042 size_t width, height;
43 int fps;
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000044 } clip;
pbos@webrtc.orgf3f13582013-07-09 14:04:46 +000045 unsigned int bitrate;
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000046 double avg_psnr_threshold;
47 double avg_ssim_threshold;
48};
49
pbos@webrtc.org841c8a42013-09-09 15:04:25 +000050FullStackTestParams paris_qcif = {
51 "net_delay_0_0_plr_0", {"paris_qcif", 176, 144, 30}, 300, 36.0, 0.96};
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000052
53// TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif.
pbos@webrtc.org841c8a42013-09-09 15:04:25 +000054FullStackTestParams foreman_cif = {
55 "foreman_cif_net_delay_0_0_plr_0",
56 {"foreman_cif", 352, 288, 30},
57 700,
58 0.0,
59 0.0};
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000060
61class FullStackTest : public ::testing::TestWithParam<FullStackTestParams> {
62 protected:
63 std::map<uint32_t, bool> reserved_ssrcs_;
64};
65
pbos@webrtc.org74fa4892013-08-23 09:19:30 +000066class VideoAnalyzer : public PacketReceiver,
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000067 public newapi::Transport,
pbos@webrtc.org74fa4892013-08-23 09:19:30 +000068 public VideoRenderer,
69 public VideoSendStreamInput {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000070 public:
pbos@webrtc.org74fa4892013-08-23 09:19:30 +000071 VideoAnalyzer(VideoSendStreamInput* input,
72 Transport* transport,
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000073 const char* test_label,
74 double avg_psnr_threshold,
75 double avg_ssim_threshold,
pbos@webrtc.org94015242013-10-16 11:05:37 +000076 int duration_frames)
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000077 : input_(input),
78 transport_(transport),
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000079 receiver_(NULL),
80 test_label_(test_label),
pbos@webrtc.org94015242013-10-16 11:05:37 +000081 dropped_frames_(0),
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000082 rtp_timestamp_delta_(0),
83 first_send_frame_(NULL),
84 last_render_time_(0),
85 avg_psnr_threshold_(avg_psnr_threshold),
86 avg_ssim_threshold_(avg_ssim_threshold),
87 frames_left_(duration_frames),
88 crit_(CriticalSectionWrapper::CreateCriticalSection()),
pbos@webrtc.org94015242013-10-16 11:05:37 +000089 comparison_lock_(CriticalSectionWrapper::CreateCriticalSection()),
90 comparison_thread_(ThreadWrapper::CreateThread(&FrameComparisonThread,
91 this)),
92 trigger_(EventWrapper::Create()) {
93 unsigned int id;
94 EXPECT_TRUE(comparison_thread_->Start(id));
95 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +000096
97 ~VideoAnalyzer() {
pbos@webrtc.org94015242013-10-16 11:05:37 +000098 EXPECT_TRUE(comparison_thread_->Stop());
99
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000100 while (!frames_.empty()) {
101 delete frames_.back();
102 frames_.pop_back();
103 }
104 while (!frame_pool_.empty()) {
105 delete frame_pool_.back();
106 frame_pool_.pop_back();
107 }
108 }
109
pbos@webrtc.org94015242013-10-16 11:05:37 +0000110 virtual void SetReceiver(PacketReceiver* receiver) { receiver_ = receiver; }
111
pbos@webrtc.org40523702013-08-05 12:49:22 +0000112 virtual bool DeliverPacket(const uint8_t* packet, size_t length) OVERRIDE {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000113 scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
114 RTPHeader header;
pbos@webrtc.org40523702013-08-05 12:49:22 +0000115 parser->Parse(packet, static_cast<int>(length), &header);
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000116 {
117 CriticalSectionScoped cs(crit_.get());
118 recv_times_[header.timestamp - rtp_timestamp_delta_] =
119 Clock::GetRealTimeClock()->CurrentNtpInMilliseconds();
120 }
121
122 return receiver_->DeliverPacket(packet, length);
123 }
124
pbos@webrtc.org724947b2013-12-11 16:26:16 +0000125 virtual void PutFrame(const I420VideoFrame& video_frame) OVERRIDE {
126 ADD_FAILURE() << "PutFrame() should not have been called in this test.";
127 }
128
129 virtual void SwapFrame(I420VideoFrame* video_frame) OVERRIDE {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000130 I420VideoFrame* copy = NULL;
131 {
132 CriticalSectionScoped cs(crit_.get());
133 if (frame_pool_.size() > 0) {
134 copy = frame_pool_.front();
135 frame_pool_.pop_front();
136 }
137 }
138 if (copy == NULL)
139 copy = new I420VideoFrame();
140
pbos@webrtc.org724947b2013-12-11 16:26:16 +0000141 copy->CopyFrame(*video_frame);
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000142 copy->set_timestamp(copy->render_time_ms() * 90);
143
144 {
145 CriticalSectionScoped cs(crit_.get());
146 if (first_send_frame_ == NULL && rtp_timestamp_delta_ == 0)
147 first_send_frame_ = copy;
148
149 frames_.push_back(copy);
150 }
151
pbos@webrtc.org724947b2013-12-11 16:26:16 +0000152 input_->SwapFrame(video_frame);
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000153 }
154
pbos@webrtc.org27326b62013-11-20 12:17:04 +0000155 virtual bool SendRtp(const uint8_t* packet, size_t length) OVERRIDE {
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000156 scoped_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
157 RTPHeader header;
158 parser->Parse(packet, static_cast<int>(length), &header);
159
160 {
161 CriticalSectionScoped cs(crit_.get());
162 if (rtp_timestamp_delta_ == 0) {
163 rtp_timestamp_delta_ =
164 header.timestamp - first_send_frame_->timestamp();
165 first_send_frame_ = NULL;
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000166 }
pbos@webrtc.org7fb9ce02013-08-05 09:29:50 +0000167 send_times_[header.timestamp - rtp_timestamp_delta_] =
168 Clock::GetRealTimeClock()->CurrentNtpInMilliseconds();
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000169 }
170
pbos@webrtc.org27326b62013-11-20 12:17:04 +0000171 return transport_->SendRtp(packet, length);
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000172 }
173
pbos@webrtc.org27326b62013-11-20 12:17:04 +0000174 virtual bool SendRtcp(const uint8_t* packet, size_t length) OVERRIDE {
175 return transport_->SendRtcp(packet, length);
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000176 }
177
178 virtual void RenderFrame(const I420VideoFrame& video_frame,
179 int time_to_render_ms) OVERRIDE {
pbos@webrtc.org94015242013-10-16 11:05:37 +0000180 int64_t render_time_ms =
181 Clock::GetRealTimeClock()->CurrentNtpInMilliseconds();
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000182 uint32_t send_timestamp = video_frame.timestamp() - rtp_timestamp_delta_;
183
184 {
185 CriticalSectionScoped cs(crit_.get());
186 while (frames_.front()->timestamp() < send_timestamp) {
pbos@webrtc.org94015242013-10-16 11:05:37 +0000187 AddFrameComparison(
188 frames_.front(), &last_rendered_frame_, true, render_time_ms);
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000189 frame_pool_.push_back(frames_.front());
190 frames_.pop_front();
191 }
192
193 I420VideoFrame* reference_frame = frames_.front();
194 frames_.pop_front();
195 assert(reference_frame != NULL);
pbos@webrtc.org94015242013-10-16 11:05:37 +0000196 EXPECT_EQ(reference_frame->timestamp(), send_timestamp);
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000197 assert(reference_frame->timestamp() == send_timestamp);
198
pbos@webrtc.org94015242013-10-16 11:05:37 +0000199 AddFrameComparison(reference_frame, &video_frame, false, render_time_ms);
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000200 frame_pool_.push_back(reference_frame);
pbos@webrtc.org94015242013-10-16 11:05:37 +0000201 }
202
203 last_rendered_frame_.CopyFrame(video_frame);
204 }
205
206 void Wait() { trigger_->Wait(120 * 1000); }
207
208 VideoSendStreamInput* input_;
209 Transport* transport_;
210 PacketReceiver* receiver_;
211
212 private:
213 struct FrameComparison {
214 FrameComparison(const I420VideoFrame* reference,
215 const I420VideoFrame* render,
216 bool dropped,
217 int64_t send_time_ms,
218 int64_t recv_time_ms,
219 int64_t render_time_ms)
220 : dropped(dropped),
221 send_time_ms(send_time_ms),
222 recv_time_ms(recv_time_ms),
223 render_time_ms(render_time_ms) {
224 this->reference.CopyFrame(*reference);
225 this->render.CopyFrame(*render);
226 }
227
228 FrameComparison(const FrameComparison& compare)
229 : dropped(compare.dropped),
230 send_time_ms(compare.send_time_ms),
231 recv_time_ms(compare.recv_time_ms),
232 render_time_ms(compare.render_time_ms) {
233 this->reference.CopyFrame(compare.reference);
234 this->render.CopyFrame(compare.render);
235 }
236
237 ~FrameComparison() {}
238
239 I420VideoFrame reference;
240 I420VideoFrame render;
241 bool dropped;
242 int64_t send_time_ms;
243 int64_t recv_time_ms;
244 int64_t render_time_ms;
245 };
246
247 void AddFrameComparison(const I420VideoFrame* reference,
248 const I420VideoFrame* render,
249 bool dropped,
250 int64_t render_time_ms) {
251 int64_t send_time_ms = send_times_[reference->timestamp()];
252 send_times_.erase(reference->timestamp());
253 int64_t recv_time_ms = recv_times_[reference->timestamp()];
254 recv_times_.erase(reference->timestamp());
255
256 CriticalSectionScoped crit(comparison_lock_.get());
257 comparisons_.push_back(FrameComparison(reference,
258 render,
259 dropped,
260 send_time_ms,
261 recv_time_ms,
262 render_time_ms));
263 }
264
265 static bool FrameComparisonThread(void* obj) {
266 return static_cast<VideoAnalyzer*>(obj)->CompareFrames();
267 }
268
269 bool CompareFrames() {
270 assert(frames_left_ > 0);
271
272 I420VideoFrame reference;
273 I420VideoFrame render;
274 bool dropped;
275 int64_t send_time_ms;
276 int64_t recv_time_ms;
277 int64_t render_time_ms;
278
279 SleepMs(10);
280
281 while (true) {
282 {
283 CriticalSectionScoped crit(comparison_lock_.get());
284 if (comparisons_.empty())
285 return true;
286 reference.SwapFrame(&comparisons_.front().reference);
287 render.SwapFrame(&comparisons_.front().render);
288 dropped = comparisons_.front().dropped;
289 send_time_ms = comparisons_.front().send_time_ms;
290 recv_time_ms = comparisons_.front().recv_time_ms;
291 render_time_ms = comparisons_.front().render_time_ms;
292 comparisons_.pop_front();
293 }
294
295 PerformFrameComparison(&reference,
296 &render,
297 dropped,
298 send_time_ms,
299 recv_time_ms,
300 render_time_ms);
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000301
302 if (--frames_left_ == 0) {
303 PrintResult("psnr", psnr_, " dB");
304 PrintResult("ssim", ssim_, "");
305 PrintResult("sender_time", sender_time_, " ms");
pbos@webrtc.org94015242013-10-16 11:05:37 +0000306 printf(
307 "RESULT dropped_frames: %s = %d\n", test_label_, dropped_frames_);
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000308 PrintResult("receiver_time", receiver_time_, " ms");
309 PrintResult("total_delay_incl_network", end_to_end_, " ms");
310 PrintResult("time_between_rendered_frames", rendered_delta_, " ms");
311 EXPECT_GT(psnr_.Mean(), avg_psnr_threshold_);
312 EXPECT_GT(ssim_.Mean(), avg_ssim_threshold_);
313 trigger_->Set();
pbos@webrtc.org94015242013-10-16 11:05:37 +0000314
315 return false;
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000316 }
317 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000318 }
319
pbos@webrtc.org94015242013-10-16 11:05:37 +0000320 void PerformFrameComparison(const I420VideoFrame* reference,
321 const I420VideoFrame* render,
322 bool dropped,
323 int64_t send_time_ms,
324 int64_t recv_time_ms,
325 int64_t render_time_ms) {
326 psnr_.AddSample(I420PSNR(reference, render));
327 ssim_.AddSample(I420SSIM(reference, render));
328 if (dropped) {
329 ++dropped_frames_;
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000330 return;
pbos@webrtc.org94015242013-10-16 11:05:37 +0000331 }
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000332 if (last_render_time_ != 0)
pbos@webrtc.org94015242013-10-16 11:05:37 +0000333 rendered_delta_.AddSample(render_time_ms - last_render_time_);
334 last_render_time_ = render_time_ms;
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000335
pbos@webrtc.org94015242013-10-16 11:05:37 +0000336 int64_t input_time_ms = reference->render_time_ms();
337 sender_time_.AddSample(send_time_ms - input_time_ms);
338 receiver_time_.AddSample(render_time_ms - recv_time_ms);
339 end_to_end_.AddSample(render_time_ms - input_time_ms);
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000340 }
341
342 void PrintResult(const char* result_type,
343 test::Statistics stats,
344 const char* unit) {
345 printf("RESULT %s: %s = {%f, %f}%s\n",
346 result_type,
347 test_label_,
348 stats.Mean(),
349 stats.StandardDeviation(),
350 unit);
351 }
352
353 const char* test_label_;
354 test::Statistics sender_time_;
355 test::Statistics receiver_time_;
356 test::Statistics psnr_;
357 test::Statistics ssim_;
358 test::Statistics end_to_end_;
359 test::Statistics rendered_delta_;
360
pbos@webrtc.org94015242013-10-16 11:05:37 +0000361 int dropped_frames_;
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000362 std::deque<I420VideoFrame*> frames_;
363 std::deque<I420VideoFrame*> frame_pool_;
364 I420VideoFrame last_rendered_frame_;
365 std::map<uint32_t, int64_t> send_times_;
366 std::map<uint32_t, int64_t> recv_times_;
367 uint32_t rtp_timestamp_delta_;
368 I420VideoFrame* first_send_frame_;
369 int64_t last_render_time_;
370 double avg_psnr_threshold_;
371 double avg_ssim_threshold_;
pbos@webrtc.org94015242013-10-16 11:05:37 +0000372 int frames_left_;
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000373 scoped_ptr<CriticalSectionWrapper> crit_;
pbos@webrtc.org94015242013-10-16 11:05:37 +0000374 scoped_ptr<CriticalSectionWrapper> comparison_lock_;
375 scoped_ptr<ThreadWrapper> comparison_thread_;
376 std::deque<FrameComparison> comparisons_;
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000377 scoped_ptr<EventWrapper> trigger_;
378};
379
pbos@webrtc.org94015242013-10-16 11:05:37 +0000380TEST_P(FullStackTest, NoPacketLoss) {
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +0000381 static const uint32_t kReceiverLocalSsrc = 0x123456;
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000382 FullStackTestParams params = GetParam();
383
pbos@webrtc.org96684672013-08-12 12:59:04 +0000384 test::DirectTransport transport;
pbos@webrtc.org94015242013-10-16 11:05:37 +0000385 VideoAnalyzer analyzer(NULL,
386 &transport,
387 params.test_label,
388 params.avg_psnr_threshold,
389 params.avg_ssim_threshold,
390 FLAGS_seconds * params.clip.fps);
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000391
pbos@webrtc.org841c8a42013-09-09 15:04:25 +0000392 Call::Config call_config(&analyzer);
mflodman@webrtc.org6879c8a2013-07-23 11:35:00 +0000393
pbos@webrtc.org841c8a42013-09-09 15:04:25 +0000394 scoped_ptr<Call> call(Call::Create(call_config));
pbos@webrtc.org94015242013-10-16 11:05:37 +0000395 analyzer.SetReceiver(call->Receiver());
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000396 transport.SetReceiver(&analyzer);
397
pbos@webrtc.org74fa4892013-08-23 09:19:30 +0000398 VideoSendStream::Config send_config = call->GetDefaultSendConfig();
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +0000399 send_config.rtp.ssrcs.push_back(kSendSsrc);
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000400
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000401 // TODO(pbos): static_cast shouldn't be required after mflodman refactors the
402 // VideoCodec struct.
403 send_config.codec.width = static_cast<uint16_t>(params.clip.width);
404 send_config.codec.height = static_cast<uint16_t>(params.clip.height);
405 send_config.codec.minBitrate = params.bitrate;
406 send_config.codec.startBitrate = params.bitrate;
407 send_config.codec.maxBitrate = params.bitrate;
408
pbos@webrtc.org5a636552013-11-20 10:40:25 +0000409 VideoSendStream* send_stream = call->CreateVideoSendStream(send_config);
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000410 analyzer.input_ = send_stream->Input();
411
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000412 scoped_ptr<test::FrameGeneratorCapturer> file_capturer(
andresp@webrtc.orgab654952013-09-19 12:14:03 +0000413 test::FrameGeneratorCapturer::CreateFromYuvFile(
pbos@webrtc.org4c966012013-08-21 12:07:37 +0000414 &analyzer,
andresp@webrtc.orgab654952013-09-19 12:14:03 +0000415 test::ResourcePath(params.clip.name, "yuv").c_str(),
416 params.clip.width,
417 params.clip.height,
418 params.clip.fps,
419 Clock::GetRealTimeClock()));
pbos@webrtc.org94015242013-10-16 11:05:37 +0000420 ASSERT_TRUE(file_capturer.get() != NULL)
421 << "Could not create capturer for " << params.clip.name
422 << ".yuv. Is this resource file present?";
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000423
pbos@webrtc.org841c8a42013-09-09 15:04:25 +0000424 VideoReceiveStream::Config receive_config = call->GetDefaultReceiveConfig();
pbos@webrtc.orgb613b5a2013-12-03 10:13:04 +0000425 receive_config.rtp.remote_ssrc = send_config.rtp.ssrcs[0];
426 receive_config.rtp.local_ssrc = kReceiverLocalSsrc;
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000427 receive_config.renderer = &analyzer;
428
pbos@webrtc.org74fa4892013-08-23 09:19:30 +0000429 VideoReceiveStream* receive_stream =
pbos@webrtc.org5a636552013-11-20 10:40:25 +0000430 call->CreateVideoReceiveStream(receive_config);
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000431
pbos@webrtc.org53c85732013-11-20 11:36:47 +0000432 receive_stream->StartReceiving();
433 send_stream->StartSending();
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000434
435 file_capturer->Start();
436
437 analyzer.Wait();
438
439 file_capturer->Stop();
pbos@webrtc.org53c85732013-11-20 11:36:47 +0000440 send_stream->StopSending();
441 receive_stream->StopReceiving();
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000442
pbos@webrtc.org2c46f8d2013-11-21 13:49:43 +0000443 call->DestroyVideoReceiveStream(receive_stream);
444 call->DestroyVideoSendStream(send_stream);
pbos@webrtc.org96684672013-08-12 12:59:04 +0000445
446 transport.StopSending();
pbos@webrtc.orgaf8d5af2013-07-09 08:02:33 +0000447}
448
449INSTANTIATE_TEST_CASE_P(FullStack,
450 FullStackTest,
451 ::testing::Values(paris_qcif, foreman_cif));
452
453} // namespace webrtc