| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 BuildCast(cast_message, target_delay_ms, &packet->data); | 230 BuildCast(cast_message, target_delay_ms, &packet->data); |
| 231 } | 231 } |
| 232 if (packet_type_flags & transport::kRtcpReceiverLog) { | 232 if (packet_type_flags & transport::kRtcpReceiverLog) { |
| 233 DCHECK(rtcp_events) << "Invalid argument"; | 233 DCHECK(rtcp_events) << "Invalid argument"; |
| 234 BuildReceiverLog(*rtcp_events, &packet->data); | 234 BuildReceiverLog(*rtcp_events, &packet->data); |
| 235 } | 235 } |
| 236 | 236 |
| 237 if (packet->data.empty()) | 237 if (packet->data.empty()) |
| 238 return; // Sanity don't send empty packets. | 238 return; // Sanity don't send empty packets. |
| 239 | 239 |
| 240 transport_->SendRtcpPacket(packet); | 240 transport_->SendRtcpPacket(ssrc_, packet); |
| 241 } | 241 } |
| 242 | 242 |
| 243 void RtcpSender::BuildRR(const transport::RtcpReportBlock* report_block, | 243 void RtcpSender::BuildRR(const transport::RtcpReportBlock* report_block, |
| 244 Packet* packet) const { | 244 Packet* packet) const { |
| 245 size_t start_size = packet->size(); | 245 size_t start_size = packet->size(); |
| 246 DCHECK_LT(start_size + 32, kMaxIpPacketSize) << "Not enough buffer space"; | 246 DCHECK_LT(start_size + 32, kMaxIpPacketSize) << "Not enough buffer space"; |
| 247 if (start_size + 32 > kMaxIpPacketSize) | 247 if (start_size + 32 > kMaxIpPacketSize) |
| 248 return; | 248 return; |
| 249 | 249 |
| 250 uint16 number_of_rows = (report_block) ? 7 : 1; | 250 uint16 number_of_rows = (report_block) ? 7 : 1; |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 << "Not enough buffer space."; | 852 << "Not enough buffer space."; |
| 853 | 853 |
| 854 VLOG(3) << "number of frames: " << *number_of_frames; | 854 VLOG(3) << "number of frames: " << *number_of_frames; |
| 855 VLOG(3) << "total messages to send: " << *total_number_of_messages_to_send; | 855 VLOG(3) << "total messages to send: " << *total_number_of_messages_to_send; |
| 856 VLOG(3) << "rtcp log size: " << *rtcp_log_size; | 856 VLOG(3) << "rtcp log size: " << *rtcp_log_size; |
| 857 return *number_of_frames > 0; | 857 return *number_of_frames > 0; |
| 858 } | 858 } |
| 859 | 859 |
| 860 } // namespace cast | 860 } // namespace cast |
| 861 } // namespace media | 861 } // namespace media |
| OLD | NEW |