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

Unified Diff: webkit/media/webmediaplayer_impl.cc

Issue 11471006: Log MediaSource parsing errors to the MediaLog so they can appear in chrome:media-internals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/webm/webm_tracks_parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/webmediaplayer_impl.cc
diff --git a/webkit/media/webmediaplayer_impl.cc b/webkit/media/webmediaplayer_impl.cc
index 0941666e2bef0e8298c5e04ebb9fda9402b6a00d..f5e63331a239b83b285e7a5aa1b881c4b48036b5 100644
--- a/webkit/media/webmediaplayer_impl.cc
+++ b/webkit/media/webmediaplayer_impl.cc
@@ -118,6 +118,11 @@ typedef base::Callback<void(const std::string&,
scoped_array<uint8>,
int)> OnNeedKeyCB;
+static void LogMediaSourceError(const scoped_refptr<media::MediaLog>& media_log,
+ const std::string& error) {
+ media_log->AddEvent(media_log->CreateMediaSourceErrorEvent(error));
+}
+
WebMediaPlayerImpl::WebMediaPlayerImpl(
WebKit::WebFrame* frame,
WebKit::WebMediaPlayerClient* client,
@@ -274,7 +279,8 @@ void WebMediaPlayerImpl::load(const WebKit::WebURL& url, CORSMode cors_mode) {
if (!url.isEmpty() && url == GetClient()->sourceURL()) {
chunk_demuxer_ = new media::ChunkDemuxer(
BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnDemuxerOpened),
- BIND_TO_RENDER_LOOP_2(&WebMediaPlayerImpl::OnNeedKey, "", ""));
+ BIND_TO_RENDER_LOOP_2(&WebMediaPlayerImpl::OnNeedKey, "", ""),
+ base::Bind(&LogMediaSourceError, media_log_));
BuildMediaSourceCollection(chunk_demuxer_,
message_loop,
« no previous file with comments | « media/webm/webm_tracks_parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698