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

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

Issue 1515433002: Replace uses of raw uint32's with a type-checked RtpTimeTicks data type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/net/rtcp/receiver_rtcp_event_subscriber.h" 5 #include "media/cast/net/rtcp/receiver_rtcp_event_subscriber.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 namespace media { 10 namespace media {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 rtcp_event.packet_id = packet_event.packet_id; 63 rtcp_event.packet_id = packet_event.packet_id;
64 rtcp_events_.push_back( 64 rtcp_events_.push_back(
65 std::make_pair(packet_event.rtp_timestamp, rtcp_event)); 65 std::make_pair(packet_event.rtp_timestamp, rtcp_event));
66 } 66 }
67 } 67 }
68 68
69 TruncateMapIfNeeded(); 69 TruncateMapIfNeeded();
70 } 70 }
71 71
72 struct CompareByFirst { 72 struct CompareByFirst {
73 bool operator()(const std::pair<RtpTimestamp, RtcpEvent>& a, 73 bool operator()(const std::pair<RtpTimeTicks, RtcpEvent>& a,
74 const std::pair<RtpTimestamp, RtcpEvent>& b) { 74 const std::pair<RtpTimeTicks, RtcpEvent>& b) {
75 return a.first < b.first; 75 return a.first < b.first;
76 } 76 }
77 }; 77 };
78 78
79 void ReceiverRtcpEventSubscriber::GetRtcpEventsWithRedundancy( 79 void ReceiverRtcpEventSubscriber::GetRtcpEventsWithRedundancy(
80 RtcpEvents* rtcp_events) { 80 RtcpEvents* rtcp_events) {
81 DCHECK(thread_checker_.CalledOnValidThread()); 81 DCHECK(thread_checker_.CalledOnValidThread());
82 DCHECK(rtcp_events); 82 DCHECK(rtcp_events);
83 83
84 uint64 event_level = rtcp_events_.size() + popped_events_; 84 uint64 event_level = rtcp_events_.size() + popped_events_;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 bool ReceiverRtcpEventSubscriber::ShouldProcessEvent( 132 bool ReceiverRtcpEventSubscriber::ShouldProcessEvent(
133 CastLoggingEvent event_type, EventMediaType event_media_type) { 133 CastLoggingEvent event_type, EventMediaType event_media_type) {
134 return type_ == event_media_type && 134 return type_ == event_media_type &&
135 (event_type == FRAME_ACK_SENT || event_type == FRAME_DECODED || 135 (event_type == FRAME_ACK_SENT || event_type == FRAME_DECODED ||
136 event_type == FRAME_PLAYOUT || event_type == PACKET_RECEIVED); 136 event_type == FRAME_PLAYOUT || event_type == PACKET_RECEIVED);
137 } 137 }
138 138
139 } // namespace cast 139 } // namespace cast
140 } // namespace media 140 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698