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

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

Issue 1446713003: Revert of media: Pass SetCdmReadyCB in {Audio|Video}Decoder::Initialize(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 */,
150 const InitCB& init_cb, 149 const InitCB& init_cb,
151 const OutputCB& output_cb) { 150 const OutputCB& output_cb) {
152 DCHECK(task_runner_->BelongsToCurrentThread()); 151 DCHECK(task_runner_->BelongsToCurrentThread());
153 DCHECK(config.IsValidConfig()); 152 DCHECK(config.IsValidConfig());
154 153
155 InitCB bound_init_cb = BindToCurrentLoop(init_cb); 154 InitCB bound_init_cb = BindToCurrentLoop(init_cb);
156 155
157 if (config.is_encrypted()) { 156 if (config.is_encrypted()) {
158 bound_init_cb.Run(false); 157 bound_init_cb.Run(false);
159 return; 158 return;
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 return true; 383 return true;
385 } 384 }
386 385
387 void FFmpegAudioDecoder::ResetTimestampState() { 386 void FFmpegAudioDecoder::ResetTimestampState() {
388 discard_helper_.reset(new AudioDiscardHelper(config_.samples_per_second(), 387 discard_helper_.reset(new AudioDiscardHelper(config_.samples_per_second(),
389 config_.codec_delay())); 388 config_.codec_delay()));
390 discard_helper_->Reset(config_.codec_delay()); 389 discard_helper_->Reset(config_.codec_delay());
391 } 390 }
392 391
393 } // namespace media 392 } // 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