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

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

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_selector.cc ('k') | media/filters/decoder_stream.cc » ('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 #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 <list> 8 #include <list>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 STATE_END_OF_STREAM, // End of stream reached; returns EOS on all reads. 133 STATE_END_OF_STREAM, // End of stream reached; returns EOS on all reads.
134 STATE_ERROR 134 STATE_ERROR
135 }; 135 };
136 136
137 void SelectDecoder(CdmContext* cdm_context); 137 void SelectDecoder(CdmContext* cdm_context);
138 138
139 // Called when |decoder_selector| selected the |selected_decoder|. 139 // Called when |decoder_selector| selected the |selected_decoder|.
140 // |decrypting_demuxer_stream| was also populated if a DecryptingDemuxerStream 140 // |decrypting_demuxer_stream| was also populated if a DecryptingDemuxerStream
141 // is created to help decrypt the encrypted stream. 141 // is created to help decrypt the encrypted stream.
142 void OnDecoderSelected( 142 void OnDecoderSelected(
143 scoped_ptr<Decoder> selected_decoder, 143 std::unique_ptr<Decoder> selected_decoder,
144 scoped_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream); 144 std::unique_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream);
145 145
146 // Satisfy pending |read_cb_| with |status| and |output|. 146 // Satisfy pending |read_cb_| with |status| and |output|.
147 void SatisfyRead(Status status, 147 void SatisfyRead(Status status,
148 const scoped_refptr<Output>& output); 148 const scoped_refptr<Output>& output);
149 149
150 // Decodes |buffer| and returns the result via OnDecodeOutputReady(). 150 // Decodes |buffer| and returns the result via OnDecodeOutputReady().
151 void Decode(const scoped_refptr<DecoderBuffer>& buffer); 151 void Decode(const scoped_refptr<DecoderBuffer>& buffer);
152 152
153 // Flushes the decoder with an EOS buffer to retrieve internally buffered 153 // Flushes the decoder with an EOS buffer to retrieve internally buffered
154 // decoder output. 154 // decoder output.
(...skipping 30 matching lines...) Expand all
185 185
186 StatisticsCB statistics_cb_; 186 StatisticsCB statistics_cb_;
187 InitCB init_cb_; 187 InitCB init_cb_;
188 base::Closure waiting_for_decryption_key_cb_; 188 base::Closure waiting_for_decryption_key_cb_;
189 189
190 ReadCB read_cb_; 190 ReadCB read_cb_;
191 base::Closure reset_cb_; 191 base::Closure reset_cb_;
192 192
193 DemuxerStream* stream_; 193 DemuxerStream* stream_;
194 194
195 scoped_ptr<DecoderSelector<StreamType> > decoder_selector_; 195 std::unique_ptr<DecoderSelector<StreamType>> decoder_selector_;
196 196
197 scoped_ptr<Decoder> decoder_; 197 std::unique_ptr<Decoder> decoder_;
198 // When falling back from H/W decoding to S/W decoding, destructing the 198 // When falling back from H/W decoding to S/W decoding, destructing the
199 // GpuVideoDecoder too early results in black frames being displayed. 199 // GpuVideoDecoder too early results in black frames being displayed.
200 // |previous_decoder_| is used to keep it alive. It is destroyed once we've 200 // |previous_decoder_| is used to keep it alive. It is destroyed once we've
201 // decoded at least media::limits::kMaxVideoFrames frames after fallback. 201 // decoded at least media::limits::kMaxVideoFrames frames after fallback.
202 int decoded_frames_since_fallback_; 202 int decoded_frames_since_fallback_;
203 scoped_ptr<Decoder> previous_decoder_; 203 std::unique_ptr<Decoder> previous_decoder_;
204 scoped_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream_; 204 std::unique_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream_;
205 205
206 SpliceObserverCB splice_observer_cb_; 206 SpliceObserverCB splice_observer_cb_;
207 ConfigChangeObserverCB config_change_observer_cb_; 207 ConfigChangeObserverCB config_change_observer_cb_;
208 208
209 // If a splice_timestamp() has been seen, this is true until a 209 // If a splice_timestamp() has been seen, this is true until a
210 // splice_timestamp() of kNoTimestamp() is encountered. 210 // splice_timestamp() of kNoTimestamp() is encountered.
211 bool active_splice_; 211 bool active_splice_;
212 212
213 // An end-of-stream buffer has been sent for decoding, no more buffers should 213 // An end-of-stream buffer has been sent for decoding, no more buffers should
214 // be sent for decoding until it completes. 214 // be sent for decoding until it completes.
(...skipping 19 matching lines...) Expand all
234 234
235 template <> 235 template <>
236 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const; 236 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const;
237 237
238 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; 238 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream;
239 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream; 239 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream;
240 240
241 } // namespace media 241 } // namespace media
242 242
243 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ 243 #endif // MEDIA_FILTERS_DECODER_STREAM_H_
OLDNEW
« no previous file with comments | « media/filters/decoder_selector.cc ('k') | media/filters/decoder_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698