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 "ui/mojo/geometry/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.
107 // See media/base/video_decoder_config.h for descriptions.
108 // Kept in sync with media::VideoCodec via static_asserts.
121 // See media/base/video_decoder_config.h for descriptions.
122 // Kept in sync with media::VideoCodecProfile via static_asserts.
123 enum VideoCodecProfile {
124 VIDEO_CODEC_PROFILE_UNKNOWN = -1,
125 VIDEO_CODEC_PROFILE_MIN = VIDEO_CODEC_PROFILE_UNKNOWN,
127 H264PROFILE_BASELINE = H264PROFILE_MIN,
128 H264PROFILE_MAIN = 1,
129 H264PROFILE_EXTENDED = 2,
130 H264PROFILE_HIGH = 3,
131 H264PROFILE_HIGH10PROFILE = 4,
132 H264PROFILE_HIGH422PROFILE = 5,
133 H264PROFILE_HIGH444PREDICTIVEPROFILE = 6,
134 H264PROFILE_SCALABLEBASELINE = 7,
135 H264PROFILE_SCALABLEHIGH = 8,
136 H264PROFILE_STEREOHIGH = 9,
137 H264PROFILE_MULTIVIEWHIGH = 10,
138 H264PROFILE_MAX = H264PROFILE_MULTIVIEWHIGH,
140 VP8PROFILE_ANY = VP8PROFILE_MIN,
141 VP8PROFILE_MAX = VP8PROFILE_ANY,
143 VP9PROFILE_ANY = VP9PROFILE_MIN,
144 VP9PROFILE_MAX = VP9PROFILE_ANY,
145 VIDEO_CODEC_PROFILE_MAX = VP9PROFILE_MAX,
148 // This defines a mojo transport format for media::AudioDecoderConfig.
149 // See media/base/audio_decoder_config.h for descriptions.
150 struct AudioDecoderConfig {
152 SampleFormat sample_format;
153 ChannelLayout channel_layout;
154 int32 samples_per_second;
155 array<uint8>? extra_data;
156 int64 seek_preroll_usec;
161 // This defines a mojo transport format for media::VideoDecoderConfig.
162 // See media/base/video_decoder_config.h for descriptions.
163 struct VideoDecoderConfig {
165 VideoCodecProfile profile;
170 array<uint8>? extra_data;
174 // This defines a mojo transport format for media::SubsampleEntry.
175 // See media/base/decrypt_config.h for descriptions.
176 struct SubsampleEntry {
181 // This defines a mojo transport format for media::DecryptConfig.
182 // See media/base/decrypt_config.h for descriptions.
183 struct DecryptConfig {
186 array<SubsampleEntry> subsamples;
189 // This defines a mojo transport format for media::DecoderBuffer.
190 struct MediaDecoderBuffer {
191 // See media/base/buffers.h for details.
192 int64 timestamp_usec;
195 // The number of bytes present in this buffer. The data is not serialized
196 // along with this structure and must be read from a separate DataPipe.
199 // Indicates whether or not this buffer is a random access point.
202 // This is backed by an std::vector and results in a few copies.
203 // Into the vector, onto and off the MessagePipe, back into a vector.
204 array<uint8>? side_data;
205 uint32 side_data_size;
207 // DecryptConfig for a encrypted buffer. NULL if the buffer is not encrypted.
208 DecryptConfig? decrypt_config;
210 // These fields indicate the amount of data to discard after decoding.
211 int64 front_discard_usec;
212 int64 back_discard_usec;
214 // Indicates this buffer is part of a splice around |splice_timestamp_usec|.
215 int64 splice_timestamp_usec;