Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Side by Side Diff: media/mojo/interfaces/media_types.mojom

Issue 1490613005: media config: expand is_encrypted to a struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ddorwin comments Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module media.interfaces; 5 module media.interfaces;
6 6
7 import "ui/mojo/geometry/geometry.mojom"; 7 import "ui/mojo/geometry/geometry.mojom";
8 8
9 // See media/base/buffering_state.h for descriptions. 9 // See media/base/buffering_state.h for descriptions.
10 // Kept in sync with media::BufferingState via static_asserts. 10 // Kept in sync with media::BufferingState via static_asserts.
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 H264PROFILE_MAX = H264PROFILE_MULTIVIEWHIGH, 161 H264PROFILE_MAX = H264PROFILE_MULTIVIEWHIGH,
162 VP8PROFILE_MIN = 11, 162 VP8PROFILE_MIN = 11,
163 VP8PROFILE_ANY = VP8PROFILE_MIN, 163 VP8PROFILE_ANY = VP8PROFILE_MIN,
164 VP8PROFILE_MAX = VP8PROFILE_ANY, 164 VP8PROFILE_MAX = VP8PROFILE_ANY,
165 VP9PROFILE_MIN = 12, 165 VP9PROFILE_MIN = 12,
166 VP9PROFILE_ANY = VP9PROFILE_MIN, 166 VP9PROFILE_ANY = VP9PROFILE_MIN,
167 VP9PROFILE_MAX = VP9PROFILE_ANY, 167 VP9PROFILE_MAX = VP9PROFILE_ANY,
168 VIDEO_CODEC_PROFILE_MAX = VP9PROFILE_MAX, 168 VIDEO_CODEC_PROFILE_MAX = VP9PROFILE_MAX,
169 }; 169 };
170 170
171 // See media/base/encryption_scheme.h.
172 // Kept in sync with media::CipherMode via static_asserts.
173 enum CipherMode {
174 Unencrypted = 0,
175 AesCtr,
176 AesCbc,
177 Max = AesCbc
178 };
179
180 // This defines a mojo transport format for media::EncryptionScheme::PatternSpec
181 // See media/base/encryption_scheme.h for description.
182 struct PatternSpec {
183 uint32 encrypt_blocks;
184 uint32 skip_blocks;
185 };
186
187 // This defines a mojo transport format for media::EncryptionScheme.
188 // See media/base/encryption_scheme.h for description.
189 struct EncryptionScheme {
190 CipherMode mode;
191 PatternSpec pattern;
192 };
193
171 // This defines a mojo transport format for media::AudioDecoderConfig. 194 // This defines a mojo transport format for media::AudioDecoderConfig.
172 // See media/base/audio_decoder_config.h for descriptions. 195 // See media/base/audio_decoder_config.h for descriptions.
173 struct AudioDecoderConfig { 196 struct AudioDecoderConfig {
174 AudioCodec codec; 197 AudioCodec codec;
175 SampleFormat sample_format; 198 SampleFormat sample_format;
176 ChannelLayout channel_layout; 199 ChannelLayout channel_layout;
177 int32 samples_per_second; 200 int32 samples_per_second;
178 array<uint8>? extra_data; 201 array<uint8>? extra_data;
179 int64 seek_preroll_usec; 202 int64 seek_preroll_usec;
180 int32 codec_delay; 203 int32 codec_delay;
181 bool is_encrypted; 204 EncryptionScheme encryption_scheme;
182 }; 205 };
183 206
184 // This defines a mojo transport format for media::VideoDecoderConfig. 207 // This defines a mojo transport format for media::VideoDecoderConfig.
185 // See media/base/video_decoder_config.h for descriptions. 208 // See media/base/video_decoder_config.h for descriptions.
186 struct VideoDecoderConfig { 209 struct VideoDecoderConfig {
187 VideoCodec codec; 210 VideoCodec codec;
188 VideoCodecProfile profile; 211 VideoCodecProfile profile;
189 VideoFormat format; 212 VideoFormat format;
190 ColorSpace color_space; 213 ColorSpace color_space;
191 mojo.Size coded_size; 214 mojo.Size coded_size;
192 mojo.Rect visible_rect; 215 mojo.Rect visible_rect;
193 mojo.Size natural_size; 216 mojo.Size natural_size;
194 array<uint8>? extra_data; 217 array<uint8>? extra_data;
195 bool is_encrypted; 218 EncryptionScheme encryption_scheme;
196 }; 219 };
197 220
198 // This defines a mojo transport format for media::SubsampleEntry. 221 // This defines a mojo transport format for media::SubsampleEntry.
199 // See media/base/decrypt_config.h for descriptions. 222 // See media/base/decrypt_config.h for descriptions.
200 struct SubsampleEntry { 223 struct SubsampleEntry {
201 uint32 clear_bytes; 224 uint32 clear_bytes;
202 uint32 cypher_bytes; 225 uint32 cypher_bytes;
203 }; 226 };
204 227
205 // This defines a mojo transport format for media::DecryptConfig. 228 // This defines a mojo transport format for media::DecryptConfig.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 bool end_of_stream; 308 bool end_of_stream;
286 309
287 // Timestamp in microseconds of the associated frame. 310 // Timestamp in microseconds of the associated frame.
288 int64 timestamp_usec; 311 int64 timestamp_usec;
289 312
290 // Frame data for each plane. Will be null for EOS buffers. 313 // Frame data for each plane. Will be null for EOS buffers.
291 array<uint8>? y_data; 314 array<uint8>? y_data;
292 array<uint8>? u_data; 315 array<uint8>? u_data;
293 array<uint8>? v_data; 316 array<uint8>? v_data;
294 }; 317 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698