Index: media/base/audio_discard_helper.h |
diff --git a/media/base/audio_discard_helper.h b/media/base/audio_discard_helper.h |
index 6a49239381bf4be7b7eaf5186cd55d7629efb336..21b16dc9175d0775be8a3b415b3801d44074c91c 100644 |
--- a/media/base/audio_discard_helper.h |
+++ b/media/base/audio_discard_helper.h |
@@ -19,7 +19,13 @@ class DecoderBuffer; |
// Helper class for managing timestamps and discard events around decoding. |
class MEDIA_EXPORT AudioDiscardHelper { |
public: |
- explicit AudioDiscardHelper(int sample_rate); |
+ // |sample_rate| is the sample rate of decode data which will be handed into |
+ // the ProcessBuffers() call. |
+ // |
+ // |codec_delay| is used to figure out the the start of decoded data from each |
+ // corresponding encoded buffer. End discard is only supported when there is |
+ // no |codec_delay|. |
+ AudioDiscardHelper(int sample_rate, size_t codec_delay); |
~AudioDiscardHelper(); |
// Converts a TimeDelta to a frame count based on the constructed sample rate. |
@@ -43,10 +49,12 @@ class MEDIA_EXPORT AudioDiscardHelper { |
private: |
const int sample_rate_; |
+ const size_t codec_delay_; |
AudioTimestampHelper timestamp_helper_; |
size_t discard_frames_; |
base::TimeDelta last_input_timestamp_; |
+ scoped_refptr<DecoderBuffer> delayed_discard_; |
DISALLOW_IMPLICIT_CONSTRUCTORS(AudioDiscardHelper); |
}; |