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

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

Issue 109413004: Cast:Adding cast_transport_config and cleaning up (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updating chrome/renderer Created 6 years, 11 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 {
11 11
12 TestRtcpPacketBuilder::TestRtcpPacketBuilder() 12 TestRtcpPacketBuilder::TestRtcpPacketBuilder()
13 : ptr_of_length_(NULL), 13 : ptr_of_length_(NULL),
14 big_endian_writer_(buffer_, kIpPacketSize) { 14 big_endian_writer_(buffer_, kMaxIpPacketSize) {
15 } 15 }
16 16
17 void TestRtcpPacketBuilder::AddSr(uint32 sender_ssrc, 17 void TestRtcpPacketBuilder::AddSr(uint32 sender_ssrc,
18 int number_of_report_blocks) { 18 int number_of_report_blocks) {
19 AddRtcpHeader(200, number_of_report_blocks); 19 AddRtcpHeader(200, number_of_report_blocks);
20 big_endian_writer_.WriteU32(sender_ssrc); 20 big_endian_writer_.WriteU32(sender_ssrc);
21 big_endian_writer_.WriteU32(kNtpHigh); // NTP timestamp. 21 big_endian_writer_.WriteU32(kNtpHigh); // NTP timestamp.
22 big_endian_writer_.WriteU32(kNtpLow); 22 big_endian_writer_.WriteU32(kNtpLow);
23 big_endian_writer_.WriteU32(kRtpTimestamp); 23 big_endian_writer_.WriteU32(kRtpTimestamp);
24 big_endian_writer_.WriteU32(kSendPacketCount); 24 big_endian_writer_.WriteU32(kSendPacketCount);
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 big_endian_writer_.WriteU8(0x80 | (format_or_count & 0x1F)); 278 big_endian_writer_.WriteU8(0x80 | (format_or_count & 0x1F));
279 big_endian_writer_.WriteU8(payload); 279 big_endian_writer_.WriteU8(payload);
280 ptr_of_length_ = big_endian_writer_.ptr(); 280 ptr_of_length_ = big_endian_writer_.ptr();
281 281
282 // Initialize length to "clearly illegal". 282 // Initialize length to "clearly illegal".
283 big_endian_writer_.WriteU16(0xDEAD); 283 big_endian_writer_.WriteU16(0xDEAD);
284 } 284 }
285 285
286 } // namespace cast 286 } // namespace cast
287 } // namespace media 287 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698