| OLD | NEW |
| 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_selector.h" | 5 #include "media/filters/decoder_selector.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 26 matching lines...) Expand all Loading... |
| 37 case DemuxerStream::UNKNOWN: | 37 case DemuxerStream::UNKNOWN: |
| 38 NOTREACHED(); | 38 NOTREACHED(); |
| 39 } | 39 } |
| 40 return false; | 40 return false; |
| 41 } | 41 } |
| 42 | 42 |
| 43 template <DemuxerStream::Type StreamType> | 43 template <DemuxerStream::Type StreamType> |
| 44 DecoderSelector<StreamType>::DecoderSelector( | 44 DecoderSelector<StreamType>::DecoderSelector( |
| 45 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 45 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
| 46 ScopedVector<Decoder> decoders, | 46 ScopedVector<Decoder> decoders, |
| 47 const scoped_refptr<MediaLog>& media_log) | 47 MediaLog* media_log) |
| 48 : task_runner_(task_runner), | 48 : task_runner_(task_runner), |
| 49 decoders_(std::move(decoders)), | 49 decoders_(std::move(decoders)), |
| 50 media_log_(media_log), | 50 media_log_(media_log), |
| 51 input_stream_(nullptr), | 51 input_stream_(nullptr), |
| 52 weak_ptr_factory_(this) {} | 52 weak_ptr_factory_(this) {} |
| 53 | 53 |
| 54 template <DemuxerStream::Type StreamType> | 54 template <DemuxerStream::Type StreamType> |
| 55 DecoderSelector<StreamType>::~DecoderSelector() { | 55 DecoderSelector<StreamType>::~DecoderSelector() { |
| 56 DVLOG(2) << __func__; | 56 DVLOG(2) << __func__; |
| 57 DCHECK(task_runner_->BelongsToCurrentThread()); | 57 DCHECK(task_runner_->BelongsToCurrentThread()); |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 239 |
| 240 // These forward declarations tell the compiler that we will use | 240 // These forward declarations tell the compiler that we will use |
| 241 // DecoderSelector with these arguments, allowing us to keep these definitions | 241 // DecoderSelector with these arguments, allowing us to keep these definitions |
| 242 // in our .cc without causing linker errors. This also means if anyone tries to | 242 // in our .cc without causing linker errors. This also means if anyone tries to |
| 243 // instantiate a DecoderSelector with anything but these two specializations | 243 // instantiate a DecoderSelector with anything but these two specializations |
| 244 // they'll most likely get linker errors. | 244 // they'll most likely get linker errors. |
| 245 template class DecoderSelector<DemuxerStream::AUDIO>; | 245 template class DecoderSelector<DemuxerStream::AUDIO>; |
| 246 template class DecoderSelector<DemuxerStream::VIDEO>; | 246 template class DecoderSelector<DemuxerStream::VIDEO>; |
| 247 | 247 |
| 248 } // namespace media | 248 } // namespace media |
| OLD | NEW |