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

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

Issue 935243002: Decryptors can report kNoKey to WebMediaPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android changes Created 5 years, 9 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 "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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 54 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
55 ScopedVector<Decoder> decoders, 55 ScopedVector<Decoder> decoders,
56 const scoped_refptr<MediaLog>& media_log); 56 const scoped_refptr<MediaLog>& media_log);
57 virtual ~DecoderStream(); 57 virtual ~DecoderStream();
58 58
59 // Initializes the DecoderStream and returns the initialization result 59 // Initializes the DecoderStream and returns the initialization result
60 // through |init_cb|. Note that |init_cb| is always called asynchronously. 60 // through |init_cb|. Note that |init_cb| is always called asynchronously.
61 void Initialize(DemuxerStream* stream, 61 void Initialize(DemuxerStream* stream,
62 const InitCB& init_cb, 62 const InitCB& init_cb,
63 const SetDecryptorReadyCB& set_decryptor_ready_cb, 63 const SetDecryptorReadyCB& set_decryptor_ready_cb,
64 const StatisticsCB& statistics_cb); 64 const StatisticsCB& statistics_cb,
65 const base::Closure& waiting_for_decryption_key_cb);
65 66
66 // Reads a decoded Output and returns it via the |read_cb|. Note that 67 // Reads a decoded Output and returns it via the |read_cb|. Note that
67 // |read_cb| is always called asynchronously. This method should only be 68 // |read_cb| is always called asynchronously. This method should only be
68 // called after initialization has succeeded and must not be called during 69 // called after initialization has succeeded and must not be called during
69 // pending Reset(). 70 // pending Reset().
70 void Read(const ReadCB& read_cb); 71 void Read(const ReadCB& read_cb);
71 72
72 // Resets the decoder, flushes all decoded outputs and/or internal buffers, 73 // Resets the decoder, flushes all decoded outputs and/or internal buffers,
73 // fires any existing pending read callback and calls |closure| on completion. 74 // fires any existing pending read callback and calls |closure| on completion.
74 // Note that |closure| is always called asynchronously. This method should 75 // Note that |closure| is always called asynchronously. This method should
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 void OnDecoderReset(); 164 void OnDecoderReset();
164 165
165 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 166 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
166 167
167 scoped_refptr<MediaLog> media_log_; 168 scoped_refptr<MediaLog> media_log_;
168 169
169 State state_; 170 State state_;
170 171
171 StatisticsCB statistics_cb_; 172 StatisticsCB statistics_cb_;
172 InitCB init_cb_; 173 InitCB init_cb_;
174 base::Closure waiting_for_decryption_key_cb_;
173 175
174 ReadCB read_cb_; 176 ReadCB read_cb_;
175 base::Closure reset_cb_; 177 base::Closure reset_cb_;
176 178
177 DemuxerStream* stream_; 179 DemuxerStream* stream_;
178 180
179 scoped_ptr<DecoderSelector<StreamType> > decoder_selector_; 181 scoped_ptr<DecoderSelector<StreamType> > decoder_selector_;
180 182
181 scoped_ptr<Decoder> decoder_; 183 scoped_ptr<Decoder> decoder_;
182 // TODO(watk): When falling back from H/W decoding to S/W decoding, 184 // TODO(watk): When falling back from H/W decoding to S/W decoding,
(...skipping 30 matching lines...) Expand all
213 215
214 template <> 216 template <>
215 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const; 217 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const;
216 218
217 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; 219 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream;
218 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream; 220 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream;
219 221
220 } // namespace media 222 } // namespace media
221 223
222 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ 224 #endif // MEDIA_FILTERS_DECODER_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698