OLD | NEW |
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 for (const auto& ssrc : config_.rtp.rtx.ssrcs) | 50 for (const auto& ssrc : config_.rtp.rtx.ssrcs) |
51 expected_.substreams[ssrc].is_rtx = true; | 51 expected_.substreams[ssrc].is_rtx = true; |
52 } | 52 } |
53 | 53 |
54 VideoSendStream::Config GetTestConfig() { | 54 VideoSendStream::Config GetTestConfig() { |
55 VideoSendStream::Config config(nullptr); | 55 VideoSendStream::Config config(nullptr); |
56 config.rtp.ssrcs.push_back(kFirstSsrc); | 56 config.rtp.ssrcs.push_back(kFirstSsrc); |
57 config.rtp.ssrcs.push_back(kSecondSsrc); | 57 config.rtp.ssrcs.push_back(kSecondSsrc); |
58 config.rtp.rtx.ssrcs.push_back(kFirstRtxSsrc); | 58 config.rtp.rtx.ssrcs.push_back(kFirstRtxSsrc); |
59 config.rtp.rtx.ssrcs.push_back(kSecondRtxSsrc); | 59 config.rtp.rtx.ssrcs.push_back(kSecondRtxSsrc); |
60 config.rtp.fec.red_payload_type = 17; | 60 config.rtp.ulpfec.red_payload_type = 17; |
61 return config; | 61 return config; |
62 } | 62 } |
63 | 63 |
64 void ExpectEqual(VideoSendStream::Stats one, VideoSendStream::Stats other) { | 64 void ExpectEqual(VideoSendStream::Stats one, VideoSendStream::Stats other) { |
65 EXPECT_EQ(one.input_frame_rate, other.input_frame_rate); | 65 EXPECT_EQ(one.input_frame_rate, other.input_frame_rate); |
66 EXPECT_EQ(one.encode_frame_rate, other.encode_frame_rate); | 66 EXPECT_EQ(one.encode_frame_rate, other.encode_frame_rate); |
67 EXPECT_EQ(one.media_bitrate_bps, other.media_bitrate_bps); | 67 EXPECT_EQ(one.media_bitrate_bps, other.media_bitrate_bps); |
68 EXPECT_EQ(one.preferred_media_bitrate_bps, | 68 EXPECT_EQ(one.preferred_media_bitrate_bps, |
69 other.preferred_media_bitrate_bps); | 69 other.preferred_media_bitrate_bps); |
70 EXPECT_EQ(one.suspended, other.suspended); | 70 EXPECT_EQ(one.suspended, other.suspended); |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 | 757 |
758 EXPECT_EQ( | 758 EXPECT_EQ( |
759 1, metrics::NumSamples("WebRTC.Video.Screenshare.FecBitrateSentInKbps")); | 759 1, metrics::NumSamples("WebRTC.Video.Screenshare.FecBitrateSentInKbps")); |
760 EXPECT_EQ(1, metrics::NumEvents( | 760 EXPECT_EQ(1, metrics::NumEvents( |
761 "WebRTC.Video.Screenshare.FecBitrateSentInKbps", | 761 "WebRTC.Video.Screenshare.FecBitrateSentInKbps", |
762 static_cast<int>((rtx_counters.fec.TotalBytes() * 2 * 8) / | 762 static_cast<int>((rtx_counters.fec.TotalBytes() * 2 * 8) / |
763 metrics::kMinRunTimeInSeconds / 1000))); | 763 metrics::kMinRunTimeInSeconds / 1000))); |
764 } | 764 } |
765 | 765 |
766 } // namespace webrtc | 766 } // namespace webrtc |
OLD | NEW |