Index: media/base/audio_discard_helper.h |
diff --git a/media/base/audio_discard_helper.h b/media/base/audio_discard_helper.h |
index 388cbd421a380f8ac5646ac3c87dc060bb04774f..417b4d74cb830d3fff1083ce4fb7e0dba55674d0 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. |
@@ -50,10 +56,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); |
}; |