OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/base/media_log.h" | 5 #include "media/base/media_log.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 return event; | 188 return event; |
189 } | 189 } |
190 | 190 |
191 scoped_ptr<MediaLogEvent> MediaLog::CreateSeekEvent(float seconds) { | 191 scoped_ptr<MediaLogEvent> MediaLog::CreateSeekEvent(float seconds) { |
192 scoped_ptr<MediaLogEvent> event(CreateEvent(MediaLogEvent::SEEK)); | 192 scoped_ptr<MediaLogEvent> event(CreateEvent(MediaLogEvent::SEEK)); |
193 event->params.SetDouble("seek_target", seconds); | 193 event->params.SetDouble("seek_target", seconds); |
194 return event; | 194 return event; |
195 } | 195 } |
196 | 196 |
197 scoped_ptr<MediaLogEvent> MediaLog::CreatePipelineStateChangedEvent( | 197 scoped_ptr<MediaLogEvent> MediaLog::CreatePipelineStateChangedEvent( |
198 Pipeline::State state) { | 198 PipelineImpl::State state) { |
199 scoped_ptr<MediaLogEvent> event( | 199 scoped_ptr<MediaLogEvent> event( |
200 CreateEvent(MediaLogEvent::PIPELINE_STATE_CHANGED)); | 200 CreateEvent(MediaLogEvent::PIPELINE_STATE_CHANGED)); |
201 event->params.SetString("pipeline_state", Pipeline::GetStateString(state)); | 201 event->params.SetString("pipeline_state", |
| 202 PipelineImpl::GetStateString(state)); |
202 return event; | 203 return event; |
203 } | 204 } |
204 | 205 |
205 scoped_ptr<MediaLogEvent> MediaLog::CreatePipelineErrorEvent( | 206 scoped_ptr<MediaLogEvent> MediaLog::CreatePipelineErrorEvent( |
206 PipelineStatus error) { | 207 PipelineStatus error) { |
207 scoped_ptr<MediaLogEvent> event(CreateEvent(MediaLogEvent::PIPELINE_ERROR)); | 208 scoped_ptr<MediaLogEvent> event(CreateEvent(MediaLogEvent::PIPELINE_ERROR)); |
208 event->params.SetInteger("pipeline_error", error); | 209 event->params.SetInteger("pipeline_error", error); |
209 return event; | 210 return event; |
210 } | 211 } |
211 | 212 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 const scoped_refptr<MediaLog>& media_log) | 280 const scoped_refptr<MediaLog>& media_log) |
280 : level_(level), media_log_(media_log) { | 281 : level_(level), media_log_(media_log) { |
281 DCHECK(media_log_.get()); | 282 DCHECK(media_log_.get()); |
282 } | 283 } |
283 | 284 |
284 LogHelper::~LogHelper() { | 285 LogHelper::~LogHelper() { |
285 media_log_->AddLogEvent(level_, stream_.str()); | 286 media_log_->AddLogEvent(level_, stream_.str()); |
286 } | 287 } |
287 | 288 |
288 } //namespace media | 289 } //namespace media |
OLD | NEW |