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

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: More MSVC... 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
« no previous file with comments | « media/mojo/interfaces/media_renderer.mojom ('k') | media/mojo/services/BUILD.gn » ('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 mojo; 5 module mojo;
6 6
7 import "mojo/services/public/interfaces/geometry/geometry.mojom";
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.
15 // Kept in sync with media::AudioCodec via COMPILE_ASSERTs. 17 // Kept in sync with media::AudioCodec via COMPILE_ASSERTs.
16 enum AudioCodec { 18 enum AudioCodec {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 k_6_0_FRONT = 21, 63 k_6_0_FRONT = 21,
62 k_HEXAGONAL = 22, 64 k_HEXAGONAL = 22,
63 k_6_1 = 23, 65 k_6_1 = 23,
64 k_6_1_BACK = 24, 66 k_6_1_BACK = 24,
65 k_6_1_FRONT = 25, 67 k_6_1_FRONT = 25,
66 k_7_0_FRONT = 26, 68 k_7_0_FRONT = 26,
67 k_7_1_WIDE_BACK = 27, 69 k_7_1_WIDE_BACK = 27,
68 k_OCTAGONAL = 28, 70 k_OCTAGONAL = 28,
69 k_DISCRETE = 29, 71 k_DISCRETE = 29,
70 k_STEREO_AND_KEYBOARD_MIC = 30, 72 k_STEREO_AND_KEYBOARD_MIC = 30,
71 k_MAX = k_STEREO_AND_KEYBOARD_MIC 73 k_MAX = k_STEREO_AND_KEYBOARD_MIC,
72 }; 74 };
73 75
74 // See media/base/sample_format.h for descriptions. 76 // See media/base/sample_format.h for descriptions.
75 // Kept in sync with media::SampleFormat via COMPILE_ASSERTs. 77 // Kept in sync with media::SampleFormat via COMPILE_ASSERTs.
76 enum SampleFormat { 78 enum SampleFormat {
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 // See media/base/video_frame.h for descriptions.
90 // Kept in sync with media::VideoFrame::Format via COMPILE_ASSERTs.
91 enum VideoFormat {
92 UNKNOWN = 0,
93 YV12,
94 YV16,
95 I420,
96 YV12A,
97 HOLE,
98 NATIVE_TEXTURE,
99 YV12J,
100 NV12,
101 YV24,
102 FORMAT_MAX = YV24,
103 };
104
105 // See media/base/video_decoder_config.h for descriptions.
106 // Kept in sync with media::VideoCodec via COMPILE_ASSERTs.
107 enum VideoCodec {
108 UNKNOWN = 0,
109 H264,
110 VC1,
111 MPEG2,
112 MPEG4,
113 Theora,
114 VP8,
115 VP9,
116 Max = VP9,
117 };
118
119 // See media/base/video_decoder_config.h for descriptions.
120 // Kept in sync with media::VideoCodecProfile via COMPILE_ASSERTs.
121 enum VideoCodecProfile {
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 // This defines a mojo transport format for media::VideoDecoderConfig.
159 // See media/base/video_decoder_config.h for descriptions.
160 struct VideoDecoderConfig {
161 VideoCodec codec;
162 VideoCodecProfile profile;
163 VideoFormat format;
164 Size coded_size;
165 Rect visible_rect;
166 Size natural_size;
167 array<uint8>? extra_data;
168 bool is_encrypted;
169 };
170
99 // This defines a mojo transport format for media::DecoderBuffer. 171 // This defines a mojo transport format for media::DecoderBuffer.
100 struct MediaDecoderBuffer { 172 struct MediaDecoderBuffer {
101 // See media/base/buffers.h for details. 173 // See media/base/buffers.h for details.
102 int64 timestamp_usec; 174 int64 timestamp_usec;
103 int64 duration_usec; 175 int64 duration_usec;
104 176
105 // The number of bytes in |data|. 177 // The number of bytes in |data|.
106 uint32 data_size; 178 uint32 data_size;
107 179
108 // This is backed by an std::vector and results in a few copies. 180 // 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. 181 // Into the vector, onto and off the MessagePipe, back into a vector.
110 array<uint8>? side_data; 182 array<uint8>? side_data;
111 uint32 side_data_size; 183 uint32 side_data_size;
112 184
113 // These fields indicate the amount of data to discard after decoding. 185 // These fields indicate the amount of data to discard after decoding.
114 int64 front_discard_usec; 186 int64 front_discard_usec;
115 int64 back_discard_usec; 187 int64 back_discard_usec;
116 188
117 // Indicates this buffer is part of a splice around |splice_timestamp_usec|. 189 // Indicates this buffer is part of a splice around |splice_timestamp_usec|.
118 int64 splice_timestamp_usec; 190 int64 splice_timestamp_usec;
119 191
120 // The payload. Invalid handle indicates an end-of-stream (EOS) buffer. 192 // The payload. Invalid handle indicates an end-of-stream (EOS) buffer.
121 // TODO(tim): This currently results in allocating a new, largeish DataPipe 193 // 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 194 // for each buffer. Remove this once framed data pipes exist, but using this
123 // for now for prototyping audio. 195 // for now for prototyping audio.
124 handle<data_pipe_consumer>? data; 196 handle<data_pipe_consumer>? data;
125 }; 197 };
OLDNEW
« no previous file with comments | « media/mojo/interfaces/media_renderer.mojom ('k') | media/mojo/services/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698