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

Side by Side Diff: media/cast/rtcp/test_rtcp_packet_builder.cc

Issue 25544003: Fix code style and gyp files in cast to build cast_unittest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed gyp files Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/cast/rtcp/test_rtcp_packet_builder.h" 5 #include "media/cast/rtcp/test_rtcp_packet_builder.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace media { 9 namespace media {
10 namespace cast { 10 namespace cast {
(...skipping 27 matching lines...) Expand all
38 big_endian_writer_.WriteU32(kJitter); 38 big_endian_writer_.WriteU32(kJitter);
39 big_endian_writer_.WriteU32(kLastSr); 39 big_endian_writer_.WriteU32(kLastSr);
40 big_endian_writer_.WriteU32(kDelayLastSr); 40 big_endian_writer_.WriteU32(kDelayLastSr);
41 } 41 }
42 42
43 void TestRtcpPacketBuilder::AddSdesCname(uint32 sender_ssrc, 43 void TestRtcpPacketBuilder::AddSdesCname(uint32 sender_ssrc,
44 const std::string& c_name) { 44 const std::string& c_name) {
45 AddRtcpHeader(202, 1); 45 AddRtcpHeader(202, 1);
46 big_endian_writer_.WriteU32(sender_ssrc); 46 big_endian_writer_.WriteU32(sender_ssrc);
47 big_endian_writer_.WriteU8(1); // c_name. 47 big_endian_writer_.WriteU8(1); // c_name.
48 big_endian_writer_.WriteU8(c_name.size()); // c_name length in bytes. 48 big_endian_writer_.WriteU8(
49 static_cast<uint8>(c_name.size())); // c_name length in bytes.
49 for (size_t i = 0; i < c_name.size(); ++i) { 50 for (size_t i = 0; i < c_name.size(); ++i) {
50 big_endian_writer_.WriteU8(c_name.c_str()[i]); 51 big_endian_writer_.WriteU8(c_name.c_str()[i]);
51 } 52 }
52 int padding; 53 int padding;
53 switch (c_name.size() % 4) { 54 switch (c_name.size() % 4) {
54 case 0: 55 case 0:
55 padding = 2; 56 padding = 2;
56 break; 57 break;
57 case 1: 58 case 1:
58 padding = 1; 59 padding = 1;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 big_endian_writer_.WriteU8(0x80 | (format_or_count & 0x1F)); 222 big_endian_writer_.WriteU8(0x80 | (format_or_count & 0x1F));
222 big_endian_writer_.WriteU8(payload); 223 big_endian_writer_.WriteU8(payload);
223 ptr_of_length_ = big_endian_writer_.ptr(); 224 ptr_of_length_ = big_endian_writer_.ptr();
224 225
225 // Initialize length to "clearly illegal". 226 // Initialize length to "clearly illegal".
226 big_endian_writer_.WriteU16(0xDEAD); 227 big_endian_writer_.WriteU16(0xDEAD);
227 } 228 }
228 229
229 } // namespace cast 230 } // namespace cast
230 } // namespace media 231 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/rtcp/test_rtcp_packet_builder.h ('k') | media/cast/rtp_common/mock_rtp_payload_feedback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698