OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/base/filters.h" | 5 #include "media/base/filters.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace media { | 9 namespace media { |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 DCHECK(!cb->is_null()); | 22 DCHECK(!cb->is_null()); |
23 base::Closure tmp_cb(*cb); | 23 base::Closure tmp_cb(*cb); |
24 cb->Reset(); | 24 cb->Reset(); |
25 tmp_cb.Run(); | 25 tmp_cb.Run(); |
26 } | 26 } |
27 | 27 |
28 Filter::Filter() : host_(NULL) {} | 28 Filter::Filter() : host_(NULL) {} |
29 | 29 |
30 Filter::~Filter() {} | 30 Filter::~Filter() {} |
31 | 31 |
32 void Filter::clear_host() { | |
33 DCHECK(host_); | |
34 host_ = NULL; | |
35 } | |
36 | |
37 void Filter::set_host(FilterHost* host) { | 32 void Filter::set_host(FilterHost* host) { |
38 DCHECK(host); | 33 DCHECK(host); |
39 DCHECK(!host_); | 34 DCHECK(!host_); |
40 host_ = host; | 35 host_ = host; |
41 } | 36 } |
42 | 37 |
43 FilterHost* Filter::host() { | 38 FilterHost* Filter::host() { |
44 return host_; | 39 return host_; |
45 } | 40 } |
46 | 41 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 75 |
81 AudioDecoder::AudioDecoder() {} | 76 AudioDecoder::AudioDecoder() {} |
82 | 77 |
83 AudioDecoder::~AudioDecoder() {} | 78 AudioDecoder::~AudioDecoder() {} |
84 | 79 |
85 void AudioDecoder::ConsumeAudioSamples(scoped_refptr<Buffer> buffer) { | 80 void AudioDecoder::ConsumeAudioSamples(scoped_refptr<Buffer> buffer) { |
86 consume_audio_samples_callback_.Run(buffer); | 81 consume_audio_samples_callback_.Run(buffer); |
87 } | 82 } |
88 | 83 |
89 } // namespace media | 84 } // namespace media |
OLD | NEW |