| 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 #ifndef MEDIA_FILTERS_DECODER_STREAM_H_ | 5 #ifndef MEDIA_FILTERS_DECODER_STREAM_H_ |
| 6 #define MEDIA_FILTERS_DECODER_STREAM_H_ | 6 #define MEDIA_FILTERS_DECODER_STREAM_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // Callback for Decoder reinitialization. | 131 // Callback for Decoder reinitialization. |
| 132 void OnDecoderReinitialized(PipelineStatus status); | 132 void OnDecoderReinitialized(PipelineStatus status); |
| 133 | 133 |
| 134 void ResetDecoder(); | 134 void ResetDecoder(); |
| 135 void OnDecoderReset(); | 135 void OnDecoderReset(); |
| 136 | 136 |
| 137 void StopDecoder(); | 137 void StopDecoder(); |
| 138 void OnDecoderStopped(); | 138 void OnDecoderStopped(); |
| 139 | 139 |
| 140 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 140 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 141 base::WeakPtrFactory<DecoderStream<StreamType> > weak_factory_; | |
| 142 | 141 |
| 143 State state_; | 142 State state_; |
| 144 | 143 |
| 145 StatisticsCB statistics_cb_; | 144 StatisticsCB statistics_cb_; |
| 146 InitCB init_cb_; | 145 InitCB init_cb_; |
| 147 | 146 |
| 148 ReadCB read_cb_; | 147 ReadCB read_cb_; |
| 149 base::Closure reset_cb_; | 148 base::Closure reset_cb_; |
| 150 base::Closure stop_cb_; | 149 base::Closure stop_cb_; |
| 151 | 150 |
| 152 DemuxerStream* stream_; | 151 DemuxerStream* stream_; |
| 153 | 152 |
| 154 scoped_ptr<DecoderSelector<StreamType> > decoder_selector_; | 153 scoped_ptr<DecoderSelector<StreamType> > decoder_selector_; |
| 155 | 154 |
| 156 // These two will be set by DecoderSelector::SelectDecoder(). | 155 // These two will be set by DecoderSelector::SelectDecoder(). |
| 157 scoped_ptr<Decoder> decoder_; | 156 scoped_ptr<Decoder> decoder_; |
| 158 scoped_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream_; | 157 scoped_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream_; |
| 159 | 158 |
| 159 // NOTE: This must always be last so it's invalidated before other member |
| 160 // variables might be accessed. |
| 161 base::WeakPtrFactory<DecoderStream<StreamType> > weak_factory_; |
| 162 |
| 160 // This is required so the VideoFrameStream can access private members in | 163 // This is required so the VideoFrameStream can access private members in |
| 161 // FinishInitialization() and ReportStatistics(). | 164 // FinishInitialization() and ReportStatistics(). |
| 162 DISALLOW_IMPLICIT_CONSTRUCTORS(DecoderStream); | 165 DISALLOW_IMPLICIT_CONSTRUCTORS(DecoderStream); |
| 163 }; | 166 }; |
| 164 | 167 |
| 165 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; | 168 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; |
| 166 | 169 |
| 167 } // namespace media | 170 } // namespace media |
| 168 | 171 |
| 169 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ | 172 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ |
| OLD | NEW |