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

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

Issue 1904213003: Convert //media/filters from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove include Created 4 years, 8 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/decoder_stream.h ('k') | media/filters/decrypting_audio_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/decoder_stream.h" 5 #include "media/filters/decoder_stream.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 stream_, cdm_context, 230 stream_, cdm_context,
231 base::Bind(&DecoderStream<StreamType>::OnDecoderSelected, 231 base::Bind(&DecoderStream<StreamType>::OnDecoderSelected,
232 weak_factory_.GetWeakPtr()), 232 weak_factory_.GetWeakPtr()),
233 base::Bind(&DecoderStream<StreamType>::OnDecodeOutputReady, 233 base::Bind(&DecoderStream<StreamType>::OnDecodeOutputReady,
234 weak_factory_.GetWeakPtr()), 234 weak_factory_.GetWeakPtr()),
235 waiting_for_decryption_key_cb_); 235 waiting_for_decryption_key_cb_);
236 } 236 }
237 237
238 template <DemuxerStream::Type StreamType> 238 template <DemuxerStream::Type StreamType>
239 void DecoderStream<StreamType>::OnDecoderSelected( 239 void DecoderStream<StreamType>::OnDecoderSelected(
240 scoped_ptr<Decoder> selected_decoder, 240 std::unique_ptr<Decoder> selected_decoder,
241 scoped_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream) { 241 std::unique_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream) {
242 FUNCTION_DVLOG(2) << ": " 242 FUNCTION_DVLOG(2) << ": "
243 << (selected_decoder ? selected_decoder->GetDisplayName() 243 << (selected_decoder ? selected_decoder->GetDisplayName()
244 : "No decoder selected."); 244 : "No decoder selected.");
245 DCHECK(task_runner_->BelongsToCurrentThread()); 245 DCHECK(task_runner_->BelongsToCurrentThread());
246 DCHECK(state_ == STATE_INITIALIZING || state_ == STATE_REINITIALIZING_DECODER) 246 DCHECK(state_ == STATE_INITIALIZING || state_ == STATE_REINITIALIZING_DECODER)
247 << state_; 247 << state_;
248 if (state_ == STATE_INITIALIZING) { 248 if (state_ == STATE_INITIALIZING) {
249 DCHECK(!init_cb_.is_null()); 249 DCHECK(!init_cb_.is_null());
250 DCHECK(read_cb_.is_null()); 250 DCHECK(read_cb_.is_null());
251 DCHECK(reset_cb_.is_null()); 251 DCHECK(reset_cb_.is_null());
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 } 619 }
620 620
621 // The resetting process will be continued in OnDecoderReinitialized(). 621 // The resetting process will be continued in OnDecoderReinitialized().
622 ReinitializeDecoder(); 622 ReinitializeDecoder();
623 } 623 }
624 624
625 template class DecoderStream<DemuxerStream::VIDEO>; 625 template class DecoderStream<DemuxerStream::VIDEO>;
626 template class DecoderStream<DemuxerStream::AUDIO>; 626 template class DecoderStream<DemuxerStream::AUDIO>;
627 627
628 } // namespace media 628 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/decoder_stream.h ('k') | media/filters/decrypting_audio_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698