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

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

Issue 1442933002: media: Pass SetCdmReadyCB in {Audio|Video}Decoder::Initialize(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile errors Created 5 years, 1 month 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
« no previous file with comments | « media/filters/ffmpeg_audio_decoder.h ('k') | media/filters/ffmpeg_video_decoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 if (state_ != kUninitialized) 140 if (state_ != kUninitialized)
141 ReleaseFFmpegResources(); 141 ReleaseFFmpegResources();
142 } 142 }
143 143
144 std::string FFmpegAudioDecoder::GetDisplayName() const { 144 std::string FFmpegAudioDecoder::GetDisplayName() const {
145 return "FFmpegAudioDecoder"; 145 return "FFmpegAudioDecoder";
146 } 146 }
147 147
148 void FFmpegAudioDecoder::Initialize(const AudioDecoderConfig& config, 148 void FFmpegAudioDecoder::Initialize(const AudioDecoderConfig& config,
149 const SetCdmReadyCB& /* set_cdm_ready_cb */,
149 const InitCB& init_cb, 150 const InitCB& init_cb,
150 const OutputCB& output_cb) { 151 const OutputCB& output_cb) {
151 DCHECK(task_runner_->BelongsToCurrentThread()); 152 DCHECK(task_runner_->BelongsToCurrentThread());
152 DCHECK(config.IsValidConfig()); 153 DCHECK(config.IsValidConfig());
153 154
154 InitCB bound_init_cb = BindToCurrentLoop(init_cb); 155 InitCB bound_init_cb = BindToCurrentLoop(init_cb);
155 156
156 if (config.is_encrypted()) { 157 if (config.is_encrypted()) {
157 bound_init_cb.Run(false); 158 bound_init_cb.Run(false);
158 return; 159 return;
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 return true; 384 return true;
384 } 385 }
385 386
386 void FFmpegAudioDecoder::ResetTimestampState() { 387 void FFmpegAudioDecoder::ResetTimestampState() {
387 discard_helper_.reset(new AudioDiscardHelper(config_.samples_per_second(), 388 discard_helper_.reset(new AudioDiscardHelper(config_.samples_per_second(),
388 config_.codec_delay())); 389 config_.codec_delay()));
389 discard_helper_->Reset(config_.codec_delay()); 390 discard_helper_->Reset(config_.codec_delay());
390 } 391 }
391 392
392 } // namespace media 393 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_audio_decoder.h ('k') | media/filters/ffmpeg_video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698