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

Side by Side Diff: media/base/media_log.cc

Issue 2756283002: Restore logging of WMPI seek events in media log (Closed)
Patch Set: Created 3 years, 9 months 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
« no previous file with comments | « media/base/media_log.h ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 return event; 237 return event;
238 } 238 }
239 239
240 std::unique_ptr<MediaLogEvent> MediaLog::CreateLoadEvent( 240 std::unique_ptr<MediaLogEvent> MediaLog::CreateLoadEvent(
241 const std::string& url) { 241 const std::string& url) {
242 std::unique_ptr<MediaLogEvent> event(CreateEvent(MediaLogEvent::LOAD)); 242 std::unique_ptr<MediaLogEvent> event(CreateEvent(MediaLogEvent::LOAD));
243 event->params.SetString("url", url); 243 event->params.SetString("url", url);
244 return event; 244 return event;
245 } 245 }
246 246
247 std::unique_ptr<MediaLogEvent> MediaLog::CreateSeekEvent(float seconds) { 247 std::unique_ptr<MediaLogEvent> MediaLog::CreateSeekEvent(double seconds) {
248 std::unique_ptr<MediaLogEvent> event(CreateEvent(MediaLogEvent::SEEK)); 248 std::unique_ptr<MediaLogEvent> event(CreateEvent(MediaLogEvent::SEEK));
249 event->params.SetDouble("seek_target", seconds); 249 event->params.SetDouble("seek_target", seconds);
250 return event; 250 return event;
251 } 251 }
252 252
253 std::unique_ptr<MediaLogEvent> MediaLog::CreatePipelineStateChangedEvent( 253 std::unique_ptr<MediaLogEvent> MediaLog::CreatePipelineStateChangedEvent(
254 PipelineImpl::State state) { 254 PipelineImpl::State state) {
255 std::unique_ptr<MediaLogEvent> event( 255 std::unique_ptr<MediaLogEvent> event(
256 CreateEvent(MediaLogEvent::PIPELINE_STATE_CHANGED)); 256 CreateEvent(MediaLogEvent::PIPELINE_STATE_CHANGED));
257 event->params.SetString("pipeline_state", 257 event->params.SetString("pipeline_state",
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 const scoped_refptr<MediaLog>& media_log) 333 const scoped_refptr<MediaLog>& media_log)
334 : level_(level), media_log_(media_log) { 334 : level_(level), media_log_(media_log) {
335 DCHECK(media_log_.get()); 335 DCHECK(media_log_.get());
336 } 336 }
337 337
338 LogHelper::~LogHelper() { 338 LogHelper::~LogHelper() {
339 media_log_->AddLogEvent(level_, stream_.str()); 339 media_log_->AddLogEvent(level_, stream_.str());
340 } 340 }
341 341
342 } //namespace media 342 } //namespace media
OLDNEW
« no previous file with comments | « media/base/media_log.h ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698