diff options
Diffstat (limited to 'media/base/audio_buffer.h')
-rw-r--r-- | media/base/audio_buffer.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/media/base/audio_buffer.h b/media/base/audio_buffer.h index 4ccd3a8f..5d7ab7f 100644 --- a/media/base/audio_buffer.h +++ b/media/base/audio_buffer.h @@ -34,13 +34,16 @@ class MEDIA_EXPORT AudioBuffer // number of buffers must be equal to |channel_count|. |frame_count| is the // number of frames in each buffer. |data| must not be null and |frame_count| // must be >= 0. + // + // TODO(jrummell): Compute duration rather than pass it in. static scoped_refptr<AudioBuffer> CopyFrom(SampleFormat sample_format, ChannelLayout channel_layout, int channel_count, int sample_rate, int frame_count, const uint8* const* data, - const base::TimeDelta timestamp); + const base::TimeDelta timestamp, + const base::TimeDelta duration); // Create an AudioBuffer with |frame_count| frames. Buffer is allocated, but // not initialized. Timestamp and duration are set to kNoTimestamp(). @@ -56,7 +59,8 @@ class MEDIA_EXPORT AudioBuffer int channel_count, int sample_rate, int frame_count, - const base::TimeDelta timestamp); + const base::TimeDelta timestamp, + const base::TimeDelta duration); // Create a AudioBuffer indicating we've reached end of stream. // Calling any method other than end_of_stream() on the resulting buffer @@ -98,6 +102,7 @@ class MEDIA_EXPORT AudioBuffer base::TimeDelta timestamp() const { return timestamp_; } base::TimeDelta duration() const { return duration_; } void set_timestamp(base::TimeDelta timestamp) { timestamp_ = timestamp; } + void set_duration(base::TimeDelta duration) { duration_ = duration; } // If there's no data in this buffer, it represents end of stream. bool end_of_stream() const { return end_of_stream_; } @@ -121,7 +126,8 @@ class MEDIA_EXPORT AudioBuffer int frame_count, bool create_buffer, const uint8* const* data, - const base::TimeDelta timestamp); + const base::TimeDelta timestamp, + const base::TimeDelta duration); virtual ~AudioBuffer(); |