OLD | NEW |
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/logging/logging_raw.h" | 5 #include "media/cast/logging/logging_raw.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 | 10 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 PacketRawMap::iterator it = packet_map_.find(rtp_timestamp); | 85 PacketRawMap::iterator it = packet_map_.find(rtp_timestamp); |
86 if (it == packet_map_.end()) { | 86 if (it == packet_map_.end()) { |
87 // Create a new entry - start with base packet map. | 87 // Create a new entry - start with base packet map. |
88 PacketEvent info; | 88 PacketEvent info; |
89 info.frame_id = frame_id; | 89 info.frame_id = frame_id; |
90 info.max_packet_id = max_packet_id; | 90 info.max_packet_id = max_packet_id; |
91 BasePacketInfo base_info; | 91 BasePacketInfo base_info; |
92 base_info.size = size; | 92 base_info.size = size; |
93 base_info.timestamp.push_back(time_of_event); | 93 base_info.timestamp.push_back(time_of_event); |
94 base_info.type.push_back(event); | 94 base_info.type.push_back(event); |
| 95 info.packet_map.insert(std::make_pair(packet_id, base_info)); |
95 packet_map_.insert(std::make_pair(rtp_timestamp, info)); | 96 packet_map_.insert(std::make_pair(rtp_timestamp, info)); |
96 } else { | 97 } else { |
97 // Is this a new packet? | 98 // Is this a new packet? |
98 BasePacketMap::iterator packet_it = it->second.packet_map.find(packet_id); | 99 BasePacketMap::iterator packet_it = it->second.packet_map.find(packet_id); |
99 if (packet_it == it->second.packet_map.end()) { | 100 if (packet_it == it->second.packet_map.end()) { |
100 BasePacketInfo base_info; | 101 BasePacketInfo base_info; |
101 base_info.size = size; | 102 base_info.size = size; |
102 base_info.timestamp.push_back(time_of_event); | 103 base_info.timestamp.push_back(time_of_event); |
103 base_info.type.push_back(event); | 104 base_info.type.push_back(event); |
104 it->second.packet_map.insert(std::make_pair(packet_id, base_info)); | 105 it->second.packet_map.insert(std::make_pair(packet_id, base_info)); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 } | 140 } |
140 | 141 |
141 void LoggingRaw::Reset() { | 142 void LoggingRaw::Reset() { |
142 frame_map_.clear(); | 143 frame_map_.clear(); |
143 packet_map_.clear(); | 144 packet_map_.clear(); |
144 generic_map_.clear(); | 145 generic_map_.clear(); |
145 } | 146 } |
146 | 147 |
147 } // namespace cast | 148 } // namespace cast |
148 } // namespace media | 149 } // namespace media |
OLD | NEW |