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

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

Issue 1858073002: Media: Report HTMLMediaElement player errors to devtools console Base URL: https://chromium.googlesource.com/chromium/src.git@fix_472253_1
Patch Set: Rebase, attempt to fix 1 regressed expectation, temporary logging for investigating 2 other regress… Created 4 years, 8 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 | third_party/WebKit/LayoutTests/compositing/video/video-controls-layer-creation-expected.txt » ('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 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 <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 return network_state_; 631 return network_state_;
632 } 632 }
633 633
634 WebMediaPlayer::ReadyState WebMediaPlayerImpl::getReadyState() const { 634 WebMediaPlayer::ReadyState WebMediaPlayerImpl::getReadyState() const {
635 DCHECK(main_task_runner_->BelongsToCurrentThread()); 635 DCHECK(main_task_runner_->BelongsToCurrentThread());
636 return ready_state_; 636 return ready_state_;
637 } 637 }
638 638
639 blink::WebString WebMediaPlayerImpl::getErrorMessage() { 639 blink::WebString WebMediaPlayerImpl::getErrorMessage() {
640 DCHECK(main_task_runner_->BelongsToCurrentThread()); 640 DCHECK(main_task_runner_->BelongsToCurrentThread());
641
642 // ------------- TODO REMOVE before landing
643 // This is just to get a better idea of what the layout bots are seeing that's
644 // different from a local build, causing flakiness/failure on the bots.
645 LOG(ERROR) << "getErrorMessage: " << media_log_->GetLastErrorMessage();
646
641 return blink::WebString::fromUTF8(media_log_->GetLastErrorMessage()); 647 return blink::WebString::fromUTF8(media_log_->GetLastErrorMessage());
642 } 648 }
643 649
644 blink::WebTimeRanges WebMediaPlayerImpl::buffered() const { 650 blink::WebTimeRanges WebMediaPlayerImpl::buffered() const {
645 DCHECK(main_task_runner_->BelongsToCurrentThread()); 651 DCHECK(main_task_runner_->BelongsToCurrentThread());
646 652
647 Ranges<base::TimeDelta> buffered_time_ranges = 653 Ranges<base::TimeDelta> buffered_time_ranges =
648 pipeline_.GetBufferedTimeRanges(); 654 pipeline_.GetBufferedTimeRanges();
649 655
650 const base::TimeDelta duration = pipeline_.GetMediaDuration(); 656 const base::TimeDelta duration = pipeline_.GetMediaDuration();
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
1587 << ", Video: " << stats.video_memory_usage << ", DataSource: " 1593 << ", Video: " << stats.video_memory_usage << ", DataSource: "
1588 << (data_source_ ? data_source_->GetMemoryUsage() : 0) 1594 << (data_source_ ? data_source_->GetMemoryUsage() : 0)
1589 << ", Demuxer: " << demuxer_memory_usage; 1595 << ", Demuxer: " << demuxer_memory_usage;
1590 1596
1591 const int64_t delta = current_memory_usage - last_reported_memory_usage_; 1597 const int64_t delta = current_memory_usage - last_reported_memory_usage_;
1592 last_reported_memory_usage_ = current_memory_usage; 1598 last_reported_memory_usage_ = current_memory_usage;
1593 adjust_allocated_memory_cb_.Run(delta); 1599 adjust_allocated_memory_cb_.Run(delta);
1594 } 1600 }
1595 1601
1596 } // namespace media 1602 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/compositing/video/video-controls-layer-creation-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698