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

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

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Rebase. Created 3 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 <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <memory> 10 #include <memory>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 DEMUXER_READ_ABORTED, // Demuxer returned aborted read. 49 DEMUXER_READ_ABORTED, // Demuxer returned aborted read.
50 DECODE_ERROR, // Decoder returned decode error. 50 DECODE_ERROR, // Decoder returned decode error.
51 }; 51 };
52 52
53 // Indicates completion of a DecoderStream initialization. 53 // Indicates completion of a DecoderStream initialization.
54 typedef base::Callback<void(bool success)> InitCB; 54 typedef base::Callback<void(bool success)> InitCB;
55 55
56 // Indicates completion of a DecoderStream read. 56 // Indicates completion of a DecoderStream read.
57 typedef base::Callback<void(Status, const scoped_refptr<Output>&)> ReadCB; 57 typedef base::Callback<void(Status, const scoped_refptr<Output>&)> ReadCB;
58 58
59 DecoderStream( 59 DecoderStream(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
60 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 60 ScopedVector<Decoder> decoders,
61 ScopedVector<Decoder> decoders, 61 MediaLog* media_log);
62 const scoped_refptr<MediaLog>& media_log);
63 virtual ~DecoderStream(); 62 virtual ~DecoderStream();
64 63
65 // Returns the string representation of the StreamType for logging purpose. 64 // Returns the string representation of the StreamType for logging purpose.
66 std::string GetStreamTypeString(); 65 std::string GetStreamTypeString();
67 66
68 // Initializes the DecoderStream and returns the initialization result 67 // Initializes the DecoderStream and returns the initialization result
69 // through |init_cb|. Note that |init_cb| is always called asynchronously. 68 // through |init_cb|. Note that |init_cb| is always called asynchronously.
70 // |cdm_context| can be used to handle encrypted stream. Can be null if the 69 // |cdm_context| can be used to handle encrypted stream. Can be null if the
71 // stream is not encrypted. 70 // stream is not encrypted.
72 void Initialize(DemuxerStream* stream, 71 void Initialize(DemuxerStream* stream,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 179
181 void CompleteDecoderReinitialization(bool success); 180 void CompleteDecoderReinitialization(bool success);
182 181
183 void ResetDecoder(); 182 void ResetDecoder();
184 void OnDecoderReset(); 183 void OnDecoderReset();
185 184
186 DecoderStreamTraits<StreamType> traits_; 185 DecoderStreamTraits<StreamType> traits_;
187 186
188 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 187 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
189 188
190 scoped_refptr<MediaLog> media_log_; 189 MediaLog* media_log_;
191 190
192 State state_; 191 State state_;
193 192
194 StatisticsCB statistics_cb_; 193 StatisticsCB statistics_cb_;
195 InitCB init_cb_; 194 InitCB init_cb_;
196 base::Closure waiting_for_decryption_key_cb_; 195 base::Closure waiting_for_decryption_key_cb_;
197 196
198 ReadCB read_cb_; 197 ReadCB read_cb_;
199 base::Closure reset_cb_; 198 base::Closure reset_cb_;
200 199
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 261
263 template <> 262 template <>
264 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const; 263 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const;
265 264
266 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; 265 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream;
267 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream; 266 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream;
268 267
269 } // namespace media 268 } // namespace media
270 269
271 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ 270 #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