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

Unified Diff: media/filters/ffmpeg_audio_decoder.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/filters/ffmpeg_audio_decoder.h ('k') | media/filters/frame_processor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_audio_decoder.cc
diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc
index 22a907b621beeb0862f49572001d6cad3da13d74..318c2ee0d8ecfc35f25f08990c6506f9460b1eb6 100644
--- a/media/filters/ffmpeg_audio_decoder.cc
+++ b/media/filters/ffmpeg_audio_decoder.cc
@@ -126,11 +126,11 @@ static int GetAudioBuffer(struct AVCodecContext* s, AVFrame* frame, int flags) {
FFmpegAudioDecoder::FFmpegAudioDecoder(
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
- const LogCB& log_cb)
+ const scoped_refptr<MediaLog>& media_log)
: task_runner_(task_runner),
state_(kUninitialized),
av_sample_format_(0),
- log_cb_(log_cb) {
+ media_log_(media_log) {
}
FFmpegAudioDecoder::~FFmpegAudioDecoder() {
@@ -262,7 +262,7 @@ bool FFmpegAudioDecoder::FFmpegDecode(
<< "This is quite possibly a bug in the audio decoder not handling "
<< "end of stream AVPackets correctly.";
- MEDIA_LOG(DEBUG, log_cb_)
+ MEDIA_LOG(DEBUG, media_log_)
<< "Dropping audio frame which failed decode with timestamp: "
<< buffer->timestamp().InMicroseconds()
<< " us, duration: " << buffer->duration().InMicroseconds()
@@ -292,9 +292,10 @@ bool FFmpegAudioDecoder::FFmpegDecode(
if (config_.codec() == kCodecAAC &&
av_frame_->sample_rate == 2 * config_.samples_per_second()) {
- MEDIA_LOG(DEBUG, log_cb_) << "Implicit HE-AAC signalling is being"
- << " used. Please use mp4a.40.5 instead of"
- << " mp4a.40.2 in the mimetype.";
+ MEDIA_LOG(DEBUG, media_log_)
+ << "Implicit HE-AAC signalling is being"
+ << " used. Please use mp4a.40.5 instead of"
+ << " mp4a.40.2 in the mimetype.";
}
// This is an unrecoverable error, so bail out.
av_frame_unref(av_frame_.get());
« no previous file with comments | « media/filters/ffmpeg_audio_decoder.h ('k') | media/filters/frame_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698