summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddorwin@chromium.org <ddorwin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-08 18:09:27 +0000
committerddorwin@chromium.org <ddorwin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-08 18:09:27 +0000
commit23851c320414081df7ded618c3682ad090d97def (patch)
treea5729f4da2a08181e8dc80fc0ef8761213450968
parent7f8238bf73c2a5f30a07fafe4c19f9a14537f274 (diff)
downloadchromium_src-23851c320414081df7ded618c3682ad090d97def.zip
chromium_src-23851c320414081df7ded618c3682ad090d97def.tar.gz
chromium_src-23851c320414081df7ded618c3682ad090d97def.tar.bz2
Added debug logging for MSE config changes.
Review URL: https://chromiumcodereview.appspot.com/11777018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175551 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--media/filters/chunk_demuxer.cc3
-rw-r--r--media/filters/chunk_demuxer.h2
-rw-r--r--media/filters/source_buffer_stream.cc14
-rw-r--r--media/webm/webm_stream_parser.cc1
4 files changed, 15 insertions, 5 deletions
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
index 092fa4f..0df3551 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -520,6 +520,7 @@ bool ChunkDemuxerStream::GetNextBuffer_Locked(
}
return false;
case SourceBufferStream::kConfigChange:
+ DVLOG(2) << "Config change reported to ChunkDemuxerStream.";
*status = kConfigChanged;
*buffer = NULL;
return true;
@@ -1118,7 +1119,7 @@ bool ChunkDemuxer::OnNewConfigs(bool has_audio, bool has_video,
}
}
- DVLOG(1) << "OnNewConfigs() : success " << success;
+ DVLOG(1) << "OnNewConfigs() : " << (success ? "success" : "failed");
return success;
}
diff --git a/media/filters/chunk_demuxer.h b/media/filters/chunk_demuxer.h
index dde71ae..08517c1 100644
--- a/media/filters/chunk_demuxer.h
+++ b/media/filters/chunk_demuxer.h
@@ -174,6 +174,8 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
DemuxerHost* host_;
base::Closure open_cb_;
NeedKeyCB need_key_cb_;
+ // Callback used to report error strings that can help the web developer
+ // figure out what is wrong with the content.
LogCB log_cb_;
PipelineStatusCB init_cb_;
diff --git a/media/filters/source_buffer_stream.cc b/media/filters/source_buffer_stream.cc
index 3f1b42d..0b3ef91 100644
--- a/media/filters/source_buffer_stream.cc
+++ b/media/filters/source_buffer_stream.cc
@@ -362,13 +362,13 @@ bool SourceBufferStream::Append(
// New media segments must begin with a keyframe.
if (new_media_segment_ && !buffers.front()->IsKeyframe()) {
- MEDIA_LOG(log_cb_) <<"Media segment did not begin with keyframe.";
+ MEDIA_LOG(log_cb_) << "Media segment did not begin with keyframe.";
return false;
}
// Buffers within a media segment should be monotonically increasing.
if (!IsMonotonicallyIncreasing(buffers)) {
- MEDIA_LOG(log_cb_) <<"Buffers were not monotonically increasing.";
+ MEDIA_LOG(log_cb_) << "Buffers were not monotonically increasing.";
return false;
}
@@ -929,6 +929,7 @@ SourceBufferStream::Status SourceBufferStream::GetNextBuffer(
DCHECK(selected_range_);
if (track_buffer_.front()->GetConfigId() != current_config_index_) {
config_change_pending_ = true;
+ DVLOG(1) << "Config change (track buffer config ID does not match).";
return kConfigChange;
}
@@ -942,6 +943,7 @@ SourceBufferStream::Status SourceBufferStream::GetNextBuffer(
if (selected_range_->GetNextConfigId() != current_config_index_) {
config_change_pending_ = true;
+ DVLOG(1) << "Config change (selected range config ID does not match).";
return kConfigChange;
}
@@ -1039,6 +1041,7 @@ base::TimeDelta SourceBufferStream::GetMaxInterbufferDistance() const {
bool SourceBufferStream::UpdateAudioConfig(const AudioDecoderConfig& config) {
DCHECK(!audio_configs_.empty());
DCHECK(video_configs_.empty());
+ DVLOG(3) << "UpdateAudioConfig.";
if (audio_configs_[0]->codec() != config.codec()) {
MEDIA_LOG(log_cb_) << "Audio codec changes not allowed.";
@@ -1075,6 +1078,7 @@ bool SourceBufferStream::UpdateAudioConfig(const AudioDecoderConfig& config) {
// No matches found so let's add this one to the list.
append_config_index_ = audio_configs_.size();
+ DVLOG(2) << "New audio config - index: " << append_config_index_;
audio_configs_.resize(audio_configs_.size() + 1);
audio_configs_[append_config_index_] = new AudioDecoderConfig();
audio_configs_[append_config_index_]->CopyFrom(config);
@@ -1084,14 +1088,15 @@ bool SourceBufferStream::UpdateAudioConfig(const AudioDecoderConfig& config) {
bool SourceBufferStream::UpdateVideoConfig(const VideoDecoderConfig& config) {
DCHECK(!video_configs_.empty());
DCHECK(audio_configs_.empty());
+ DVLOG(3) << "UpdateVideoConfig.";
if (video_configs_[0]->is_encrypted() != config.is_encrypted()) {
- MEDIA_LOG(log_cb_) <<"Video Encryption changes not allowed.";
+ MEDIA_LOG(log_cb_) << "Video Encryption changes not allowed.";
return false;
}
if (video_configs_[0]->codec() != config.codec()) {
- MEDIA_LOG(log_cb_) <<"Video codec changes not allowed.";
+ MEDIA_LOG(log_cb_) << "Video codec changes not allowed.";
return false;
}
@@ -1110,6 +1115,7 @@ bool SourceBufferStream::UpdateVideoConfig(const VideoDecoderConfig& config) {
// No matches found so let's add this one to the list.
append_config_index_ = video_configs_.size();
+ DVLOG(2) << "New video config - index: " << append_config_index_;
video_configs_.resize(video_configs_.size() + 1);
video_configs_[append_config_index_] = new VideoDecoderConfig();
video_configs_[append_config_index_]->CopyFrom(config);
diff --git a/media/webm/webm_stream_parser.cc b/media/webm/webm_stream_parser.cc
index bfa44ae..02c1357 100644
--- a/media/webm/webm_stream_parser.cc
+++ b/media/webm/webm_stream_parser.cc
@@ -273,6 +273,7 @@ void WebMStreamParser::ChangeState(State new_state) {
}
int WebMStreamParser::ParseInfoAndTracks(const uint8* data, int size) {
+ DVLOG(2) << "ParseInfoAndTracks()";
DCHECK(data);
DCHECK_GT(size, 0);