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

Side by Side Diff: webrtc/video/send_statistics_proxy_unittest.cc

Issue 2621573002: Remove FlexfecConfig and replace with specific struct in VideoSendStream. (Closed)
Patch Set: Rebase. Created 3 years, 11 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/video/send_statistics_proxy.cc ('k') | webrtc/video/video_quality_test.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 (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 config.rtp.ulpfec.red_payload_type = 17; 68 config.rtp.ulpfec.red_payload_type = 17;
69 return config; 69 return config;
70 } 70 }
71 71
72 VideoSendStream::Config GetTestConfigWithFlexFec() { 72 VideoSendStream::Config GetTestConfigWithFlexFec() {
73 VideoSendStream::Config config(nullptr); 73 VideoSendStream::Config config(nullptr);
74 config.rtp.ssrcs.push_back(kFirstSsrc); 74 config.rtp.ssrcs.push_back(kFirstSsrc);
75 config.rtp.ssrcs.push_back(kSecondSsrc); 75 config.rtp.ssrcs.push_back(kSecondSsrc);
76 config.rtp.rtx.ssrcs.push_back(kFirstRtxSsrc); 76 config.rtp.rtx.ssrcs.push_back(kFirstRtxSsrc);
77 config.rtp.rtx.ssrcs.push_back(kSecondRtxSsrc); 77 config.rtp.rtx.ssrcs.push_back(kSecondRtxSsrc);
78 config.rtp.flexfec.flexfec_payload_type = 50; 78 config.rtp.flexfec.payload_type = 50;
79 config.rtp.flexfec.flexfec_ssrc = kFlexFecSsrc; 79 config.rtp.flexfec.ssrc = kFlexFecSsrc;
80 return config; 80 return config;
81 } 81 }
82 82
83 VideoSendStream::StreamStats GetStreamStats(uint32_t ssrc) { 83 VideoSendStream::StreamStats GetStreamStats(uint32_t ssrc) {
84 VideoSendStream::Stats stats = statistics_proxy_->GetStats(); 84 VideoSendStream::Stats stats = statistics_proxy_->GetStats();
85 std::map<uint32_t, VideoSendStream::StreamStats>::iterator it = 85 std::map<uint32_t, VideoSendStream::StreamStats>::iterator it =
86 stats.substreams.find(ssrc); 86 stats.substreams.find(ssrc);
87 EXPECT_NE(it, stats.substreams.end()); 87 EXPECT_NE(it, stats.substreams.end());
88 return it->second; 88 return it->second;
89 } 89 }
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 1299
1300 EXPECT_EQ( 1300 EXPECT_EQ(
1301 1, metrics::NumSamples("WebRTC.Video.Screenshare.FecBitrateSentInKbps")); 1301 1, metrics::NumSamples("WebRTC.Video.Screenshare.FecBitrateSentInKbps"));
1302 EXPECT_EQ(1, metrics::NumEvents( 1302 EXPECT_EQ(1, metrics::NumEvents(
1303 "WebRTC.Video.Screenshare.FecBitrateSentInKbps", 1303 "WebRTC.Video.Screenshare.FecBitrateSentInKbps",
1304 static_cast<int>((counters.fec.TotalBytes() * 2 * 8) / 1304 static_cast<int>((counters.fec.TotalBytes() * 2 * 8) /
1305 metrics::kMinRunTimeInSeconds / 1000))); 1305 metrics::kMinRunTimeInSeconds / 1000)));
1306 } 1306 }
1307 1307
1308 } // namespace webrtc 1308 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/send_statistics_proxy.cc ('k') | webrtc/video/video_quality_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698