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

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

Issue 25546003: Revert 226264 "Be able to build cast_unittest and related target..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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( 48 big_endian_writer_.WriteU8(c_name.size()); // c_name length in bytes.
49 static_cast<uint8>(c_name.size())); // c_name length in bytes.
50 for (size_t i = 0; i < c_name.size(); ++i) { 49 for (size_t i = 0; i < c_name.size(); ++i) {
51 big_endian_writer_.WriteU8(c_name.c_str()[i]); 50 big_endian_writer_.WriteU8(c_name.c_str()[i]);
52 } 51 }
53 int padding; 52 int padding;
54 switch (c_name.size() % 4) { 53 switch (c_name.size() % 4) {
55 case 0: 54 case 0:
56 padding = 2; 55 padding = 2;
57 break; 56 break;
58 case 1: 57 case 1:
59 padding = 1; 58 padding = 1;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 big_endian_writer_.WriteU8(0x80 | (format_or_count & 0x1F)); 221 big_endian_writer_.WriteU8(0x80 | (format_or_count & 0x1F));
223 big_endian_writer_.WriteU8(payload); 222 big_endian_writer_.WriteU8(payload);
224 ptr_of_length_ = big_endian_writer_.ptr(); 223 ptr_of_length_ = big_endian_writer_.ptr();
225 224
226 // Initialize length to "clearly illegal". 225 // Initialize length to "clearly illegal".
227 big_endian_writer_.WriteU16(0xDEAD); 226 big_endian_writer_.WriteU16(0xDEAD);
228 } 227 }
229 228
230 } // namespace cast 229 } // namespace cast
231 } // namespace media 230 } // namespace media
OLDNEW
« no previous file with comments | « trunk/src/media/cast/rtcp/test_rtcp_packet_builder.h ('k') | trunk/src/media/cast/rtp_common/mock_rtp_payload_feedback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698