summaryrefslogtreecommitdiff
path: root/media/base/audio_buffer.h
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2013-08-23 16:39:15 +0100
committerTorne (Richard Coles) <torne@google.com>2013-08-23 16:39:15 +0100
commit3551c9c881056c480085172ff9840cab31610854 (patch)
tree23660320f5f4c279966609cf9da7491b96d10ca8 /media/base/audio_buffer.h
parent4e9d9adbbb6cf287125ca44a0823791a570472f5 (diff)
downloadchromium_org-3551c9c881056c480085172ff9840cab31610854.tar.gz
Merge from Chromium at DEPS revision r219274
This commit was generated by merge_to_master.py. Change-Id: Ibb7f41396cadf4071e89153e1913c986d126f65d
Diffstat (limited to 'media/base/audio_buffer.h')
-rw-r--r--media/base/audio_buffer.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/media/base/audio_buffer.h b/media/base/audio_buffer.h
index e52355ac4c..c3bcf4dab9 100644
--- a/media/base/audio_buffer.h
+++ b/media/base/audio_buffer.h
@@ -23,6 +23,11 @@ class AudioBus;
class MEDIA_EXPORT AudioBuffer
: public base::RefCountedThreadSafe<AudioBuffer> {
public:
+ // Alignment of each channel's data; this must match what ffmpeg expects
+ // (which may be 0, 16, or 32, depending on the processor). Selecting 32 in
+ // order to work on all processors.
+ enum { kChannelAlignment = 32 };
+
// Create an AudioBuffer whose channel data is copied from |data|. For
// interleaved data, only the first buffer is used. For planar data, the
// number of buffers must be equal to |channel_count|. |frame_count| is the
@@ -95,8 +100,8 @@ class MEDIA_EXPORT AudioBuffer
bool end_of_stream() const { return end_of_stream_; }
// Access to the raw buffer for ffmpeg to write directly to. Data for planar
- // data is grouped by channel.
- uint8* writable_data() { return data_.get(); }
+ // data is grouped by channel. There is only 1 entry for interleaved formats.
+ const std::vector<uint8*>& channel_data() const { return channel_data_; }
private:
friend class base::RefCountedThreadSafe<AudioBuffer>;