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

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

Issue 547913002: MediaLog: Log selected audio/video decoder name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/audio_renderer_impl_unittest.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 "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"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "media/base/audio_decoder.h" 14 #include "media/base/audio_decoder.h"
15 #include "media/base/decryptor.h" 15 #include "media/base/decryptor.h"
16 #include "media/base/demuxer_stream.h" 16 #include "media/base/demuxer_stream.h"
17 #include "media/base/media_export.h" 17 #include "media/base/media_export.h"
18 #include "media/base/media_log.h"
18 #include "media/base/pipeline_status.h" 19 #include "media/base/pipeline_status.h"
19 #include "media/filters/decoder_selector.h" 20 #include "media/filters/decoder_selector.h"
20 #include "media/filters/decoder_stream_traits.h" 21 #include "media/filters/decoder_stream_traits.h"
21 22
22 namespace base { 23 namespace base {
23 class SingleThreadTaskRunner; 24 class SingleThreadTaskRunner;
24 } 25 }
25 26
26 namespace media { 27 namespace media {
27 28
(...skipping 17 matching lines...) Expand all
45 DECODE_ERROR, // Decoder returned decode error. 46 DECODE_ERROR, // Decoder returned decode error.
46 DECRYPT_ERROR // Decoder returned decrypt error. 47 DECRYPT_ERROR // Decoder returned decrypt error.
47 }; 48 };
48 49
49 // Indicates completion of a DecoderStream read. 50 // Indicates completion of a DecoderStream read.
50 typedef base::Callback<void(Status, const scoped_refptr<Output>&)> ReadCB; 51 typedef base::Callback<void(Status, const scoped_refptr<Output>&)> ReadCB;
51 52
52 DecoderStream( 53 DecoderStream(
53 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 54 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
54 ScopedVector<Decoder> decoders, 55 ScopedVector<Decoder> decoders,
55 const SetDecryptorReadyCB& set_decryptor_ready_cb); 56 const SetDecryptorReadyCB& set_decryptor_ready_cb,
57 const scoped_refptr<MediaLog>& media_log);
56 virtual ~DecoderStream(); 58 virtual ~DecoderStream();
57 59
58 // Initializes the DecoderStream and returns the initialization result 60 // Initializes the DecoderStream and returns the initialization result
59 // through |init_cb|. Note that |init_cb| is always called asynchronously. 61 // through |init_cb|. Note that |init_cb| is always called asynchronously.
60 void Initialize(DemuxerStream* stream, 62 void Initialize(DemuxerStream* stream,
61 bool low_delay, 63 bool low_delay,
62 const StatisticsCB& statistics_cb, 64 const StatisticsCB& statistics_cb,
63 const InitCB& init_cb); 65 const InitCB& init_cb);
64 66
65 // 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
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 void ReinitializeDecoder(); 154 void ReinitializeDecoder();
153 155
154 // Callback for Decoder reinitialization. 156 // Callback for Decoder reinitialization.
155 void OnDecoderReinitialized(PipelineStatus status); 157 void OnDecoderReinitialized(PipelineStatus status);
156 158
157 void ResetDecoder(); 159 void ResetDecoder();
158 void OnDecoderReset(); 160 void OnDecoderReset();
159 161
160 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 162 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
161 163
164 scoped_refptr<MediaLog> media_log_;
165
162 State state_; 166 State state_;
163 167
164 StatisticsCB statistics_cb_; 168 StatisticsCB statistics_cb_;
165 InitCB init_cb_; 169 InitCB init_cb_;
166 170
167 ReadCB read_cb_; 171 ReadCB read_cb_;
168 base::Closure reset_cb_; 172 base::Closure reset_cb_;
169 173
170 DemuxerStream* stream_; 174 DemuxerStream* stream_;
171 bool low_delay_; 175 bool low_delay_;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 208
205 template <> 209 template <>
206 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const; 210 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const;
207 211
208 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; 212 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream;
209 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream; 213 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream;
210 214
211 } // namespace media 215 } // namespace media
212 216
213 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ 217 #endif // MEDIA_FILTERS_DECODER_STREAM_H_
OLDNEW
« no previous file with comments | « media/filters/audio_renderer_impl_unittest.cc ('k') | media/filters/decoder_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698