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_stream.h" | 5 #include "media/filters/decoder_stream.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 task_runner_->PostTask(FROM_HERE, | 67 task_runner_->PostTask(FROM_HERE, |
68 base::Bind(base::ResetAndReturn(&init_cb_), false)); | 68 base::Bind(base::ResetAndReturn(&init_cb_), false)); |
69 } | 69 } |
70 if (!read_cb_.is_null()) { | 70 if (!read_cb_.is_null()) { |
71 task_runner_->PostTask(FROM_HERE, base::Bind( | 71 task_runner_->PostTask(FROM_HERE, base::Bind( |
72 base::ResetAndReturn(&read_cb_), ABORTED, scoped_refptr<Output>())); | 72 base::ResetAndReturn(&read_cb_), ABORTED, scoped_refptr<Output>())); |
73 } | 73 } |
74 if (!reset_cb_.is_null()) | 74 if (!reset_cb_.is_null()) |
75 task_runner_->PostTask(FROM_HERE, base::ResetAndReturn(&reset_cb_)); | 75 task_runner_->PostTask(FROM_HERE, base::ResetAndReturn(&reset_cb_)); |
76 | 76 |
77 if (decrypting_demuxer_stream_) | |
78 decrypting_demuxer_stream_->Stop(); | |
79 | |
80 stream_ = NULL; | 77 stream_ = NULL; |
81 decoder_.reset(); | 78 decoder_.reset(); |
82 decrypting_demuxer_stream_.reset(); | 79 decrypting_demuxer_stream_.reset(); |
83 } | 80 } |
84 | 81 |
85 template <DemuxerStream::Type StreamType> | 82 template <DemuxerStream::Type StreamType> |
86 void DecoderStream<StreamType>::Initialize(DemuxerStream* stream, | 83 void DecoderStream<StreamType>::Initialize(DemuxerStream* stream, |
87 bool low_delay, | 84 bool low_delay, |
88 const StatisticsCB& statistics_cb, | 85 const StatisticsCB& statistics_cb, |
89 const InitCB& init_cb) { | 86 const InitCB& init_cb) { |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 } | 532 } |
536 | 533 |
537 // The resetting process will be continued in OnDecoderReinitialized(). | 534 // The resetting process will be continued in OnDecoderReinitialized(). |
538 ReinitializeDecoder(); | 535 ReinitializeDecoder(); |
539 } | 536 } |
540 | 537 |
541 template class DecoderStream<DemuxerStream::VIDEO>; | 538 template class DecoderStream<DemuxerStream::VIDEO>; |
542 template class DecoderStream<DemuxerStream::AUDIO>; | 539 template class DecoderStream<DemuxerStream::AUDIO>; |
543 | 540 |
544 } // namespace media | 541 } // namespace media |
OLD | NEW |