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

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

Issue 10669022: Add status parameter to DemuxerStream::ReadCB (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix seek_tester build buster Created 8 years, 5 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 // This object is created on the render thread. 9 // This object is created on the render thread.
10 // 2. Pipeline thread 10 // 2. Pipeline thread
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 protected: 67 protected:
68 virtual ~AudioRendererImpl(); 68 virtual ~AudioRendererImpl();
69 69
70 private: 70 private:
71 friend class AudioRendererImplTest; 71 friend class AudioRendererImplTest;
72 FRIEND_TEST_ALL_PREFIXES(AudioRendererImplTest, EndOfStream); 72 FRIEND_TEST_ALL_PREFIXES(AudioRendererImplTest, EndOfStream);
73 FRIEND_TEST_ALL_PREFIXES(AudioRendererImplTest, Underflow_EndOfStream); 73 FRIEND_TEST_ALL_PREFIXES(AudioRendererImplTest, Underflow_EndOfStream);
74 74
75 // Callback from the audio decoder delivering decoded audio samples. 75 // Callback from the audio decoder delivering decoded audio samples.
76 void DecodedAudioReady(scoped_refptr<Buffer> buffer); 76 void DecodedAudioReady(AudioDecoder::Status status,
77 const scoped_refptr<Buffer>& buffer);
78
79 // Helper functions for AudioDecoder::Status values passed to
80 // DecodedAudioReady().
81 void HandleDecodeError();
82 void HandleAbortedRead();
Ami GONE FROM CHROMIUM 2012/07/12 17:10:26 swap order of these two to match enum
acolwell GONE FROM CHROMIUM 2012/07/12 21:59:58 Done.
77 83
78 // Fills the given buffer with audio data by delegating to its |algorithm_|. 84 // Fills the given buffer with audio data by delegating to its |algorithm_|.
79 // FillBuffer() also takes care of updating the clock. Returns the number of 85 // FillBuffer() also takes care of updating the clock. Returns the number of
80 // frames copied into |dest|, which may be less than or equal to 86 // frames copied into |dest|, which may be less than or equal to
81 // |requested_frames|. 87 // |requested_frames|.
82 // 88 //
83 // If this method returns fewer frames than |requested_frames|, it could 89 // If this method returns fewer frames than |requested_frames|, it could
84 // be a sign that the pipeline is stalled or unable to stream the data fast 90 // be a sign that the pipeline is stalled or unable to stream the data fast
85 // enough. In such scenarios, the callee should zero out unused portions 91 // enough. In such scenarios, the callee should zero out unused portions
86 // of their buffer to playback silence. 92 // of their buffer to playback silence.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 bool underflow_disabled_; 216 bool underflow_disabled_;
211 217
212 AudioDecoder::ReadCB read_cb_; 218 AudioDecoder::ReadCB read_cb_;
213 219
214 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); 220 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl);
215 }; 221 };
216 222
217 } // namespace media 223 } // namespace media
218 224
219 #endif // MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_ 225 #endif // MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698