Chromium Code Reviews| Index: media/base/audio_splicer.h |
| diff --git a/media/base/audio_splicer.h b/media/base/audio_splicer.h |
| index 50445b2d54c889018341772e7d2b686ce1fe84e3..2904fc49d1a26666d837f3289b46714ee2829e6b 100644 |
| --- a/media/base/audio_splicer.h |
| +++ b/media/base/audio_splicer.h |
| @@ -29,7 +29,8 @@ class MEDIA_EXPORT AudioSplicer { |
| // Adds a new buffer full of samples or end of stream buffer to the splicer. |
| // Returns true if the buffer was accepted. False is returned if an error |
| // occurred. |
| - bool AddInput(const scoped_refptr<AudioBuffer>& input); |
| + bool AddInput(const scoped_refptr<DecoderBuffer>& origin_buffer, |
| + const scoped_refptr<AudioBuffer>& input); |
| // Returns true if the splicer has a buffer to return. |
| bool HasNextBuffer() const; |
| @@ -42,16 +43,17 @@ class MEDIA_EXPORT AudioSplicer { |
| void AddOutputBuffer(const scoped_refptr<AudioBuffer>& buffer); |
| AudioTimestampHelper output_timestamp_helper_; |
| - |
| - // Minimum gap size needed before the splicer will take action to |
| - // fill a gap. This avoids periodically inserting and then dropping samples |
| - // when the buffer timestamps are slightly off because of timestamp rounding |
| - // in the source content. Unit is frames. |
| - int min_gap_size_; |
| - |
| std::deque<scoped_refptr<AudioBuffer> > output_buffers_; |
| bool received_end_of_stream_; |
| + // Inner splicer for handling splice frames. Responsible for trimming and |
| + // crossfading frames before exposing them for consumption by GetNextBuffer(). |
| + // |
| + // Required since input buffers may require trimming arbitrarily large amounts |
| + // of samples prior to crossfading. Adding those samples as is to the "outer" |
| + // AudioSplicer will result in incorrect timestamp generation. |
| + AudioSplicer splice_frame_splicer_; |
|
acolwell GONE FROM CHROMIUM
2014/02/10 20:19:57
How does this compile? This is a recursive declara
DaleCurtis
2014/02/15 01:20:02
As discussed offline, it doesn't, sorry should hav
|
| + |
| DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSplicer); |
| }; |