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

Side by Side Diff: media/cast/transport/cast_transport_sender_impl.cc

Issue 343523005: Cast: Avoid retransmit if we sent the same packet recently (less than RTT) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bugfix Created 6 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/transport/cast_transport_sender_impl.h" 5 #include "media/cast/transport/cast_transport_sender_impl.h"
6 6
7 #include "base/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "media/cast/transport/cast_transport_config.h" 8 #include "media/cast/transport/cast_transport_config.h"
9 #include "media/cast/transport/cast_transport_defines.h" 9 #include "media/cast/transport/cast_transport_defines.h"
10 10
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 LOG(ERROR) << "Sending RTCP with an invalid SSRC."; 171 LOG(ERROR) << "Sending RTCP with an invalid SSRC.";
172 return; 172 return;
173 } 173 }
174 rtcp_builder_.SendRtcpFromRtpSender( 174 rtcp_builder_.SendRtcpFromRtpSender(
175 packet_type_flags, sender_info, dlrr, sending_ssrc, c_name); 175 packet_type_flags, sender_info, dlrr, sending_ssrc, c_name);
176 } 176 }
177 177
178 void CastTransportSenderImpl::ResendPackets( 178 void CastTransportSenderImpl::ResendPackets(
179 bool is_audio, 179 bool is_audio,
180 const MissingFramesAndPacketsMap& missing_packets, 180 const MissingFramesAndPacketsMap& missing_packets,
181 bool cancel_rtx_if_not_in_list) { 181 bool cancel_rtx_if_not_in_list,
182 base::TimeDelta dedupe_window) {
182 if (is_audio) { 183 if (is_audio) {
183 DCHECK(audio_sender_) << "Audio sender uninitialized"; 184 DCHECK(audio_sender_) << "Audio sender uninitialized";
184 audio_sender_->ResendPackets(missing_packets, 185 audio_sender_->ResendPackets(missing_packets,
185 cancel_rtx_if_not_in_list); 186 cancel_rtx_if_not_in_list,
187 dedupe_window);
186 } else { 188 } else {
187 DCHECK(video_sender_) << "Video sender uninitialized"; 189 DCHECK(video_sender_) << "Video sender uninitialized";
188 video_sender_->ResendPackets(missing_packets, 190 video_sender_->ResendPackets(missing_packets,
189 cancel_rtx_if_not_in_list); 191 cancel_rtx_if_not_in_list,
192 dedupe_window);
190 } 193 }
191 } 194 }
192 195
193 void CastTransportSenderImpl::SendRawEvents() { 196 void CastTransportSenderImpl::SendRawEvents() {
194 DCHECK(event_subscriber_.get()); 197 DCHECK(event_subscriber_.get());
195 DCHECK(!raw_events_callback_.is_null()); 198 DCHECK(!raw_events_callback_.is_null());
196 std::vector<PacketEvent> packet_events; 199 std::vector<PacketEvent> packet_events;
197 event_subscriber_->GetPacketEventsAndReset(&packet_events); 200 event_subscriber_->GetPacketEventsAndReset(&packet_events);
198 raw_events_callback_.Run(packet_events); 201 raw_events_callback_.Run(packet_events);
199 } 202 }
200 203
201 } // namespace transport 204 } // namespace transport
202 } // namespace cast 205 } // namespace cast
203 } // namespace media 206 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/transport/cast_transport_sender_impl.h ('k') | media/cast/transport/pacing/mock_paced_packet_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698