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 import "third_party/mojo_services/src/geometry/public/interfaces/geometry.mojom";
9 // See media/base/buffering_state.h for descriptions.
10 // Kept in sync with media::BufferingState via static_asserts.
16 // See media/base/audio_decoder_config.h for descriptions.
17 // Kept in sync with media::AudioCodec via static_asserts.
38 // See media/base/channel_layout.h for descriptions.
39 // Kept in sync with media::ChannelLayout via static_asserts.
40 // TODO(tim): The bindings generators will always prepend the enum name, should
41 // mojom therefore allow enum values starting with numbers?
59 k_STEREO_DOWNMIX = 16,
73 k_STEREO_AND_KEYBOARD_MIC = 30,
75 k_MAX = k_4_1_QUAD_SIDE,
78 // See media/base/sample_format.h for descriptions.
79 // Kept in sync with media::SampleFormat via static_asserts.
92 // See media/base/video_frame.h for descriptions.
93 // Kept in sync with media::VideoFrame::Format via static_asserts.
110 // See media/base/video_decoder_config.h for descriptions.
111 // Kept in sync with media::VideoCodec via static_asserts.
124 // See media/base/video_decoder_config.h for descriptions.
125 // Kept in sync with media::VideoCodecProfile via static_asserts.
126 enum VideoCodecProfile {
127 VIDEO_CODEC_PROFILE_UNKNOWN = -1,
128 VIDEO_CODEC_PROFILE_MIN = VIDEO_CODEC_PROFILE_UNKNOWN,
130 H264PROFILE_BASELINE = H264PROFILE_MIN,
131 H264PROFILE_MAIN = 1,
132 H264PROFILE_EXTENDED = 2,
133 H264PROFILE_HIGH = 3,
134 H264PROFILE_HIGH10PROFILE = 4,
135 H264PROFILE_HIGH422PROFILE = 5,
136 H264PROFILE_HIGH444PREDICTIVEPROFILE = 6,
137 H264PROFILE_SCALABLEBASELINE = 7,
138 H264PROFILE_SCALABLEHIGH = 8,
139 H264PROFILE_STEREOHIGH = 9,
140 H264PROFILE_MULTIVIEWHIGH = 10,
141 H264PROFILE_MAX = H264PROFILE_MULTIVIEWHIGH,
143 VP8PROFILE_ANY = VP8PROFILE_MIN,
144 VP8PROFILE_MAX = VP8PROFILE_ANY,
146 VP9PROFILE_ANY = VP9PROFILE_MIN,
147 VP9PROFILE_MAX = VP9PROFILE_ANY,
148 VIDEO_CODEC_PROFILE_MAX = VP9PROFILE_MAX,
151 // This defines a mojo transport format for media::AudioDecoderConfig.
152 // See media/base/audio_decoder_config.h for descriptions.
153 struct AudioDecoderConfig {
155 SampleFormat sample_format;
156 ChannelLayout channel_layout;
157 int32 samples_per_second;
158 array<uint8>? extra_data;
159 int64 seek_preroll_usec;
164 // This defines a mojo transport format for media::VideoDecoderConfig.
165 // See media/base/video_decoder_config.h for descriptions.
166 struct VideoDecoderConfig {
168 VideoCodecProfile profile;
173 array<uint8>? extra_data;
177 // This defines a mojo transport format for media::SubsampleEntry.
178 // See media/base/decrypt_config.h for descriptions.
179 struct SubsampleEntry {
184 // This defines a mojo transport format for media::DecryptConfig.
185 // See media/base/decrypt_config.h for descriptions.
186 struct DecryptConfig {
189 array<SubsampleEntry> subsamples;
192 // This defines a mojo transport format for media::DecoderBuffer.
193 struct MediaDecoderBuffer {
194 // See media/base/buffers.h for details.
195 int64 timestamp_usec;
198 // The number of bytes present in this buffer. The data is not serialized
199 // along with this structure and must be read from a separate DataPipe.
202 // Indicates whether or not this buffer is a random access point.
205 // This is backed by an std::vector and results in a few copies.
206 // Into the vector, onto and off the MessagePipe, back into a vector.
207 array<uint8>? side_data;
208 uint32 side_data_size;
210 // DecryptConfig for a encrypted buffer. NULL if the buffer is not encrypted.
211 DecryptConfig? decrypt_config;
213 // These fields indicate the amount of data to discard after decoding.
214 int64 front_discard_usec;
215 int64 back_discard_usec;
217 // Indicates this buffer is part of a splice around |splice_timestamp_usec|.
218 int64 splice_timestamp_usec;