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

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: Removed CDM stuff, fixed Opus 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
Index: media/base/audio_buffer.h
diff --git a/media/base/audio_buffer.h b/media/base/audio_buffer.h
index 8ae281eabda8788e53985f7c8f684e884e0594f8..af3da1fdf7be1a5089c461a197545685bb3450d5 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 only only the first element is
xhwang 2016/02/05 21:37:36 s/only only/only/
Tima Vaisburd 2016/02/06 03:54:11 This is gone.
+ // defined (i.e. channel_data()[0]) and it contains the buffer pointer.
const std::vector<uint8_t*>& channel_data() const { return channel_data_; }
xhwang 2016/02/05 21:37:36 This could be confusing as a public API. For examp
Tima Vaisburd 2016/02/06 03:54:11 Reformulated.
+ // The size of allocated data memory block. For planar formats the channels
+ // go sequentially in this block.
+ size_t data_size() const { return data_size_; }
+
private:
friend class base::RefCountedThreadSafe<AudioBuffer>;

Powered by Google App Engine
This is Rietveld 408576698