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 "chrome/renderer/media/cast_session_delegate.h" | 5 #include "chrome/renderer/media/cast_session_delegate.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
10 #include "chrome/common/chrome_version_info.h" | 10 #include "chrome/common/chrome_version_info.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 int output_bytes; | 157 int output_bytes; |
158 bool success = media::cast::SerializeEvents(metadata, | 158 bool success = media::cast::SerializeEvents(metadata, |
159 frame_events, | 159 frame_events, |
160 packet_events, | 160 packet_events, |
161 true, | 161 true, |
162 media::cast::kMaxSerializedBytes, | 162 media::cast::kMaxSerializedBytes, |
163 serialized_log.get(), | 163 serialized_log.get(), |
164 &output_bytes); | 164 &output_bytes); |
165 | 165 |
166 if (!success) { | 166 if (!success) { |
167 VLOG(2) << "Failed to serialize event log."; | 167 DVLOG(2) << "Failed to serialize event log."; |
168 callback.Run(make_scoped_ptr(new base::BinaryValue).Pass()); | 168 callback.Run(make_scoped_ptr(new base::BinaryValue).Pass()); |
169 return; | 169 return; |
170 } | 170 } |
171 | 171 |
172 DVLOG(2) << "Serialized log length: " << output_bytes; | 172 DVLOG(2) << "Serialized log length: " << output_bytes; |
173 | 173 |
174 scoped_ptr<base::BinaryValue> blob( | 174 scoped_ptr<base::BinaryValue> blob( |
175 new base::BinaryValue(serialized_log.Pass(), output_bytes)); | 175 new base::BinaryValue(serialized_log.Pass(), output_bytes)); |
176 callback.Run(blob.Pass()); | 176 callback.Run(blob.Pass()); |
177 } | 177 } |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 } else { | 279 } else { |
280 cast_environment_->Logging()->InsertFrameEvent( | 280 cast_environment_->Logging()->InsertFrameEvent( |
281 it->timestamp, | 281 it->timestamp, |
282 it->type, | 282 it->type, |
283 it->media_type, | 283 it->media_type, |
284 it->rtp_timestamp, | 284 it->rtp_timestamp, |
285 it->frame_id); | 285 it->frame_id); |
286 } | 286 } |
287 } | 287 } |
288 } | 288 } |
OLD | NEW |