Skip to content

Commit

Permalink
[media] Improve MediaSource related logging (#3289)
Browse files Browse the repository at this point in the history
b/300321069

Change-Id: I4b1e49d8f659d88efa9a035447142d448e35b88b
(cherry picked from commit 48866e0)
  • Loading branch information
xiaomings authored and anonymous1-me committed May 21, 2024
1 parent 7923340 commit c3ef3d3
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 c3ef3d3

Please sign in to comment.