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

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

Issue 684963003: Add support for external video renderers in mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo_config
Patch Set: Created 6 years, 1 month 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 import "mojo/services/public/interfaces/geometry/geometry.mojom"
6
5 module mojo { 7 module mojo {
6 8
7 // See media/base/buffering_state.h for descriptions. 9 // See media/base/buffering_state.h for descriptions.
8 // Kept in sync with media::BufferingState via COMPILE_ASSERTs. 10 // Kept in sync with media::BufferingState via COMPILE_ASSERTs.
9 enum BufferingState { 11 enum BufferingState {
10 HAVE_NOTHING, 12 HAVE_NOTHING,
11 HAVE_ENOUGH, 13 HAVE_ENOUGH,
12 }; 14 };
13 15
14 // See media/base/audio_decoder_config.h for descriptions. 16 // See media/base/audio_decoder_config.h for descriptions.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 UNKNOWN = 0, 79 UNKNOWN = 0,
78 U8, 80 U8,
79 S16, 81 S16,
80 S32, 82 S32,
81 F32, 83 F32,
82 PlanarS16, 84 PlanarS16,
83 PlanarF32, 85 PlanarF32,
84 Max = PlanarF32, 86 Max = PlanarF32,
85 }; 87 };
86 88
89 enum VideoFormat {
90 UNKNOWN = 0, // Unknown format value.
91 YV12 = 1, // 12bpp YVU planar 1x1 Y, 2x2 VU samples
92 YV16 = 2, // 16bpp YVU planar 1x1 Y, 2x1 VU samples
93 I420 = 3, // 12bpp YVU planar 1x1 Y, 2x2 UV samples.
94 YV12A = 4, // 20bpp YUVA planar 1x1 Y, 2x2 VU, 1x1 A samples.
95 HOLE = 5, // Hole frame.
96 NATIVE_TEXTURE = 6, // Native texture. Pixel-format agnostic.
97 YV12J = 7, // JPEG color range version of YV12
98 NV12 = 8, // 12bpp 1x1 Y plane followed by an interleaved 2x2 UV plane.
99 YV24 = 9, // 24bpp YUV planar, no subsampling.
100 FORMAT_MAX = YV24, // Must always be equal to largest entry logged.
101 };
102
103 enum VideoCodec {
104 UNKNOWN = 0,
105 H264,
106 VC1,
107 MPEG2,
108 MPEG4,
109 THEORA,
110 VP8,
111 VP9,
112 Max = VP9
113 };
114
115 // Video stream profile. This *must* match PP_VideoDecoder_Profile.
116 // (enforced in webkit/plugins/ppapi/ppb_video_decoder_impl.cc) and
117 // gpu::VideoCodecProfile.
xhwang 2014/10/29 00:22:13 Update: needs to match media::VideoCodecProfile.
DaleCurtis 2014/10/30 23:16:56 Done.
118 enum VideoCodecProfile {
119 // Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
120 // for example), and keep the values for a particular format grouped
121 // together for clarity.
122 VIDEO_CODEC_PROFILE_UNKNOWN = -1,
123 VIDEO_CODEC_PROFILE_MIN = VIDEO_CODEC_PROFILE_UNKNOWN,
124 H264PROFILE_MIN = 0,
125 H264PROFILE_BASELINE = H264PROFILE_MIN,
126 H264PROFILE_MAIN = 1,
127 H264PROFILE_EXTENDED = 2,
128 H264PROFILE_HIGH = 3,
129 H264PROFILE_HIGH10PROFILE = 4,
130 H264PROFILE_HIGH422PROFILE = 5,
131 H264PROFILE_HIGH444PREDICTIVEPROFILE = 6,
132 H264PROFILE_SCALABLEBASELINE = 7,
133 H264PROFILE_SCALABLEHIGH = 8,
134 H264PROFILE_STEREOHIGH = 9,
135 H264PROFILE_MULTIVIEWHIGH = 10,
136 H264PROFILE_MAX = H264PROFILE_MULTIVIEWHIGH,
137 VP8PROFILE_MIN = 11,
138 VP8PROFILE_ANY = VP8PROFILE_MIN,
139 VP8PROFILE_MAX = VP8PROFILE_ANY,
140 VP9PROFILE_MIN = 12,
141 VP9PROFILE_ANY = VP9PROFILE_MIN,
142 VP9PROFILE_MAX = VP9PROFILE_ANY,
143 VIDEO_CODEC_PROFILE_MAX = VP9PROFILE_MAX,
144 };
145
87 // This defines a mojo transport format for media::AudioDecoderConfig. 146 // This defines a mojo transport format for media::AudioDecoderConfig.
88 // See media/base/audio_decoder_config.h for descriptions. 147 // See media/base/audio_decoder_config.h for descriptions.
89 struct AudioDecoderConfig { 148 struct AudioDecoderConfig {
90 AudioCodec codec; 149 AudioCodec codec;
91 SampleFormat sample_format; 150 SampleFormat sample_format;
92 ChannelLayout channel_layout; 151 ChannelLayout channel_layout;
93 int32 samples_per_second; 152 int32 samples_per_second;
94 array<uint8>? extra_data; 153 array<uint8>? extra_data;
95 int64 seek_preroll_usec; 154 int64 seek_preroll_usec;
96 int32 codec_delay; 155 int32 codec_delay;
97 }; 156 };
98 157
158 struct VideoDecoderConfig {
159 VideoCodec codec;
160 VideoCodecProfile profile;
161 VideoFormat format;
162 Size coded_size;
163 Rect visible_rect;
164 Size natural_size;
165 array<uint8>? extra_data;
166 bool is_encrypted;
167 };
168
99 // This defines a mojo transport format for media::DecoderBuffer. 169 // This defines a mojo transport format for media::DecoderBuffer.
100 struct MediaDecoderBuffer { 170 struct MediaDecoderBuffer {
101 // See media/base/buffers.h for details. 171 // See media/base/buffers.h for details.
102 int64 timestamp_usec; 172 int64 timestamp_usec;
103 int64 duration_usec; 173 int64 duration_usec;
104 174
105 // The number of bytes in |data|. 175 // The number of bytes in |data|.
106 uint32 data_size; 176 uint32 data_size;
107 177
108 // This is backed by an std::vector and results in a few copies. 178 // 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. 179 // Into the vector, onto and off the MessagePipe, back into a vector.
110 array<uint8>? side_data; 180 array<uint8>? side_data;
111 uint32 side_data_size; 181 uint32 side_data_size;
112 182
113 // These fields indicate the amount of data to discard after decoding. 183 // These fields indicate the amount of data to discard after decoding.
114 int64 front_discard_usec; 184 int64 front_discard_usec;
115 int64 back_discard_usec; 185 int64 back_discard_usec;
116 186
117 // Indicates this buffer is part of a splice around |splice_timestamp_usec|. 187 // Indicates this buffer is part of a splice around |splice_timestamp_usec|.
118 int64 splice_timestamp_usec; 188 int64 splice_timestamp_usec;
119 189
120 // The payload. Invalid handle indicates an end-of-stream (EOS) buffer. 190 // The payload. Invalid handle indicates an end-of-stream (EOS) buffer.
121 // TODO(tim): This currently results in allocating a new, largeish DataPipe 191 // 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 192 // for each buffer. Remove this once framed data pipes exist, but using this
123 // for now for prototyping audio. 193 // for now for prototyping audio.
124 handle<data_pipe_consumer>? data; 194 handle<data_pipe_consumer>? data;
125 }; 195 };
126 196
127 } // module mojo 197 } // module mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698