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

Unified Diff: media/mp4/track_run_iterator.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: . 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
Index: media/mp4/track_run_iterator.cc
diff --git a/media/mp4/track_run_iterator.cc b/media/mp4/track_run_iterator.cc
index 36ec206d66236271993ee2e9ca202b3c455d4ff0..c8ee39afaa2fc501f1741b03ce70fadb8c506c09 100644
--- a/media/mp4/track_run_iterator.cc
+++ b/media/mp4/track_run_iterator.cc
@@ -62,10 +62,12 @@ TimeDelta TimeDeltaFromRational(int64 numer, int64 denom) {
base::Time::kMicrosecondsPerSecond * numer / denom);
}
-TrackRunIterator::TrackRunIterator(const Movie* moov)
- : moov_(moov), sample_offset_(0) {
+TrackRunIterator::TrackRunIterator(const Movie* moov,
+ const ErrorLogCB& error_cb)
+ : moov_(moov), error_cb_(error_cb), sample_offset_(0) {
CHECK(moov);
}
+
TrackRunIterator::~TrackRunIterator() {}
static void PopulateSampleInfo(const TrackExtends& trex,
@@ -430,7 +432,7 @@ scoped_ptr<DecryptConfig> TrackRunIterator::GetDecryptConfig() {
if (!cenc_info.subsamples.empty() &&
(cenc_info.GetTotalSizeOfSubsamples() !=
static_cast<size_t>(sample_size()))) {
- DVLOG(1) << "Incorrect CENC subsample size.";
+ ERROR_LOG(error_cb_) << "Incorrect CENC subsample size.";
return scoped_ptr<DecryptConfig>();
}

Powered by Google App Engine
This is Rietveld 408576698