Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Unified Diff: media/base/audio_buffer.h

Issue 1651673002: Add MediaCodecAudioDecoder implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: A better linking issue fix Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/android/sdk_media_codec_bridge.cc ('k') | media/base/audio_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_buffer.h
diff --git a/media/base/audio_buffer.h b/media/base/audio_buffer.h
index 8ae281eabda8788e53985f7c8f684e884e0594f8..1b40754cbc4e2e99ecdc8ed2c0859fbf2d8e4499 100644
--- a/media/base/audio_buffer.h
+++ b/media/base/audio_buffer.h
@@ -131,10 +131,16 @@ class MEDIA_EXPORT AudioBuffer
// If there's no data in this buffer, it represents end of stream.
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. There is only 1 entry for interleaved formats.
+ // Access to the raw buffer for ffmpeg and Android MediaCodec decoders to
+ // write directly to. For planar formats the vector elements correspond to
+ // the channels. For interleaved formats the resulting vector has exactly
+ // one element which contains the buffer pointer.
const std::vector<uint8_t*>& channel_data() const { return channel_data_; }
+ // The size of allocated data memory block. For planar formats channels go
+ // sequentially in this block.
+ size_t data_size() const { return data_size_; }
+
private:
friend class base::RefCountedThreadSafe<AudioBuffer>;
« no previous file with comments | « media/base/android/sdk_media_codec_bridge.cc ('k') | media/base/audio_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698