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

Side by Side Diff: talk/media/base/testutils.cc

Issue 1405023016: Convert usage of ARRAY_SIZE to arraysize. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: static_cast<int> Created 5 years, 1 month 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 | « talk/media/base/testutils.h ('k') | talk/media/base/videocommon.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 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 }; 125 };
126 const RawRtcpPacket RtpTestUtility::kTestRawRtcpPackets[] = { 126 const RawRtcpPacket RtpTestUtility::kTestRawRtcpPackets[] = {
127 // The Version is 2, the Length is 2, and the payload has 8 bytes. 127 // The Version is 2, the Length is 2, and the payload has 8 bytes.
128 {0x80, 0, 2, "RTCP0000"}, 128 {0x80, 0, 2, "RTCP0000"},
129 {0x80, 0, 2, "RTCP0001"}, 129 {0x80, 0, 2, "RTCP0001"},
130 {0x80, 0, 2, "RTCP0002"}, 130 {0x80, 0, 2, "RTCP0002"},
131 {0x80, 0, 2, "RTCP0003"}, 131 {0x80, 0, 2, "RTCP0003"},
132 }; 132 };
133 133
134 size_t RtpTestUtility::GetTestPacketCount() { 134 size_t RtpTestUtility::GetTestPacketCount() {
135 return std::min(ARRAY_SIZE(kTestRawRtpPackets), 135 return std::min(arraysize(kTestRawRtpPackets),
136 ARRAY_SIZE(kTestRawRtcpPackets)); 136 arraysize(kTestRawRtcpPackets));
137 } 137 }
138 138
139 bool RtpTestUtility::WriteTestPackets(size_t count, 139 bool RtpTestUtility::WriteTestPackets(size_t count,
140 bool rtcp, 140 bool rtcp,
141 uint32_t rtp_ssrc, 141 uint32_t rtp_ssrc,
142 RtpDumpWriter* writer) { 142 RtpDumpWriter* writer) {
143 if (!writer || count > GetTestPacketCount()) return false; 143 if (!writer || count > GetTestPacketCount()) return false;
144 144
145 bool result = true; 145 bool result = true;
146 uint32_t elapsed_time_ms = 0; 146 uint32_t elapsed_time_ms = 0;
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 std::vector<uint32_t> fid_ssrcs; 376 std::vector<uint32_t> fid_ssrcs;
377 fid_ssrcs.push_back(ssrcs[i]); 377 fid_ssrcs.push_back(ssrcs[i]);
378 fid_ssrcs.push_back(rtx_ssrcs[i]); 378 fid_ssrcs.push_back(rtx_ssrcs[i]);
379 cricket::SsrcGroup fid_group(cricket::kFidSsrcGroupSemantics, fid_ssrcs); 379 cricket::SsrcGroup fid_group(cricket::kFidSsrcGroupSemantics, fid_ssrcs);
380 sp.ssrc_groups.push_back(fid_group); 380 sp.ssrc_groups.push_back(fid_group);
381 } 381 }
382 return sp; 382 return sp;
383 } 383 }
384 384
385 } // namespace cricket 385 } // namespace cricket
OLDNEW
« no previous file with comments | « talk/media/base/testutils.h ('k') | talk/media/base/videocommon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698