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

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

Issue 1666653002: media: Remove SetCdmReadyCB and CdmReadyCB (part 1). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and fix compile errors Created 4 years, 10 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
« no previous file with comments | « media/filters/opus_audio_decoder.h ('k') | media/filters/video_decoder_selector_unittest.cc » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/opus_audio_decoder.h" 5 #include "media/filters/opus_audio_decoder.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <cmath> 10 #include <cmath>
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 OpusAudioDecoder::OpusAudioDecoder( 132 OpusAudioDecoder::OpusAudioDecoder(
133 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) 133 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner)
134 : task_runner_(task_runner), opus_decoder_(nullptr) {} 134 : task_runner_(task_runner), opus_decoder_(nullptr) {}
135 135
136 std::string OpusAudioDecoder::GetDisplayName() const { 136 std::string OpusAudioDecoder::GetDisplayName() const {
137 return "OpusAudioDecoder"; 137 return "OpusAudioDecoder";
138 } 138 }
139 139
140 void OpusAudioDecoder::Initialize(const AudioDecoderConfig& config, 140 void OpusAudioDecoder::Initialize(const AudioDecoderConfig& config,
141 const SetCdmReadyCB& /* set_cdm_ready_cb */, 141 CdmContext* /* cdm_context */,
142 const InitCB& init_cb, 142 const InitCB& init_cb,
143 const OutputCB& output_cb) { 143 const OutputCB& output_cb) {
144 DCHECK(task_runner_->BelongsToCurrentThread()); 144 DCHECK(task_runner_->BelongsToCurrentThread());
145 InitCB bound_init_cb = BindToCurrentLoop(init_cb); 145 InitCB bound_init_cb = BindToCurrentLoop(init_cb);
146 146
147 if (config.is_encrypted()) { 147 if (config.is_encrypted()) {
148 bound_init_cb.Run(false); 148 bound_init_cb.Run(false);
149 return; 149 return;
150 } 150 }
151 151
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 output_buffer->get()->TrimEnd(trim_frames); 359 output_buffer->get()->TrimEnd(trim_frames);
360 360
361 // Handles discards and timestamping. Discard the buffer if more data needed. 361 // Handles discards and timestamping. Discard the buffer if more data needed.
362 if (!discard_helper_->ProcessBuffers(input, *output_buffer)) 362 if (!discard_helper_->ProcessBuffers(input, *output_buffer))
363 *output_buffer = nullptr; 363 *output_buffer = nullptr;
364 364
365 return true; 365 return true;
366 } 366 }
367 367
368 } // namespace media 368 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/opus_audio_decoder.h ('k') | media/filters/video_decoder_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698