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

Unified Diff: media/base/audio_buffer.h

Issue 1468153003: Define AudioBuffer and VideoFrame for mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | media/base/audio_buffer.cc » ('j') | media/base/audio_buffer.cc » ('J')
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 63390d4781cacca98c636d465b0e75c28fecd50f..40e61c2e4889f2e0bcff99768a0c9d1eb44050a5 100644
--- a/media/base/audio_buffer.h
+++ b/media/base/audio_buffer.h
@@ -15,9 +15,20 @@
#include "media/base/media_export.h"
#include "media/base/sample_format.h"
+namespace mojo {
+template <typename T, typename U>
+struct TypeConverter;
+template <typename T>
+class StructPtr;
+};
+
namespace media {
class AudioBus;
+namespace interfaces {
+class AudioBuffer;
+}
+
// An audio buffer that takes a copy of the data passed to it, holds it, and
// copies it into an AudioBus when needed. Also supports an end of stream
// marker.
@@ -122,6 +133,8 @@ class MEDIA_EXPORT AudioBuffer
private:
friend class base::RefCountedThreadSafe<AudioBuffer>;
+ friend struct mojo::TypeConverter<mojo::StructPtr<interfaces::AudioBuffer>,
+ scoped_refptr<AudioBuffer>>;
xhwang 2015/11/23 22:22:18 Add a comment why we need this friend here.
jrummell 2015/11/24 02:37:53 Done.
// Allocates aligned contiguous buffer to hold all channel data (1 block for
// interleaved data, |channel_count| blocks for planar data), copies
@@ -151,6 +164,7 @@ class MEDIA_EXPORT AudioBuffer
// Contiguous block of channel data.
scoped_ptr<uint8, base::AlignedFreeDeleter> data_;
+ size_t data_size_;
// For planar data, points to each channels data.
std::vector<uint8*> channel_data_;
« no previous file with comments | « no previous file | media/base/audio_buffer.cc » ('j') | media/base/audio_buffer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698