OLD | NEW |
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/rtcp_sender.h" | 5 #include "media/cast/rtcp/rtcp_sender.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "media/cast/cast_environment.h" | 11 #include "media/cast/cast_environment.h" |
12 #include "media/cast/net/pacing/paced_sender.h" | |
13 #include "media/cast/rtcp/rtcp_utility.h" | 12 #include "media/cast/rtcp/rtcp_utility.h" |
| 13 #include "media/cast/transport/pacing/paced_sender.h" |
14 #include "net/base/big_endian.h" | 14 #include "net/base/big_endian.h" |
15 | 15 |
16 static const size_t kRtcpCastLogHeaderSize = 12; | 16 static const size_t kRtcpCastLogHeaderSize = 12; |
17 static const size_t kRtcpSenderFrameLogSize = 4; | 17 static const size_t kRtcpSenderFrameLogSize = 4; |
18 static const size_t kRtcpReceiverFrameLogSize = 8; | 18 static const size_t kRtcpReceiverFrameLogSize = 8; |
19 static const size_t kRtcpReceiverEventLogSize = 4; | 19 static const size_t kRtcpReceiverEventLogSize = 4; |
20 | 20 |
21 namespace { | 21 namespace { |
22 uint16 MergeEventTypeAndTimestampForWireFormat( | 22 uint16 MergeEventTypeAndTimestampForWireFormat( |
23 const media::cast::CastLoggingEvent& event, | 23 const media::cast::CastLoggingEvent& event, |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 VLOG(1) << "total messages to send " << *total_number_of_messages_to_send; | 117 VLOG(1) << "total messages to send " << *total_number_of_messages_to_send; |
118 VLOG(1) << "rtcp log size " << *rtcp_log_size; | 118 VLOG(1) << "rtcp log size " << *rtcp_log_size; |
119 return true; | 119 return true; |
120 } | 120 } |
121 } // namespace | 121 } // namespace |
122 | 122 |
123 namespace media { | 123 namespace media { |
124 namespace cast { | 124 namespace cast { |
125 | 125 |
126 RtcpSender::RtcpSender(scoped_refptr<CastEnvironment> cast_environment, | 126 RtcpSender::RtcpSender(scoped_refptr<CastEnvironment> cast_environment, |
127 PacedPacketSender* outgoing_transport, | 127 transport::PacedPacketSender* outgoing_transport, |
128 uint32 sending_ssrc, | 128 uint32 sending_ssrc, |
129 const std::string& c_name) | 129 const std::string& c_name) |
130 : ssrc_(sending_ssrc), | 130 : ssrc_(sending_ssrc), |
131 c_name_(c_name), | 131 c_name_(c_name), |
132 transport_(outgoing_transport), | 132 transport_(outgoing_transport), |
133 cast_environment_(cast_environment) { | 133 cast_environment_(cast_environment) { |
134 DCHECK_LT(c_name_.length(), kRtcpCnameSize) << "Invalid config"; | 134 DCHECK_LT(c_name_.length(), kRtcpCnameSize) << "Invalid config"; |
135 } | 135 } |
136 | 136 |
137 RtcpSender::~RtcpSender() {} | 137 RtcpSender::~RtcpSender() {} |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 if (frame_log_messages.event_log_messages_.empty()) { | 791 if (frame_log_messages.event_log_messages_.empty()) { |
792 // We sent all messages on this frame; pop the frame header. | 792 // We sent all messages on this frame; pop the frame header. |
793 receiver_log_message->pop_front(); | 793 receiver_log_message->pop_front(); |
794 } | 794 } |
795 } | 795 } |
796 DCHECK_EQ(total_number_of_messages_to_send, 0); | 796 DCHECK_EQ(total_number_of_messages_to_send, 0); |
797 } | 797 } |
798 | 798 |
799 } // namespace cast | 799 } // namespace cast |
800 } // namespace media | 800 } // namespace media |
OLD | NEW |