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

Unified Diff: media/filters/source_buffer_stream.cc

Issue 11777018: Added debug logging for MSE config changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed feedback. Created 7 years, 11 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
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | media/webm/webm_stream_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/source_buffer_stream.cc
diff --git a/media/filters/source_buffer_stream.cc b/media/filters/source_buffer_stream.cc
index 3f1b42d82662bc262607896ee3c1daa15e58e157..0b3ef916f2156ea261b0623394732909754059e5 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);
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | media/webm/webm_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698