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

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

Issue 256163005: Introduce AudioClock to improve playback delay calculations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Audio rendering unit utilizing an AudioRendererSink to output data. 5 // Audio rendering unit utilizing an AudioRendererSink to output data.
6 // 6 //
7 // This class lives inside three threads during it's lifetime, namely: 7 // This class lives inside three threads during it's lifetime, namely:
8 // 1. Render thread 8 // 1. Render thread
9 // Where the object is created. 9 // Where the object is created.
10 // 2. Media thread (provided via constructor) 10 // 2. Media thread (provided via constructor)
(...skipping 19 matching lines...) Expand all
30 #include "media/base/decryptor.h" 30 #include "media/base/decryptor.h"
31 #include "media/filters/audio_renderer_algorithm.h" 31 #include "media/filters/audio_renderer_algorithm.h"
32 #include "media/filters/decoder_stream.h" 32 #include "media/filters/decoder_stream.h"
33 33
34 namespace base { 34 namespace base {
35 class SingleThreadTaskRunner; 35 class SingleThreadTaskRunner;
36 } 36 }
37 37
38 namespace media { 38 namespace media {
39 39
40 class AudioBufferConverter;
40 class AudioBus; 41 class AudioBus;
41 class AudioBufferConverter; 42 class AudioHardwareConfig;
42 class AudioSplicer; 43 class AudioSplicer;
44 class BufferedAudioTracker;
43 class DecryptingDemuxerStream; 45 class DecryptingDemuxerStream;
44 class AudioHardwareConfig;
45 46
46 class MEDIA_EXPORT AudioRendererImpl 47 class MEDIA_EXPORT AudioRendererImpl
47 : public AudioRenderer, 48 : public AudioRenderer,
48 NON_EXPORTED_BASE(public AudioRendererSink::RenderCallback) { 49 NON_EXPORTED_BASE(public AudioRendererSink::RenderCallback) {
49 public: 50 public:
50 // |task_runner| is the thread on which AudioRendererImpl will execute. 51 // |task_runner| is the thread on which AudioRendererImpl will execute.
51 // 52 //
52 // |sink| is used as the destination for the rendered audio. 53 // |sink| is used as the destination for the rendered audio.
53 // 54 //
54 // |decoders| contains the AudioDecoders to use when initializing. 55 // |decoders| contains the AudioDecoders to use when initializing.
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // than nothing. 270 // than nothing.
270 base::TimeTicks earliest_end_time_; 271 base::TimeTicks earliest_end_time_;
271 size_t total_frames_filled_; 272 size_t total_frames_filled_;
272 273
273 bool underflow_disabled_; 274 bool underflow_disabled_;
274 275
275 // True if the renderer receives a buffer with kAborted status during preroll, 276 // True if the renderer receives a buffer with kAborted status during preroll,
276 // false otherwise. This flag is cleared on the next Preroll() call. 277 // false otherwise. This flag is cleared on the next Preroll() call.
277 bool preroll_aborted_; 278 bool preroll_aborted_;
278 279
280 scoped_ptr<BufferedAudioTracker> buffered_audio_tracker_;
281
279 // End variables which must be accessed under |lock_|. ---------------------- 282 // End variables which must be accessed under |lock_|. ----------------------
280 283
281 // NOTE: Weak pointers must be invalidated before all other member variables. 284 // NOTE: Weak pointers must be invalidated before all other member variables.
282 base::WeakPtrFactory<AudioRendererImpl> weak_factory_; 285 base::WeakPtrFactory<AudioRendererImpl> weak_factory_;
283 286
284 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); 287 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl);
285 }; 288 };
286 289
287 } // namespace media 290 } // namespace media
288 291
289 #endif // MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_ 292 #endif // MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | media/filters/audio_renderer_impl.cc » ('j') | media/filters/audio_renderer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698