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

Unified Diff: media/base/pipeline_impl.cc

Issue 7587007: Log FilterHost events in PipelineImpl to MediaLog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing events called too often. Created 9 years, 4 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/base/media_log_event.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline_impl.cc
diff --git a/media/base/pipeline_impl.cc b/media/base/pipeline_impl.cc
index 0a88b2db609ea156a863596f8eade9e00e68a9fa..aa281d5f3950ab6adc58b60b82982be481899a79 100644
--- a/media/base/pipeline_impl.cc
+++ b/media/base/pipeline_impl.cc
@@ -473,6 +473,8 @@ void PipelineImpl::SetError(PipelineStatus error) {
message_loop_->PostTask(FROM_HERE,
NewRunnableMethod(this, &PipelineImpl::ErrorChangedTask, error));
+
+ media_log_->AddEvent(media_log_->CreatePipelineErrorEvent(error));
}
base::TimeDelta PipelineImpl::GetTime() const {
@@ -504,6 +506,10 @@ void PipelineImpl::SetTime(base::TimeDelta time) {
void PipelineImpl::SetDuration(base::TimeDelta duration) {
DCHECK(IsRunning());
+ media_log_->AddEvent(
+ media_log_->CreateTimeEvent(
+ MediaLogEvent::DURATION_SET, "duration", duration));
+
base::AutoLock auto_lock(lock_);
duration_ = duration;
}
@@ -516,6 +522,10 @@ void PipelineImpl::SetBufferedTime(base::TimeDelta buffered_time) {
void PipelineImpl::SetTotalBytes(int64 total_bytes) {
DCHECK(IsRunning());
+ media_log_->AddEvent(
+ media_log_->CreateIntegerEvent(
+ MediaLogEvent::TOTAL_BYTES_SET, "total_bytes", total_bytes));
+
base::AutoLock auto_lock(lock_);
total_bytes_ = total_bytes;
}
@@ -532,6 +542,8 @@ void PipelineImpl::SetBufferedBytes(int64 buffered_bytes) {
void PipelineImpl::SetVideoSize(size_t width, size_t height) {
DCHECK(IsRunning());
+ media_log_->AddEvent(media_log_->CreateVideoSizeSetEvent(width, height));
+
base::AutoLock auto_lock(lock_);
video_width_ = width;
video_height_ = height;
@@ -539,6 +551,10 @@ void PipelineImpl::SetVideoSize(size_t width, size_t height) {
void PipelineImpl::SetStreaming(bool streaming) {
DCHECK(IsRunning());
+ media_log_->AddEvent(
+ media_log_->CreateBooleanEvent(
+ MediaLogEvent::STREAMING_SET, "streaming", streaming));
+
base::AutoLock auto_lock(lock_);
streaming_ = streaming;
}
@@ -547,10 +563,15 @@ void PipelineImpl::NotifyEnded() {
DCHECK(IsRunning());
message_loop_->PostTask(FROM_HERE,
NewRunnableMethod(this, &PipelineImpl::NotifyEndedTask));
+ media_log_->AddEvent(media_log_->CreateEvent(MediaLogEvent::ENDED));
}
void PipelineImpl::SetLoaded(bool loaded) {
DCHECK(IsRunning());
+ media_log_->AddEvent(
+ media_log_->CreateBooleanEvent(
+ MediaLogEvent::LOADED_SET, "loaded", loaded));
+
base::AutoLock auto_lock(lock_);
loaded_ = loaded;
}
@@ -563,6 +584,10 @@ void PipelineImpl::SetNetworkActivity(bool network_activity) {
}
message_loop_->PostTask(FROM_HERE,
NewRunnableMethod(this, &PipelineImpl::NotifyNetworkEventTask));
+ media_log_->AddEvent(
+ media_log_->CreateBooleanEvent(
+ MediaLogEvent::NETWORK_ACTIVITY_SET,
+ "network_activity", network_activity));
}
void PipelineImpl::DisableAudioRenderer() {
@@ -571,6 +596,8 @@ void PipelineImpl::DisableAudioRenderer() {
// Disable renderer on the message loop.
message_loop_->PostTask(FROM_HERE,
NewRunnableMethod(this, &PipelineImpl::DisableAudioRendererTask));
+ media_log_->AddEvent(
+ media_log_->CreateEvent(MediaLogEvent::AUDIO_RENDERER_DISABLED));
}
// Called from any thread.
« no previous file with comments | « media/base/media_log_event.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698