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

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

Issue 2419793003: media: Use native video enum types in media mojo interfaces (Closed)
Patch Set: media: Use native video enum types in media mojo interfaces Created 4 years, 2 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
« no previous file with comments | « media/mojo/common/media_type_converters.cc ('k') | media/mojo/interfaces/media_types.typemap » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.mojom; 5 module media.mojom;
6 6
7 import "ui/gfx/geometry/mojo/geometry.mojom"; 7 import "ui/gfx/geometry/mojo/geometry.mojom";
8 import "mojo/common/common_custom_types.mojom"; 8 import "mojo/common/common_custom_types.mojom";
9 9
10 // See media/base/buffering_state.h for descriptions. 10 // See media/base/buffering_state.h for descriptions.
(...skipping 10 matching lines...) Expand all
21 21
22 // See media/base/channel_layout.h for descriptions. 22 // See media/base/channel_layout.h for descriptions.
23 [Native] 23 [Native]
24 enum ChannelLayout; 24 enum ChannelLayout;
25 25
26 // See media/base/sample_format.h for descriptions. 26 // See media/base/sample_format.h for descriptions.
27 [Native] 27 [Native]
28 enum SampleFormat; 28 enum SampleFormat;
29 29
30 // See media/base/video_types.h for descriptions. 30 // See media/base/video_types.h for descriptions.
31 // Kept in sync with media::VideoPixelFormat via static_asserts. 31 [Native]
32 enum VideoFormat { 32 enum VideoPixelFormat;
33 UNKNOWN = 0,
34 I420,
35 YV12,
36 YV16,
37 YV12A,
38 YV24,
39 NV12,
40 NV21,
41 UYVY,
42 YUY2,
43 ARGB,
44 XRGB,
45 RGB24,
46 RGB32,
47 MJPEG,
48 MT21,
49 YUV420P9,
50 YUV420P10,
51 YUV422P9,
52 YUV422P10,
53 YUV444P9,
54 YUV444P10,
55 YUV420P12,
56 YUV422P12,
57 YUV444P12,
58 Y8,
59 Y16,
60 FORMAT_MAX = Y16,
61 };
62 33
63 // Kept in sync with media::ColorSpace via static_asserts. 34 // See media/base/video_types.h for descriptions.
64 enum ColorSpace { 35 [Native]
65 UNSPECIFIED = 0, 36 enum ColorSpace;
66 JPEG = 1,
67 HD_REC709 = 2,
68 SD_REC601 = 3,
69 MAX = SD_REC601,
70 };
71 37
72 // See media/base/video_decoder_config.h for descriptions. 38 // See media/base/video_codecs.h for descriptions.
73 // Kept in sync with media::VideoCodec via static_asserts. 39 [Native]
74 enum VideoCodec { 40 enum VideoCodec;
75 UNKNOWN = 0,
76 H264,
77 VC1,
78 MPEG2,
79 MPEG4,
80 Theora,
81 VP8,
82 VP9,
83 HEVC,
84 Max = HEVC,
85 };
86 41
87 // See media/base/video_decoder_config.h for descriptions. 42 // See media/base/video_codecs.h for descriptions.
88 // Kept in sync with media::VideoCodecProfile via static_asserts. 43 [Native]
89 enum VideoCodecProfile { 44 enum VideoCodecProfile;
90 VIDEO_CODEC_PROFILE_UNKNOWN = -1,
91 VIDEO_CODEC_PROFILE_MIN = VIDEO_CODEC_PROFILE_UNKNOWN,
92 H264PROFILE_MIN = 0,
93 H264PROFILE_BASELINE = H264PROFILE_MIN,
94 H264PROFILE_MAIN,
95 H264PROFILE_EXTENDED,
96 H264PROFILE_HIGH,
97 H264PROFILE_HIGH10PROFILE,
98 H264PROFILE_HIGH422PROFILE,
99 H264PROFILE_HIGH444PREDICTIVEPROFILE,
100 H264PROFILE_SCALABLEBASELINE,
101 H264PROFILE_SCALABLEHIGH,
102 H264PROFILE_STEREOHIGH,
103 H264PROFILE_MULTIVIEWHIGH,
104 H264PROFILE_MAX = H264PROFILE_MULTIVIEWHIGH,
105 VP8PROFILE_MIN,
106 VP8PROFILE_ANY = VP8PROFILE_MIN,
107 VP8PROFILE_MAX = VP8PROFILE_ANY,
108 VP9PROFILE_MIN,
109 VP9PROFILE_PROFILE0 = VP9PROFILE_MIN,
110 VP9PROFILE_PROFILE1,
111 VP9PROFILE_PROFILE2,
112 VP9PROFILE_PROFILE3,
113 VP9PROFILE_MAX = VP9PROFILE_PROFILE3,
114 HEVCPROFILE_MIN,
115 HEVCPROFILE_MAIN = HEVCPROFILE_MIN,
116 HEVCPROFILE_MAIN10,
117 HEVCPROFILE_MAIN_STILL_PICTURE,
118 HEVCPROFILE_MAX = HEVCPROFILE_MAIN_STILL_PICTURE,
119 VIDEO_CODEC_PROFILE_MAX = HEVCPROFILE_MAX,
120 };
121 45
122 // See media/base/encryption_scheme.h. 46 // See media/base/encryption_scheme.h.
123 // Kept in sync with media::CipherMode via static_asserts. 47 // Kept in sync with media::CipherMode via static_asserts.
124 enum CipherMode { 48 enum CipherMode {
125 UNENCRYPTED = 0, 49 UNENCRYPTED = 0,
126 AES_CTR, 50 AES_CTR,
127 AES_CBC, 51 AES_CBC,
128 MAX = AES_CBC 52 MAX = AES_CBC
129 }; 53 };
130 54
(...skipping 22 matching lines...) Expand all
153 mojo.common.mojom.TimeDelta seek_preroll; 77 mojo.common.mojom.TimeDelta seek_preroll;
154 int32 codec_delay; 78 int32 codec_delay;
155 EncryptionScheme encryption_scheme; 79 EncryptionScheme encryption_scheme;
156 }; 80 };
157 81
158 // This defines a mojo transport format for media::VideoDecoderConfig. 82 // This defines a mojo transport format for media::VideoDecoderConfig.
159 // See media/base/video_decoder_config.h for descriptions. 83 // See media/base/video_decoder_config.h for descriptions.
160 struct VideoDecoderConfig { 84 struct VideoDecoderConfig {
161 VideoCodec codec; 85 VideoCodec codec;
162 VideoCodecProfile profile; 86 VideoCodecProfile profile;
163 VideoFormat format; 87 VideoPixelFormat format;
164 ColorSpace color_space; 88 ColorSpace color_space;
165 gfx.mojom.Size coded_size; 89 gfx.mojom.Size coded_size;
166 gfx.mojom.Rect visible_rect; 90 gfx.mojom.Rect visible_rect;
167 gfx.mojom.Size natural_size; 91 gfx.mojom.Size natural_size;
168 array<uint8> extra_data; 92 array<uint8> extra_data;
169 EncryptionScheme encryption_scheme; 93 EncryptionScheme encryption_scheme;
170 }; 94 };
171 95
172 // Native struct media::SubsampleEntry; 96 // Native struct media::SubsampleEntry;
173 [Native] 97 [Native]
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // Timestamp in microseconds of the first frame. 154 // Timestamp in microseconds of the first frame.
231 mojo.common.mojom.TimeDelta timestamp; 155 mojo.common.mojom.TimeDelta timestamp;
232 156
233 // Channel data. Will be empty for EOS buffers. 157 // Channel data. Will be empty for EOS buffers.
234 array<uint8> data; 158 array<uint8> data;
235 }; 159 };
236 160
237 // This defines a mojo transport format for media::VideoFrame. 161 // This defines a mojo transport format for media::VideoFrame.
238 struct VideoFrame { 162 struct VideoFrame {
239 // Format of the frame. 163 // Format of the frame.
240 VideoFormat format; 164 VideoPixelFormat format;
241 165
242 // Width and height of the video frame, in pixels. 166 // Width and height of the video frame, in pixels.
243 gfx.mojom.Size coded_size; 167 gfx.mojom.Size coded_size;
244 168
245 // Visible size of the frame. 169 // Visible size of the frame.
246 gfx.mojom.Rect visible_rect; 170 gfx.mojom.Rect visible_rect;
247 171
248 // Natural size of the frame. 172 // Natural size of the frame.
249 gfx.mojom.Size natural_size; 173 gfx.mojom.Size natural_size;
250 174
(...skipping 18 matching lines...) Expand all
269 }; 193 };
270 194
271 struct PipelineStatistics { 195 struct PipelineStatistics {
272 uint64 audio_bytes_decoded; 196 uint64 audio_bytes_decoded;
273 uint64 video_bytes_decoded; 197 uint64 video_bytes_decoded;
274 uint32 video_frames_decoded; 198 uint32 video_frames_decoded;
275 uint32 video_frames_dropped; 199 uint32 video_frames_dropped;
276 int64 audio_memory_usage; 200 int64 audio_memory_usage;
277 int64 video_memory_usage; 201 int64 video_memory_usage;
278 }; 202 };
OLDNEW
« no previous file with comments | « media/mojo/common/media_type_converters.cc ('k') | media/mojo/interfaces/media_types.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698