summaryrefslogtreecommitdiff
path: root/media/base/audio_decoder.h
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2014-02-21 12:16:55 +0000
committerTorne (Richard Coles) <torne@google.com>2014-02-21 12:16:55 +0000
commit5d1f7b1de12d16ceb2c938c56701a3e8bfa558f7 (patch)
tree5d4ae202b870bd86673f596f0d424bc4b3e55ebe /media/base/audio_decoder.h
parente862bac9c33104a29d98631d62668ae7b6676510 (diff)
downloadchromium_org-5d1f7b1de12d16ceb2c938c56701a3e8bfa558f7.tar.gz
Merge from Chromium at DEPS revision 251904
This commit was generated by merge_to_master.py. Change-Id: I1f9543259d7d2a57d81aa41a1b84f85837439d21
Diffstat (limited to 'media/base/audio_decoder.h')
-rw-r--r--media/base/audio_decoder.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/media/base/audio_decoder.h b/media/base/audio_decoder.h
index aa2eeb80ea..5aefb84aa6 100644
--- a/media/base/audio_decoder.h
+++ b/media/base/audio_decoder.h
@@ -28,14 +28,14 @@ class MEDIA_EXPORT AudioDecoder {
AudioDecoder();
virtual ~AudioDecoder();
- // Initialize an AudioDecoder with the given DemuxerStream, executing the
+ // Initializes an AudioDecoder with the given DemuxerStream, executing the
// callback upon completion.
// statistics_cb is used to update global pipeline statistics.
virtual void Initialize(DemuxerStream* stream,
const PipelineStatusCB& status_cb,
const StatisticsCB& statistics_cb) = 0;
- // Request samples to be decoded and returned via the provided callback.
+ // Requests samples to be decoded and returned via the provided callback.
// Only one read may be in flight at any given time.
//
// Implementations guarantee that the callback will not be called from within
@@ -49,9 +49,16 @@ class MEDIA_EXPORT AudioDecoder {
ReadCB;
virtual void Read(const ReadCB& read_cb) = 0;
- // Reset decoder state, dropping any queued encoded data.
+ // Resets decoder state, dropping any queued encoded data.
virtual void Reset(const base::Closure& closure) = 0;
+ // Stops decoder, fires any pending callbacks and sets the decoder to an
+ // uninitialized state. An AudioDecoder cannot be re-initialized after it has
+ // been stopped.
+ // Note that if Initialize() has been called, Stop() must be called and
+ // complete before deleting the decoder.
+ virtual void Stop(const base::Closure& closure) = 0;
+
// Returns various information about the decoded audio format.
virtual int bits_per_channel() = 0;
virtual ChannelLayout channel_layout() = 0;