Skip to content

Commit

Permalink
Cherry pick PR #3289: [media] Improve MediaSource related logging (#3313
Browse files Browse the repository at this point in the history
)

Refer to the original PR: #3289

b/300321069

Change-Id: I4b1e49d8f659d88efa9a035447142d448e35b88b

Co-authored-by: xiaomings <[email protected]>
  • Loading branch information
cobalt-github-releaser-bot and xiaomings committed May 21, 2024
1 parent 7923340 commit 4ca5011
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cobalt/dom/html_media_element.cc
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,9 @@ void HTMLMediaElement::LoadResource(const GURL& initial_url,
return;
}
media_source_url_ = url;

LOG(INFO) << "Attached MediaSource (0x" << media_source_.get()
<< ") to HTMLMediaElement (0x" << this << ")";
}
// The resource fetch algorithm
network_state_ = kNetworkLoading;
Expand Down
3 changes: 3 additions & 0 deletions cobalt/dom/media_source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ scoped_refptr<SourceBuffer> MediaSource::AddSourceBuffer(

DCHECK(source_buffer);
source_buffers_->Add(source_buffer);
LOG(INFO) << "added SourceBuffer (0x" << source_buffer.get()
<< ") to MediaSource (0x" << this << ") with type " << type
<< " id = " << guid;
return source_buffer;
}

Expand Down
2 changes: 2 additions & 0 deletions cobalt/media/base/sbplayer_pipeline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,8 @@ void SbPlayerPipeline::OnDemuxerError(PipelineStatus error) {
return;
}

LOG(INFO) << "SbPlayerPipeline::OnDemuxerError() called with error " << error;

if (error != ::media::PIPELINE_OK) {
CallErrorCB(error, "Demuxer error.");
}
Expand Down

0 comments on commit 4ca5011

Please sign in to comment.