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 "mojo/services/geometry/public/interfaces/geometry.mojom";
9 // See media/base/buffering_state.h for descriptions.
10 // Kept in sync with media::BufferingState via COMPILE_ASSERTs.
16 // See media/base/audio_decoder_config.h for descriptions.
17 // Kept in sync with media::AudioCodec via COMPILE_ASSERTs.
37 // See media/base/channel_layout.h for descriptions.
38 // Kept in sync with media::ChannelLayout via COMPILE_ASSERTs.
39 // TODO(tim): The bindings generators will always prepend the enum name, should
40 // mojom therefore allow enum values starting with numbers?
58 k_STEREO_DOWNMIX = 16,
72 k_STEREO_AND_KEYBOARD_MIC = 30,
74 k_MAX = k_4_1_QUAD_SIDE,
77 // See media/base/sample_format.h for descriptions.
78 // Kept in sync with media::SampleFormat via COMPILE_ASSERTs.
90 // See media/base/video_frame.h for descriptions.
91 // Kept in sync with media::VideoFrame::Format via COMPILE_ASSERTs.
106 // See media/base/video_decoder_config.h for descriptions.
107 // Kept in sync with media::VideoCodec via COMPILE_ASSERTs.
120 // See media/base/video_decoder_config.h for descriptions.
121 // Kept in sync with media::VideoCodecProfile via COMPILE_ASSERTs.
122 enum VideoCodecProfile {
123 VIDEO_CODEC_PROFILE_UNKNOWN = -1,
124 VIDEO_CODEC_PROFILE_MIN = VIDEO_CODEC_PROFILE_UNKNOWN,
126 H264PROFILE_BASELINE = H264PROFILE_MIN,
127 H264PROFILE_MAIN = 1,
128 H264PROFILE_EXTENDED = 2,
129 H264PROFILE_HIGH = 3,
130 H264PROFILE_HIGH10PROFILE = 4,
131 H264PROFILE_HIGH422PROFILE = 5,
132 H264PROFILE_HIGH444PREDICTIVEPROFILE = 6,
133 H264PROFILE_SCALABLEBASELINE = 7,
134 H264PROFILE_SCALABLEHIGH = 8,
135 H264PROFILE_STEREOHIGH = 9,
136 H264PROFILE_MULTIVIEWHIGH = 10,
137 H264PROFILE_MAX = H264PROFILE_MULTIVIEWHIGH,
139 VP8PROFILE_ANY = VP8PROFILE_MIN,
140 VP8PROFILE_MAX = VP8PROFILE_ANY,
142 VP9PROFILE_ANY = VP9PROFILE_MIN,
143 VP9PROFILE_MAX = VP9PROFILE_ANY,
144 VIDEO_CODEC_PROFILE_MAX = VP9PROFILE_MAX,
147 // This defines a mojo transport format for media::AudioDecoderConfig.
148 // See media/base/audio_decoder_config.h for descriptions.
149 struct AudioDecoderConfig {
151 SampleFormat sample_format;
152 ChannelLayout channel_layout;
153 int32 samples_per_second;
154 array<uint8>? extra_data;
155 int64 seek_preroll_usec;
159 // This defines a mojo transport format for media::VideoDecoderConfig.
160 // See media/base/video_decoder_config.h for descriptions.
161 struct VideoDecoderConfig {
163 VideoCodecProfile profile;
168 array<uint8>? extra_data;
172 // This defines a mojo transport format for media::SubsampleEntry.
173 // See media/base/decrypt_config.h for descriptions.
174 struct SubsampleEntry {
179 // This defines a mojo transport format for media::DecryptConfig.
180 // See media/base/decrypt_config.h for descriptions.
181 struct DecryptConfig {
184 array<SubsampleEntry> subsamples;
187 // This defines a mojo transport format for media::DecoderBuffer.
188 struct MediaDecoderBuffer {
189 // See media/base/buffers.h for details.
190 int64 timestamp_usec;
193 // The number of bytes present in this buffer. The data is not serialized
194 // along with this structure and must be read from a separate DataPipe.
197 // Indicates whether or not this buffer is a random access point.
200 // This is backed by an std::vector and results in a few copies.
201 // Into the vector, onto and off the MessagePipe, back into a vector.
202 array<uint8>? side_data;
203 uint32 side_data_size;
205 // DecryptConfig for a encrypted buffer. NULL if the buffer is not encrypted.
206 DecryptConfig? decrypt_config;
208 // These fields indicate the amount of data to discard after decoding.
209 int64 front_discard_usec;
210 int64 back_discard_usec;
212 // Indicates this buffer is part of a splice around |splice_timestamp_usec|.
213 int64 splice_timestamp_usec;