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

Side by Side Diff: media/cast/video_sender/video_sender.cc

Issue 236123003: Cast: Provide more meaningful stats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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
« media/cast/test/sender.cc ('K') | « media/cast/test/sender.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/video_sender/video_sender.h" 5 #include "media/cast/video_sender/video_sender.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 #include <list> 8 #include <list>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 frame_id_to_rtp_timestamp_[frame_id & 0xff] = encoded_frame->rtp_timestamp; 183 frame_id_to_rtp_timestamp_[frame_id & 0xff] = encoded_frame->rtp_timestamp;
184 184
185 last_sent_frame_id_ = static_cast<int>(encoded_frame->frame_id); 185 last_sent_frame_id_ = static_cast<int>(encoded_frame->frame_id);
186 transport_sender_->InsertCodedVideoFrame(encoded_frame.get(), capture_time); 186 transport_sender_->InsertCodedVideoFrame(encoded_frame.get(), capture_time);
187 UpdateFramesInFlight(); 187 UpdateFramesInFlight();
188 InitializeTimers(); 188 InitializeTimers();
189 } 189 }
190 190
191 void VideoSender::IncomingRtcpPacket(scoped_ptr<Packet> packet) { 191 void VideoSender::IncomingRtcpPacket(scoped_ptr<Packet> packet) {
192 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 192 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
193 cast_environment_->Logging()->InsertGenericEvent(
194 cast_environment_->Clock()->NowTicks(), kVideoRtcpPacketReceived, 0);
193 rtcp_->IncomingRtcpPacket(&packet->front(), packet->size()); 195 rtcp_->IncomingRtcpPacket(&packet->front(), packet->size());
194 } 196 }
195 197
196 void VideoSender::ScheduleNextRtcpReport() { 198 void VideoSender::ScheduleNextRtcpReport() {
197 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 199 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
198 base::TimeDelta time_to_next = rtcp_->TimeToSendNextRtcpReport() - 200 base::TimeDelta time_to_next = rtcp_->TimeToSendNextRtcpReport() -
199 cast_environment_->Clock()->NowTicks(); 201 cast_environment_->Clock()->NowTicks();
200 202
201 time_to_next = std::max( 203 time_to_next = std::max(
202 time_to_next, base::TimeDelta::FromMilliseconds(kMinSchedulingDelayMs)); 204 time_to_next, base::TimeDelta::FromMilliseconds(kMinSchedulingDelayMs));
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 461 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
460 MissingFramesAndPacketsMap missing_frames_and_packets; 462 MissingFramesAndPacketsMap missing_frames_and_packets;
461 PacketIdSet missing; 463 PacketIdSet missing;
462 missing_frames_and_packets.insert(std::make_pair(resend_frame_id, missing)); 464 missing_frames_and_packets.insert(std::make_pair(resend_frame_id, missing));
463 last_send_time_ = cast_environment_->Clock()->NowTicks(); 465 last_send_time_ = cast_environment_->Clock()->NowTicks();
464 transport_sender_->ResendPackets(false, missing_frames_and_packets); 466 transport_sender_->ResendPackets(false, missing_frames_and_packets);
465 } 467 }
466 468
467 } // namespace cast 469 } // namespace cast
468 } // namespace media 470 } // namespace media
OLDNEW
« media/cast/test/sender.cc ('K') | « media/cast/test/sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698