Commit 97454ffa authored by henrika's avatar henrika Committed by Commit bot

Followup on "Improved logging for input streams"

BUG=405449

Review URL: https://codereview.chromium.org/524393002

Cr-Commit-Position: refs/heads/master@{#292904}
parent 913c504f
...@@ -193,7 +193,7 @@ void AudioInputRendererHost::DoCompleteCreation( ...@@ -193,7 +193,7 @@ void AudioInputRendererHost::DoCompleteCreation(
} }
LogMessage(entry->stream_id, LogMessage(entry->stream_id,
"DoCompleteCreation => IPC channel and stream are now open", "DoCompleteCreation: IPC channel and stream are now open",
true); true);
Send(new AudioInputMsg_NotifyStreamCreated(entry->stream_id, Send(new AudioInputMsg_NotifyStreamCreated(entry->stream_id,
...@@ -212,9 +212,8 @@ void AudioInputRendererHost::DoSendRecordingMessage( ...@@ -212,9 +212,8 @@ void AudioInputRendererHost::DoSendRecordingMessage(
NOTREACHED() << "AudioInputController is invalid."; NOTREACHED() << "AudioInputController is invalid.";
return; return;
} }
LogMessage(entry->stream_id, LogMessage(
"DoSendRecordingMessage => stream is now started", entry->stream_id, "DoSendRecordingMessage: stream is now started", true);
true);
} }
void AudioInputRendererHost::DoHandleError( void AudioInputRendererHost::DoHandleError(
...@@ -234,7 +233,7 @@ void AudioInputRendererHost::DoHandleError( ...@@ -234,7 +233,7 @@ void AudioInputRendererHost::DoHandleError(
if (error_code == media::AudioInputController::NO_DATA_ERROR) { if (error_code == media::AudioInputController::NO_DATA_ERROR) {
// TODO(henrika): it might be possible to do something other than just // TODO(henrika): it might be possible to do something other than just
// logging when we detect many NO_DATA_ERROR calls for a stream. // logging when we detect many NO_DATA_ERROR calls for a stream.
LogMessage(entry->stream_id, "AIC => NO_DATA_ERROR", false); LogMessage(entry->stream_id, "AIC::DoCheckForNoData: NO_DATA_ERROR", false);
return; return;
} }
...@@ -465,7 +464,7 @@ void AudioInputRendererHost::CloseAndDeleteStream(AudioEntry* entry) { ...@@ -465,7 +464,7 @@ void AudioInputRendererHost::CloseAndDeleteStream(AudioEntry* entry) {
void AudioInputRendererHost::DeleteEntry(AudioEntry* entry) { void AudioInputRendererHost::DeleteEntry(AudioEntry* entry) {
DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK_CURRENTLY_ON(BrowserThread::IO);
LogMessage(entry->stream_id, "DeleteEntry => stream is now closed", true); LogMessage(entry->stream_id, "DeleteEntry: stream is now closed", true);
// Delete the entry when this method goes out of scope. // Delete the entry when this method goes out of scope.
scoped_ptr<AudioEntry> entry_deleter(entry); scoped_ptr<AudioEntry> entry_deleter(entry);
......
...@@ -60,13 +60,13 @@ void AudioInputSyncWriter::Write(const media::AudioBus* data, ...@@ -60,13 +60,13 @@ void AudioInputSyncWriter::Write(const media::AudioBus* data,
if (last_write_time_.is_null()) { if (last_write_time_.is_null()) {
// This is the first time Write is called. // This is the first time Write is called.
base::TimeDelta interval = base::Time::Now() - creation_time_; base::TimeDelta interval = base::Time::Now() - creation_time_;
oss << "AISW::Write => audio input data received for the first time: delay " oss << "AISW::Write: audio input data received for the first time: delay "
"= " << interval.InMilliseconds() << "ms"; "= " << interval.InMilliseconds() << "ms";
} else { } else {
base::TimeDelta interval = base::Time::Now() - last_write_time_; base::TimeDelta interval = base::Time::Now() - last_write_time_;
if (interval > kLogDelayThreadhold) { if (interval > kLogDelayThreadhold) {
oss << "AISW::Write => audio input data delay unexpectedly long: delay = " oss << "AISW::Write: audio input data delay unexpectedly long: delay = "
<< interval.InMilliseconds() << "ms"; << interval.InMilliseconds() << "ms";
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment