OLD | NEW |
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 Loading... |
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_t event_level = rtcp_events_.size() + popped_events_; | 84 uint64_t event_level = rtcp_events_.size() + popped_events_; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 132 |
133 bool ReceiverRtcpEventSubscriber::ShouldProcessEvent( | 133 bool ReceiverRtcpEventSubscriber::ShouldProcessEvent( |
134 CastLoggingEvent event_type, EventMediaType event_media_type) { | 134 CastLoggingEvent event_type, EventMediaType event_media_type) { |
135 return type_ == event_media_type && | 135 return type_ == event_media_type && |
136 (event_type == FRAME_ACK_SENT || event_type == FRAME_DECODED || | 136 (event_type == FRAME_ACK_SENT || event_type == FRAME_DECODED || |
137 event_type == FRAME_PLAYOUT || event_type == PACKET_RECEIVED); | 137 event_type == FRAME_PLAYOUT || event_type == PACKET_RECEIVED); |
138 } | 138 } |
139 | 139 |
140 } // namespace cast | 140 } // namespace cast |
141 } // namespace media | 141 } // namespace media |
OLD | NEW |