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

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

Issue 2543623003: media: Allow config change between clear and encrypted streams (Closed)
Patch Set: comments addressed Created 3 years, 10 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
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 <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <memory> 10 #include <memory>
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 ReadCB read_cb_; 198 ReadCB read_cb_;
199 base::Closure reset_cb_; 199 base::Closure reset_cb_;
200 200
201 DemuxerStream* stream_; 201 DemuxerStream* stream_;
202 202
203 CdmContext* cdm_context_; 203 CdmContext* cdm_context_;
204 204
205 std::unique_ptr<DecoderSelector<StreamType>> decoder_selector_; 205 std::unique_ptr<DecoderSelector<StreamType>> decoder_selector_;
206 206
207 std::unique_ptr<Decoder> decoder_; 207 std::unique_ptr<Decoder> decoder_;
208
208 // When falling back from H/W decoding to S/W decoding, destructing the 209 // When falling back from H/W decoding to S/W decoding, destructing the
209 // GpuVideoDecoder too early results in black frames being displayed. 210 // GpuVideoDecoder too early results in black frames being displayed.
210 // |previous_decoder_| is used to keep it alive. It is destroyed once we've 211 // |previous_decoder_| is used to keep it alive. It is destroyed once we've
211 // decoded at least media::limits::kMaxVideoFrames frames after fallback. 212 // decoded at least media::limits::kMaxVideoFrames frames after fallback.
212 int decoded_frames_since_fallback_; 213 int decoded_frames_since_fallback_;
213 std::unique_ptr<Decoder> previous_decoder_; 214 std::unique_ptr<Decoder> previous_decoder_;
215
214 std::unique_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream_; 216 std::unique_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream_;
215 217
216 ConfigChangeObserverCB config_change_observer_cb_; 218 ConfigChangeObserverCB config_change_observer_cb_;
217 219
218 // An end-of-stream buffer has been sent for decoding, no more buffers should 220 // An end-of-stream buffer has been sent for decoding, no more buffers should
219 // be sent for decoding until it completes. 221 // be sent for decoding until it completes.
220 // TODO(sandersd): Turn this into a State. http://crbug.com/408316 222 // TODO(sandersd): Turn this into a State. http://crbug.com/408316
221 bool decoding_eos_; 223 bool decoding_eos_;
222 224
223 // Decoded buffers that haven't been read yet. Used when the decoder supports 225 // Decoded buffers that haven't been read yet. Used when the decoder supports
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 262
261 template <> 263 template <>
262 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const; 264 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const;
263 265
264 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; 266 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream;
265 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream; 267 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream;
266 268
267 } // namespace media 269 } // namespace media
268 270
269 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ 271 #endif // MEDIA_FILTERS_DECODER_STREAM_H_
OLDNEW
« no previous file with comments | « media/cdm/ppapi/external_clear_key/clear_key_cdm.cc ('k') | media/filters/decrypting_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698