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

Unified Diff: media/filters/ffmpeg_audio_decoder.cc

Issue 276503002: Log codec IDs for MediaSource content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/ffmpeg_audio_decoder_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 5c9a29c203177e9e46262d547a01c1bd726a8f7d..8af3fc2c4da45fc8fab81d2cdfa3b7c7442b8c37 100644
--- a/media/filters/ffmpeg_audio_decoder.cc
+++ b/media/filters/ffmpeg_audio_decoder.cc
@@ -126,8 +126,12 @@ static int GetAudioBuffer(struct AVCodecContext* s, AVFrame* frame, int flags) {
}
FFmpegAudioDecoder::FFmpegAudioDecoder(
- const scoped_refptr<base::SingleThreadTaskRunner>& task_runner)
- : task_runner_(task_runner), state_(kUninitialized), av_sample_format_(0) {
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
+ const LogCB& log_cb)
+ : task_runner_(task_runner),
+ state_(kUninitialized),
+ av_sample_format_(0),
+ log_cb_(log_cb) {
}
FFmpegAudioDecoder::~FFmpegAudioDecoder() {
@@ -351,6 +355,12 @@ bool FFmpegAudioDecoder::FFmpegDecode(
<< ", Sample Format: " << av_frame_->format << " vs "
<< av_sample_format_;
+ if ((config_.codec() == kCodecAAC) &&
+ av_frame_->sample_rate == 2 * config_.samples_per_second()) {
scherkus (not reviewing) 2014/05/08 00:26:14 nit: it's funny you put the ()'s around the simple
acolwell GONE FROM CHROMIUM 2014/05/08 00:57:01 Yeah. Not sure why I did that. () removed.
+ MEDIA_LOG(log_cb_) << "Implicit HE-AAC signalling is being used."
scherkus (not reviewing) 2014/05/07 20:25:53 should this be moved closer to MSE code instead of
acolwell GONE FROM CHROMIUM 2014/05/07 20:47:45 We can't. Implict signalling of HE-AAC can only be
+ << " Please use mp4a.40.5 instead of mp4a.40.2 in"
+ << " the mimetype.";
+ }
// This is an unrecoverable error, so bail out.
queued_audio_.clear();
av_frame_unref(av_frame_.get());
« no previous file with comments | « media/filters/ffmpeg_audio_decoder.h ('k') | media/filters/ffmpeg_audio_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698