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

Side by Side Diff: media/blink/webmediaplayer_impl.cc

Issue 877273002: Add media log messages to the main log (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/blink/webmediaplayer_impl.h" 5 #include "media/blink/webmediaplayer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 #define BIND_TO_RENDER_LOOP(function) \ 97 #define BIND_TO_RENDER_LOOP(function) \
98 (DCHECK(main_task_runner_->BelongsToCurrentThread()), \ 98 (DCHECK(main_task_runner_->BelongsToCurrentThread()), \
99 BindToCurrentLoop(base::Bind(function, AsWeakPtr()))) 99 BindToCurrentLoop(base::Bind(function, AsWeakPtr())))
100 100
101 #define BIND_TO_RENDER_LOOP1(function, arg1) \ 101 #define BIND_TO_RENDER_LOOP1(function, arg1) \
102 (DCHECK(main_task_runner_->BelongsToCurrentThread()), \ 102 (DCHECK(main_task_runner_->BelongsToCurrentThread()), \
103 BindToCurrentLoop(base::Bind(function, AsWeakPtr(), arg1))) 103 BindToCurrentLoop(base::Bind(function, AsWeakPtr(), arg1)))
104 104
105 static void LogMediaSourceError(const scoped_refptr<MediaLog>& media_log, 105 static void LogMediaSourceError(const scoped_refptr<MediaLog>& media_log,
106 const std::string& error) { 106 const std::string& error) {
107 DVLOG(1) << "MediaLog: " << error;
gunsch 2015/01/28 03:30:35 why DVLOG? These are highly useful messages, and n
107 media_log->AddEvent(media_log->CreateMediaSourceErrorEvent(error)); 108 media_log->AddEvent(media_log->CreateMediaSourceErrorEvent(error));
108 } 109 }
109 110
110 WebMediaPlayerImpl::WebMediaPlayerImpl( 111 WebMediaPlayerImpl::WebMediaPlayerImpl(
111 blink::WebLocalFrame* frame, 112 blink::WebLocalFrame* frame,
112 blink::WebMediaPlayerClient* client, 113 blink::WebMediaPlayerClient* client,
113 base::WeakPtr<WebMediaPlayerDelegate> delegate, 114 base::WeakPtr<WebMediaPlayerDelegate> delegate,
114 scoped_ptr<RendererFactory> renderer_factory, 115 scoped_ptr<RendererFactory> renderer_factory,
115 scoped_ptr<CdmFactory> cdm_factory, 116 scoped_ptr<CdmFactory> cdm_factory,
116 const WebMediaPlayerParams& params) 117 const WebMediaPlayerParams& params)
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 999
999 // pause() may be called after playback has ended and the HTMLMediaElement 1000 // pause() may be called after playback has ended and the HTMLMediaElement
1000 // requires that currentTime() == duration() after ending. We want to ensure 1001 // requires that currentTime() == duration() after ending. We want to ensure
1001 // |paused_time_| matches currentTime() in this case or a future seek() may 1002 // |paused_time_| matches currentTime() in this case or a future seek() may
1002 // incorrectly discard what it thinks is a seek to the existing time. 1003 // incorrectly discard what it thinks is a seek to the existing time.
1003 paused_time_ = 1004 paused_time_ =
1004 ended_ ? pipeline_.GetMediaDuration() : pipeline_.GetMediaTime(); 1005 ended_ ? pipeline_.GetMediaDuration() : pipeline_.GetMediaTime();
1005 } 1006 }
1006 1007
1007 } // namespace media 1008 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698