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

Unified Diff: media/formats/webm/webm_audio_client.cc

Issue 1235793005: Deprecate LogCB in favor of using MediaLog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and attempt to fix Android compilation Created 5 years, 5 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/formats/webm/webm_audio_client.h ('k') | media/formats/webm/webm_cluster_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/webm/webm_audio_client.cc
diff --git a/media/formats/webm/webm_audio_client.cc b/media/formats/webm/webm_audio_client.cc
index ea911ec290e8f3a3d28501c4916aefeb7912e6ac..90ac4a8ac4ca6bfca764533e998d10f55c3336a7 100644
--- a/media/formats/webm/webm_audio_client.cc
+++ b/media/formats/webm/webm_audio_client.cc
@@ -10,8 +10,8 @@
namespace media {
-WebMAudioClient::WebMAudioClient(const LogCB& log_cb)
- : log_cb_(log_cb) {
+WebMAudioClient::WebMAudioClient(const scoped_refptr<MediaLog>& media_log)
+ : media_log_(media_log) {
Reset();
}
@@ -37,7 +37,7 @@ bool WebMAudioClient::InitializeConfig(
} else if (codec_id == "A_OPUS") {
audio_codec = kCodecOpus;
} else {
- MEDIA_LOG(ERROR, log_cb_) << "Unsupported audio codec_id " << codec_id;
+ MEDIA_LOG(ERROR, media_log_) << "Unsupported audio codec_id " << codec_id;
return false;
}
@@ -51,7 +51,7 @@ bool WebMAudioClient::InitializeConfig(
ChannelLayout channel_layout = GuessChannelLayout(channels_);
if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED) {
- MEDIA_LOG(ERROR, log_cb_) << "Unsupported channel count " << channels_;
+ MEDIA_LOG(ERROR, media_log_) << "Unsupported channel count " << channels_;
return false;
}
@@ -100,9 +100,9 @@ bool WebMAudioClient::InitializeConfig(
bool WebMAudioClient::OnUInt(int id, int64 val) {
if (id == kWebMIdChannels) {
if (channels_ != -1) {
- MEDIA_LOG(ERROR, log_cb_) << "Multiple values for id " << std::hex << id
- << " specified. (" << channels_ << " and "
- << val << ")";
+ MEDIA_LOG(ERROR, media_log_) << "Multiple values for id " << std::hex
+ << id << " specified. (" << channels_
+ << " and " << val << ")";
return false;
}
@@ -129,9 +129,9 @@ bool WebMAudioClient::OnFloat(int id, double val) {
return false;
if (*dst != -1) {
- MEDIA_LOG(ERROR, log_cb_) << "Multiple values for id " << std::hex << id
- << " specified (" << *dst << " and " << val
- << ")";
+ MEDIA_LOG(ERROR, media_log_) << "Multiple values for id " << std::hex << id
+ << " specified (" << *dst << " and " << val
+ << ")";
return false;
}
« no previous file with comments | « media/formats/webm/webm_audio_client.h ('k') | media/formats/webm/webm_cluster_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698