| Index: media/base/audio_bus.h
|
| diff --git a/media/base/audio_bus.h b/media/base/audio_bus.h
|
| index 6d381ccac3daa3c9325fb9d4af99259e4cef3825..2752ec871c9724d49f45d0e58437e8abdfae8e3d 100644
|
| --- a/media/base/audio_bus.h
|
| +++ b/media/base/audio_bus.h
|
| @@ -15,9 +15,20 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "media/base/media_export.h"
|
|
|
| +namespace mojo {
|
| +template <typename T, typename U>
|
| +struct TypeConverter;
|
| +template <typename T>
|
| +class StructPtr;
|
| +};
|
| +
|
| namespace media {
|
| class AudioParameters;
|
|
|
| +namespace mojom {
|
| +class AudioBus;
|
| +}
|
| +
|
| // Represents a sequence of audio frames containing frames() audio samples for
|
| // each of channels() channels. The data is stored as a set of contiguous
|
| // float arrays with one array per channel. The memory for the arrays is either
|
| @@ -187,6 +198,10 @@ class MEDIA_EXPORT AudioBus {
|
| explicit AudioBus(int channels);
|
|
|
| private:
|
| + // mojo::TypeConverter added as a friend so that AudioBus can be
|
| + // transferred across a mojo connection.
|
| + friend struct mojo::TypeConverter<mojo::StructPtr<mojom::AudioBus>, AudioBus>;
|
| +
|
| // Helper method for building |channel_data_| from a block of memory. |data|
|
| // must be at least CalculateMemorySize(...) bytes in size.
|
| void BuildChannelData(int channels, int aligned_frame, float* data);
|
| @@ -209,6 +224,7 @@ class MEDIA_EXPORT AudioBus {
|
|
|
| // Contiguous block of channel memory.
|
| std::unique_ptr<float, base::AlignedFreeDeleter> data_;
|
| + size_t data_size_;
|
|
|
| // One float pointer per channel pointing to a contiguous block of memory for
|
| // that channel. If the memory is owned by this instance, this will
|
|
|