1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 // See media/base/buffering_state.h for descriptions.
8 // Kept in sync with media::BufferingState via COMPILE_ASSERTs.
14 // See media/base/audio_decoder_config.h for descriptions.
15 // Kept in sync with media::AudioCodec via COMPILE_ASSERTs.
35 // See media/base/channel_layout.h for descriptions.
36 // Kept in sync with media::ChannelLayout via COMPILE_ASSERTs.
37 // TODO(tim): The bindings generators will always prepend the enum name, should
38 // mojom therefore allow enum values starting with numbers?
56 k_STEREO_DOWNMIX = 16,
70 k_STEREO_AND_KEYBOARD_MIC = 30,
71 k_MAX = k_STEREO_AND_KEYBOARD_MIC
74 // See media/base/sample_format.h for descriptions.
75 // Kept in sync with media::SampleFormat via COMPILE_ASSERTs.
87 // This defines a mojo transport format for media::AudioDecoderConfig.
88 // See media/base/audio_decoder_config.h for descriptions.
89 struct AudioDecoderConfig {
91 SampleFormat sample_format;
92 ChannelLayout channel_layout;
93 int32 samples_per_second;
95 int64 seek_preroll_usec;
99 // This defines a mojo transport format for media::DecoderBuffer.
100 struct MediaDecoderBuffer {
101 // See media/base/buffers.h for details.
102 int64 timestamp_usec;
105 // The number of bytes in |data|.
108 // This is backed by an std::vector and results in a few copies.
109 // Into the vector, onto and off the MessagePipe, back into a vector.
111 uint32 side_data_size;
113 // These fields indicate the amount of data to discard after decoding.
114 int64 front_discard_usec;
115 int64 back_discard_usec;
117 // Indicates this buffer is part of a splice around |splice_timestamp_usec|.
118 int64 splice_timestamp_usec;
121 // TODO(tim): This currently results in allocating a new, largeish DataPipe
122 // for each buffer. Remove this once framed data pipes exist, but using this
123 // for now for prototyping audio.
124 handle<data_pipe_consumer> data;