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

Side by Side Diff: media/cast/transport/rtcp/rtcp_builder.cc

Issue 100823015: Cast: move net->transport (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updating transport callback 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/net/rtcp/rtcp_builder.h" 5 #include "media/cast/transport/rtcp/rtcp_builder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "media/cast/net/cast_net_defines.h"
13 #include "media/cast/net/pacing/paced_sender.h"
14 #include "media/cast/rtcp/rtcp_utility.h" 12 #include "media/cast/rtcp/rtcp_utility.h"
13 #include "media/cast/transport/cast_transport_defines.h"
14 #include "media/cast/transport/pacing/paced_sender.h"
15 #include "net/base/big_endian.h" 15 #include "net/base/big_endian.h"
16 16
17 static const size_t kRtcpCastLogHeaderSize = 12; 17 static const size_t kRtcpCastLogHeaderSize = 12;
18 static const size_t kRtcpSenderFrameLogSize = 4; 18 static const size_t kRtcpSenderFrameLogSize = 4;
19 static const size_t kRtcpReceiverFrameLogSize = 8;
20 static const size_t kRtcpReceiverEventLogSize = 4;
21 19
22 namespace media { 20 namespace media {
23 namespace cast { 21 namespace cast {
22 namespace transport {
24 23
25 RtcpBuilder::RtcpBuilder(PacedPacketSender* outgoing_transport, 24 RtcpBuilder::RtcpBuilder(PacedPacketSender* outgoing_transport,
26 uint32 sending_ssrc, 25 uint32 sending_ssrc,
27 const std::string& c_name) 26 const std::string& c_name)
28 : ssrc_(sending_ssrc), 27 : ssrc_(sending_ssrc),
29 c_name_(c_name), 28 c_name_(c_name),
30 transport_(outgoing_transport) { 29 transport_(outgoing_transport) {
31 DCHECK_LT(c_name_.length(), kRtcpCnameSize) << "Invalid config"; 30 DCHECK_LT(c_name_.length(), kRtcpCnameSize) << "Invalid config";
32 } 31 }
33 32
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 const RtcpSenderFrameLogMessage& message = sender_log_message->front(); 253 const RtcpSenderFrameLogMessage& message = sender_log_message->front();
255 big_endian_writer.WriteU8(static_cast<uint8>(message.frame_status)); 254 big_endian_writer.WriteU8(static_cast<uint8>(message.frame_status));
256 // We send the 24 east significant bits of the RTP timestamp. 255 // We send the 24 east significant bits of the RTP timestamp.
257 big_endian_writer.WriteU8(static_cast<uint8>(message.rtp_timestamp >> 16)); 256 big_endian_writer.WriteU8(static_cast<uint8>(message.rtp_timestamp >> 16));
258 big_endian_writer.WriteU8(static_cast<uint8>(message.rtp_timestamp >> 8)); 257 big_endian_writer.WriteU8(static_cast<uint8>(message.rtp_timestamp >> 8));
259 big_endian_writer.WriteU8(static_cast<uint8>(message.rtp_timestamp)); 258 big_endian_writer.WriteU8(static_cast<uint8>(message.rtp_timestamp));
260 sender_log_message->pop_front(); 259 sender_log_message->pop_front();
261 } 260 }
262 } 261 }
263 262
263 } // namespace transport
264 } // namespace cast 264 } // namespace cast
265 } // namespace media 265 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/transport/rtcp/rtcp_builder.h ('k') | media/cast/transport/rtcp/rtcp_builder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698