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

Side by Side Diff: chromecast/media/cma/decoder/cast_audio_decoder_linux.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 | « no previous file | content/common/gpu/media/video_encode_accelerator_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chromecast/media/cma/decoder/cast_audio_decoder.h" 5 #include "chromecast/media/cma/decoder/cast_audio_decoder.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <limits> 8 #include <limits>
9 #include <queue> 9 #include <queue>
10 #include <utility> 10 #include <utility>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 config_.extra_data.assign( 84 config_.extra_data.assign(
85 kFakeOpusExtraData, 85 kFakeOpusExtraData,
86 kFakeOpusExtraData + sizeof(kFakeOpusExtraData)); 86 kFakeOpusExtraData + sizeof(kFakeOpusExtraData));
87 decoder_.reset(new ::media::OpusAudioDecoder(task_runner_)); 87 decoder_.reset(new ::media::OpusAudioDecoder(task_runner_));
88 } else { 88 } else {
89 decoder_.reset(new ::media::FFmpegAudioDecoder( 89 decoder_.reset(new ::media::FFmpegAudioDecoder(
90 task_runner_, make_scoped_refptr(new ::media::MediaLog()))); 90 task_runner_, make_scoped_refptr(new ::media::MediaLog())));
91 } 91 }
92 decoder_->Initialize( 92 decoder_->Initialize(
93 media::DecoderConfigAdapter::ToMediaAudioDecoderConfig(config_), 93 media::DecoderConfigAdapter::ToMediaAudioDecoderConfig(config_),
94 ::media::SetCdmReadyCB(), 94 nullptr, base::Bind(&CastAudioDecoderImpl::OnInitialized, self),
95 base::Bind(&CastAudioDecoderImpl::OnInitialized, self),
96 base::Bind(&CastAudioDecoderImpl::OnDecoderOutput, self)); 95 base::Bind(&CastAudioDecoderImpl::OnDecoderOutput, self));
97 // Unfortunately there is no result from decoder_->Initialize() until later 96 // Unfortunately there is no result from decoder_->Initialize() until later
98 // (the pipeline status callback is posted to the task runner). 97 // (the pipeline status callback is posted to the task runner).
99 } 98 }
100 99
101 // CastAudioDecoder implementation: 100 // CastAudioDecoder implementation:
102 bool Decode(const scoped_refptr<media::DecoderBufferBase>& data, 101 bool Decode(const scoped_refptr<media::DecoderBufferBase>& data,
103 const DecodeCallback& decode_callback) override { 102 const DecodeCallback& decode_callback) override {
104 DCHECK(!decode_callback.is_null()); 103 DCHECK(!decode_callback.is_null());
105 DCHECK(task_runner_->BelongsToCurrentThread()); 104 DCHECK(task_runner_->BelongsToCurrentThread());
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 return 2; 289 return 2;
291 case CastAudioDecoder::OutputFormat::kOutputPlanarFloat: 290 case CastAudioDecoder::OutputFormat::kOutputPlanarFloat:
292 return 4; 291 return 4;
293 } 292 }
294 NOTREACHED(); 293 NOTREACHED();
295 return 1; 294 return 1;
296 } 295 }
297 296
298 } // namespace media 297 } // namespace media
299 } // namespace chromecast 298 } // namespace chromecast
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/media/video_encode_accelerator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698