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

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

Issue 2625333003: media: Always provide CdmContext when selecting decoder in DecoderStream (Closed)
Patch Set: rebase only Created 3 years, 11 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 <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <memory> 10 #include <memory>
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 enum State { 129 enum State {
130 STATE_UNINITIALIZED, 130 STATE_UNINITIALIZED,
131 STATE_INITIALIZING, 131 STATE_INITIALIZING,
132 STATE_NORMAL, // Includes idle, pending decoder decode/reset. 132 STATE_NORMAL, // Includes idle, pending decoder decode/reset.
133 STATE_FLUSHING_DECODER, 133 STATE_FLUSHING_DECODER,
134 STATE_REINITIALIZING_DECODER, 134 STATE_REINITIALIZING_DECODER,
135 STATE_END_OF_STREAM, // End of stream reached; returns EOS on all reads. 135 STATE_END_OF_STREAM, // End of stream reached; returns EOS on all reads.
136 STATE_ERROR, 136 STATE_ERROR,
137 }; 137 };
138 138
139 void SelectDecoder(CdmContext* cdm_context); 139 void SelectDecoder();
140 140
141 // Called when |decoder_selector| selected the |selected_decoder|. 141 // Called when |decoder_selector| selected the |selected_decoder|.
142 // |decrypting_demuxer_stream| was also populated if a DecryptingDemuxerStream 142 // |decrypting_demuxer_stream| was also populated if a DecryptingDemuxerStream
143 // is created to help decrypt the encrypted stream. 143 // is created to help decrypt the encrypted stream.
144 void OnDecoderSelected( 144 void OnDecoderSelected(
145 std::unique_ptr<Decoder> selected_decoder, 145 std::unique_ptr<Decoder> selected_decoder,
146 std::unique_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream); 146 std::unique_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream);
147 147
148 // Satisfy pending |read_cb_| with |status| and |output|. 148 // Satisfy pending |read_cb_| with |status| and |output|.
149 void SatisfyRead(Status status, 149 void SatisfyRead(Status status,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 StatisticsCB statistics_cb_; 194 StatisticsCB statistics_cb_;
195 InitCB init_cb_; 195 InitCB init_cb_;
196 base::Closure waiting_for_decryption_key_cb_; 196 base::Closure waiting_for_decryption_key_cb_;
197 197
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_;
204
203 std::unique_ptr<DecoderSelector<StreamType>> decoder_selector_; 205 std::unique_ptr<DecoderSelector<StreamType>> decoder_selector_;
204 206
205 std::unique_ptr<Decoder> decoder_; 207 std::unique_ptr<Decoder> decoder_;
206 // When falling back from H/W decoding to S/W decoding, destructing the 208 // When falling back from H/W decoding to S/W decoding, destructing the
207 // GpuVideoDecoder too early results in black frames being displayed. 209 // GpuVideoDecoder too early results in black frames being displayed.
208 // |previous_decoder_| is used to keep it alive. It is destroyed once we've 210 // |previous_decoder_| is used to keep it alive. It is destroyed once we've
209 // decoded at least media::limits::kMaxVideoFrames frames after fallback. 211 // decoded at least media::limits::kMaxVideoFrames frames after fallback.
210 int decoded_frames_since_fallback_; 212 int decoded_frames_since_fallback_;
211 std::unique_ptr<Decoder> previous_decoder_; 213 std::unique_ptr<Decoder> previous_decoder_;
212 std::unique_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream_; 214 std::unique_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream_;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 260
259 template <> 261 template <>
260 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const; 262 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const;
261 263
262 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; 264 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream;
263 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream; 265 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream;
264 266
265 } // namespace media 267 } // namespace media
266 268
267 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ 269 #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