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

Unified Diff: media/formats/mp4/mp4_stream_parser.cc

Issue 1041353002: media-internals: Differentiate error, info, and debug log messages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Attempt to fix android compile error Created 5 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 side-by-side diff with in-line comments
Download patch
Index: media/formats/mp4/mp4_stream_parser.cc
diff --git a/media/formats/mp4/mp4_stream_parser.cc b/media/formats/mp4/mp4_stream_parser.cc
index e6ad09d9171cabcd5fc23b19468ebbb25b7b54e7..622c301592b862c9925fd301391784862ce7a86c 100644
--- a/media/formats/mp4/mp4_stream_parser.cc
+++ b/media/formats/mp4/mp4_stream_parser.cc
@@ -162,8 +162,8 @@ bool MP4StreamParser::ParseBox(bool* err) {
// before the head of the 'moof', so keeping this box around is sufficient.)
return !(*err);
} else {
- MEDIA_LOG(log_cb_) << "Skipping unrecognized top-level box: "
- << FourCCToString(reader->type());
+ MEDIA_LOG(log_cb_, DEBUG) << "Skipping unrecognized top-level box: "
+ << FourCCToString(reader->type());
}
queue_.Pop(reader->size());
@@ -217,17 +217,19 @@ bool MP4StreamParser::ParseMoov(BoxReader* reader) {
if (!(entry.format == FOURCC_MP4A ||
(entry.format == FOURCC_ENCA &&
entry.sinf.format.format == FOURCC_MP4A))) {
- MEDIA_LOG(log_cb_) << "Unsupported audio format 0x"
- << std::hex << entry.format << " in stsd box.";
+ MEDIA_LOG(log_cb_, ERROR) << "Unsupported audio format 0x"
+ << std::hex << entry.format
+ << " in stsd box.";
return false;
}
uint8 audio_type = entry.esds.object_type;
DVLOG(1) << "audio_type " << std::hex << static_cast<int>(audio_type);
if (audio_object_types_.find(audio_type) == audio_object_types_.end()) {
- MEDIA_LOG(log_cb_) << "audio object type 0x" << std::hex << audio_type
- << " does not match what is specified in the"
- << " mimetype.";
+ MEDIA_LOG(log_cb_, ERROR) << "audio object type 0x"
+ << std::hex << audio_type
+ << " does not match what is specified in the"
+ << " mimetype.";
return false;
}
@@ -245,8 +247,8 @@ bool MP4StreamParser::ParseMoov(BoxReader* reader) {
extra_data = aac.codec_specific_data();
#endif
} else {
- MEDIA_LOG(log_cb_) << "Unsupported audio object type 0x" << std::hex
- << audio_type << " in esds.";
+ MEDIA_LOG(log_cb_, ERROR) << "Unsupported audio object type 0x"
+ << std::hex << audio_type << " in esds.";
return false;
}
@@ -279,8 +281,9 @@ bool MP4StreamParser::ParseMoov(BoxReader* reader) {
const VideoSampleEntry& entry = samp_descr.video_entries[desc_idx];
if (!entry.IsFormatValid()) {
- MEDIA_LOG(log_cb_) << "Unsupported video format 0x"
- << std::hex << entry.format << " in stsd box.";
+ MEDIA_LOG(log_cb_, ERROR) << "Unsupported video format 0x"
+ << std::hex << entry.format
+ << " in stsd box.";
return false;
}
@@ -481,7 +484,7 @@ bool MP4StreamParser::EnqueueSample(BufferQueue* audio_buffers,
if (video) {
if (!PrepareAVCBuffer(runs_->video_description().avcc,
&frame_buf, &subsamples)) {
- MEDIA_LOG(log_cb_) << "Failed to prepare AVC sample for decode";
+ MEDIA_LOG(log_cb_, ERROR) << "Failed to prepare AVC sample for decode";
*err = true;
return false;
}
@@ -491,7 +494,7 @@ bool MP4StreamParser::EnqueueSample(BufferQueue* audio_buffers,
if (ESDescriptor::IsAAC(runs_->audio_description().esds.object_type) &&
!PrepareAACBuffer(runs_->audio_description().esds.aac,
&frame_buf, &subsamples)) {
- MEDIA_LOG(log_cb_) << "Failed to prepare AAC sample for decode";
+ MEDIA_LOG(log_cb_, ERROR) << "Failed to prepare AAC sample for decode";
*err = true;
return false;
}
@@ -582,8 +585,8 @@ bool MP4StreamParser::ReadAndDiscardMDATsUntil(int64 max_clear_offset) {
break;
if (type != FOURCC_MDAT) {
- MEDIA_LOG(log_cb_) << "Unexpected box type while parsing MDATs: "
- << FourCCToString(type);
+ MEDIA_LOG(log_cb_, DEBUG) << "Unexpected box type while parsing MDATs: "
+ << FourCCToString(type);
}
mdat_tail_ += box_sz;
}

Powered by Google App Engine
This is Rietveld 408576698