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

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

Issue 164253003: Cast: Split kDuplicatePacketReceived into separate events for audio/video. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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
« no previous file with comments | « media/cast/logging/proto/raw_events.proto ('k') | media/cast/rtcp/rtcp_receiver.cc » ('j') | 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/rtcp/rtcp.h" 5 #include "media/cast/rtcp/rtcp.h"
6 6
7 #include "base/rand_util.h" 7 #include "base/rand_util.h"
8 #include "media/cast/cast_config.h" 8 #include "media/cast/cast_config.h"
9 #include "media/cast/cast_defines.h" 9 #include "media/cast/cast_defines.h"
10 #include "media/cast/cast_environment.h" 10 #include "media/cast/cast_environment.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 for (; it != receiver_log.end(); ++it) { 73 for (; it != receiver_log.end(); ++it) {
74 uint32 rtp_timestamp = it->rtp_timestamp_; 74 uint32 rtp_timestamp = it->rtp_timestamp_;
75 75
76 RtcpReceiverEventLogMessages::const_iterator event_it = 76 RtcpReceiverEventLogMessages::const_iterator event_it =
77 it->event_log_messages_.begin(); 77 it->event_log_messages_.begin();
78 for (; event_it != it->event_log_messages_.end(); ++event_it) { 78 for (; event_it != it->event_log_messages_.end(); ++event_it) {
79 switch (event_it->type) { 79 switch (event_it->type) {
80 case kAudioPacketReceived: 80 case kAudioPacketReceived:
81 case kVideoPacketReceived: 81 case kVideoPacketReceived:
82 case kDuplicatePacketReceived: 82 case kDuplicateAudioPacketReceived:
83 case kDuplicateVideoPacketReceived:
83 cast_environment_->Logging()->InsertPacketEvent( 84 cast_environment_->Logging()->InsertPacketEvent(
84 event_it->event_timestamp, event_it->type, rtp_timestamp, 85 event_it->event_timestamp, event_it->type, rtp_timestamp,
85 kFrameIdUnknown, event_it->packet_id, 0, 0); 86 kFrameIdUnknown, event_it->packet_id, 0, 0);
86 break; 87 break;
87 case kAudioAckSent: 88 case kAudioAckSent:
88 case kVideoAckSent: 89 case kVideoAckSent:
89 case kAudioFrameDecoded: 90 case kAudioFrameDecoded:
90 case kVideoFrameDecoded: 91 case kVideoFrameDecoded:
91 cast_environment_->Logging()->InsertFrameEvent( 92 cast_environment_->Logging()->InsertFrameEvent(
92 event_it->event_timestamp, event_it->type, rtp_timestamp, 93 event_it->event_timestamp, event_it->type, rtp_timestamp,
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 int random = base::RandInt(0, 999); 481 int random = base::RandInt(0, 999);
481 base::TimeDelta time_to_next = 482 base::TimeDelta time_to_next =
482 (rtcp_interval_ / 2) + (rtcp_interval_ * random / 1000); 483 (rtcp_interval_ / 2) + (rtcp_interval_ * random / 1000);
483 484
484 base::TimeTicks now = cast_environment_->Clock()->NowTicks(); 485 base::TimeTicks now = cast_environment_->Clock()->NowTicks();
485 next_time_to_send_rtcp_ = now + time_to_next; 486 next_time_to_send_rtcp_ = now + time_to_next;
486 } 487 }
487 488
488 } // namespace cast 489 } // namespace cast
489 } // namespace media 490 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/logging/proto/raw_events.proto ('k') | media/cast/rtcp/rtcp_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698