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

Side by Side Diff: media/filters/ffmpeg_audio_decoder.cc

Issue 547913002: MediaLog: Log selected audio/video decoder name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use property instead of log. Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/filters/ffmpeg_audio_decoder.h" 5 #include "media/filters/ffmpeg_audio_decoder.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "media/base/audio_buffer.h" 9 #include "media/base/audio_buffer.h"
10 #include "media/base/audio_bus.h" 10 #include "media/base/audio_bus.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 FFmpegAudioDecoder::~FFmpegAudioDecoder() { 137 FFmpegAudioDecoder::~FFmpegAudioDecoder() {
138 DCHECK(task_runner_->BelongsToCurrentThread()); 138 DCHECK(task_runner_->BelongsToCurrentThread());
139 139
140 if (state_ != kUninitialized) { 140 if (state_ != kUninitialized) {
141 ReleaseFFmpegResources(); 141 ReleaseFFmpegResources();
142 ResetTimestampState(); 142 ResetTimestampState();
143 } 143 }
144 } 144 }
145 145
146 std::string FFmpegAudioDecoder::GetDisplayName() const {
147 return "FFmpegAudioDecoder";
148 }
149
146 void FFmpegAudioDecoder::Initialize(const AudioDecoderConfig& config, 150 void FFmpegAudioDecoder::Initialize(const AudioDecoderConfig& config,
147 const PipelineStatusCB& status_cb, 151 const PipelineStatusCB& status_cb,
148 const OutputCB& output_cb) { 152 const OutputCB& output_cb) {
149 DCHECK(task_runner_->BelongsToCurrentThread()); 153 DCHECK(task_runner_->BelongsToCurrentThread());
150 DCHECK(!config.is_encrypted()); 154 DCHECK(!config.is_encrypted());
151 155
152 FFmpegGlue::InitializeFFmpeg(); 156 FFmpegGlue::InitializeFFmpeg();
153 157
154 config_ = config; 158 config_ = config;
155 PipelineStatusCB initialize_cb = BindToCurrentLoop(status_cb); 159 PipelineStatusCB initialize_cb = BindToCurrentLoop(status_cb);
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 388
385 ResetTimestampState(); 389 ResetTimestampState();
386 return true; 390 return true;
387 } 391 }
388 392
389 void FFmpegAudioDecoder::ResetTimestampState() { 393 void FFmpegAudioDecoder::ResetTimestampState() {
390 discard_helper_->Reset(config_.codec_delay()); 394 discard_helper_->Reset(config_.codec_delay());
391 } 395 }
392 396
393 } // namespace media 397 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698