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

Side by Side Diff: webrtc/test/rtp_file_reader_unittest.cc

Issue 1539423003: [rtp_rtcp] Lint errors cleaned from rtp_utility (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years 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/test/rtp_file_reader.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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 78 }
79 return c; 79 return c;
80 } 80 }
81 81
82 PacketsPerSsrc CountRtpPacketsPerSsrc() { 82 PacketsPerSsrc CountRtpPacketsPerSsrc() {
83 PacketsPerSsrc pps; 83 PacketsPerSsrc pps;
84 test::RtpPacket packet; 84 test::RtpPacket packet;
85 while (rtp_packet_source_->NextPacket(&packet)) { 85 while (rtp_packet_source_->NextPacket(&packet)) {
86 RtpUtility::RtpHeaderParser rtp_header_parser(packet.data, packet.length); 86 RtpUtility::RtpHeaderParser rtp_header_parser(packet.data, packet.length);
87 webrtc::RTPHeader header; 87 webrtc::RTPHeader header;
88 if (!rtp_header_parser.RTCP() && rtp_header_parser.Parse(header, NULL)) { 88 if (!rtp_header_parser.RTCP() &&
89 rtp_header_parser.Parse(&header, nullptr)) {
89 pps[header.ssrc]++; 90 pps[header.ssrc]++;
90 } 91 }
91 } 92 }
92 return pps; 93 return pps;
93 } 94 }
94 95
95 private: 96 private:
96 rtc::scoped_ptr<test::RtpFileReader> rtp_packet_source_; 97 rtc::scoped_ptr<test::RtpFileReader> rtp_packet_source_;
97 }; 98 };
98 99
(...skipping 17 matching lines...) Expand all
116 117
117 TEST_F(TestPcapFileReader, TestThreeSsrc) { 118 TEST_F(TestPcapFileReader, TestThreeSsrc) {
118 Init("ssrcs-3"); 119 Init("ssrcs-3");
119 PacketsPerSsrc pps = CountRtpPacketsPerSsrc(); 120 PacketsPerSsrc pps = CountRtpPacketsPerSsrc();
120 EXPECT_EQ(3UL, pps.size()); 121 EXPECT_EQ(3UL, pps.size());
121 EXPECT_EQ(162, pps[0x938c5eaa]); 122 EXPECT_EQ(162, pps[0x938c5eaa]);
122 EXPECT_EQ(113, pps[0x59fe6ef0]); 123 EXPECT_EQ(113, pps[0x59fe6ef0]);
123 EXPECT_EQ(61, pps[0xed2bd2ac]); 124 EXPECT_EQ(61, pps[0xed2bd2ac]);
124 } 125 }
125 } // namespace webrtc 126 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/test/rtp_file_reader.cc ('k') | webrtc/video/video_quality_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698