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

Side by Side Diff: media/remoting/proto/remoting_rpc_message.proto

Issue 2631993002: Media Remoting: UMAs to track session events and measurements. (Closed)
Patch Set: Created 3 years, 11 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 // Protocol buffer for Media Remoting. 5 // Protocol buffer for Media Remoting.
6 6
7 syntax = "proto2"; 7 syntax = "proto2";
8 8
9 option optimize_for = LITE_RUNTIME; 9 option optimize_for = LITE_RUNTIME;
10 10
(...skipping 14 matching lines...) Expand all
25 optional bool is_eos = 9; 25 optional bool is_eos = 9;
26 } 26 }
27 27
28 // Utility proto data structure 28 // Utility proto data structure
29 message Size { 29 message Size {
30 optional int32 width = 1; 30 optional int32 width = 1;
31 optional int32 height = 2; 31 optional int32 height = 2;
32 } 32 }
33 33
34 message EncryptionScheme { 34 message EncryptionScheme {
35 // Align with EncryptionScheme::CipherMode 35 // Proto version of EncryptionScheme::CipherMode.
36 // NEVER change these numbers or re-use old ones; only add new ones.
36 enum CipherMode { 37 enum CipherMode {
37 CIPHER_MODE_UNENCRYPTED = 0; 38 CIPHER_MODE_UNENCRYPTED = 0;
38 CIPHER_MODE_AES_CTR = 1; 39 CIPHER_MODE_AES_CTR = 1;
39 CIPHER_MODE_AES_CBC = 2; 40 CIPHER_MODE_AES_CBC = 2;
40 } 41 }
41 42
42 optional CipherMode mode = 1; 43 optional CipherMode mode = 1;
43 optional uint32 encrypt_blocks = 2; 44 optional uint32 encrypt_blocks = 2;
44 optional uint32 skip_blocks = 3; 45 optional uint32 skip_blocks = 3;
45 } 46 }
46 47
47 message AudioDecoderConfig { 48 message AudioDecoderConfig {
48 // Should align with ::media::Codec 49 // Proto version of media::Codec.
50 // NEVER change these numbers or re-use old ones; only add new ones.
49 enum Codec { 51 enum Codec {
50 kUnknownAudioCodec = 0; 52 kUnknownAudioCodec = 0;
51 kCodecAAC = 1; 53 kCodecAAC = 1;
52 kCodecMP3 = 2; 54 kCodecMP3 = 2;
53 kCodecPCM = 3; 55 kCodecPCM = 3;
54 kCodecVorbis = 4; 56 kCodecVorbis = 4;
55 kCodecFLAC = 5; 57 kCodecFLAC = 5;
56 kCodecAMR_NB = 6; 58 kCodecAMR_NB = 6;
57 kCodecAMR_WB = 7; 59 kCodecAMR_WB = 7;
58 kCodecPCM_MULAW = 8; 60 kCodecPCM_MULAW = 8;
59 kCodecGSM_MS = 9; 61 kCodecGSM_MS = 9;
60 kCodecPCM_S16BE = 10; 62 kCodecPCM_S16BE = 10;
61 kCodecPCM_S24BE = 11; 63 kCodecPCM_S24BE = 11;
62 kCodecOpus = 12; 64 kCodecOpus = 12;
63 kCodecEAC3 = 13; 65 kCodecEAC3 = 13;
64 kCodecPCM_ALAW = 14; 66 kCodecPCM_ALAW = 14;
65 kCodecALAC = 15; 67 kCodecALAC = 15;
66 kCodecAC3 = 16; 68 kCodecAC3 = 16;
67 } 69 }
68 70
69 // Should align with ::media::SampleFormat 71 // Proto version of media::SampleFormat.
72 // NEVER change these numbers or re-use old ones; only add new ones.
70 enum SampleFormat { 73 enum SampleFormat {
71 kUnknownSampleFormat = 0; 74 kUnknownSampleFormat = 0;
72 kSampleFormatU8 = 1; 75 kSampleFormatU8 = 1;
73 kSampleFormatS16 = 2; 76 kSampleFormatS16 = 2;
74 kSampleFormatS32 = 3; 77 kSampleFormatS32 = 3;
75 kSampleFormatF32 = 4; 78 kSampleFormatF32 = 4;
76 kSampleFormatPlanarS16 = 5; 79 kSampleFormatPlanarS16 = 5;
77 kSampleFormatPlanarF32 = 6; 80 kSampleFormatPlanarF32 = 6;
78 kSampleFormatPlanarS32 = 7; 81 kSampleFormatPlanarS32 = 7;
79 kSampleFormatS24 = 8; 82 kSampleFormatS24 = 8;
80 kSampleFormatAc3 = 9; 83 kSampleFormatAc3 = 9;
81 kSampleFormatEac3 = 10; 84 kSampleFormatEac3 = 10;
82 }; 85 };
83 86
84 // Should align with ::media::ChannelLayout 87 // Proto version of media::ChannelLayout.
88 // NEVER change these numbers or re-use old ones; only add new ones.
85 enum ChannelLayout { 89 enum ChannelLayout {
86 CHANNEL_LAYOUT_NONE = 0; 90 CHANNEL_LAYOUT_NONE = 0;
87 CHANNEL_LAYOUT_UNSUPPORTED = 1; 91 CHANNEL_LAYOUT_UNSUPPORTED = 1;
88 CHANNEL_LAYOUT_MONO = 2; 92 CHANNEL_LAYOUT_MONO = 2;
89 CHANNEL_LAYOUT_STEREO = 3; 93 CHANNEL_LAYOUT_STEREO = 3;
90 CHANNEL_LAYOUT_2_1 = 4; 94 CHANNEL_LAYOUT_2_1 = 4;
91 CHANNEL_LAYOUT_SURROUND = 5; 95 CHANNEL_LAYOUT_SURROUND = 5;
92 CHANNEL_LAYOUT_4_0 = 6; 96 CHANNEL_LAYOUT_4_0 = 6;
93 CHANNEL_LAYOUT_2_2 = 7; 97 CHANNEL_LAYOUT_2_2 = 7;
94 CHANNEL_LAYOUT_QUAD = 8; 98 CHANNEL_LAYOUT_QUAD = 8;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 } 132 }
129 133
130 message Rect { 134 message Rect {
131 optional int32 x = 1; 135 optional int32 x = 1;
132 optional int32 y = 2; 136 optional int32 y = 2;
133 optional int32 width = 3; 137 optional int32 width = 3;
134 optional int32 height = 4; 138 optional int32 height = 4;
135 } 139 }
136 140
137 message VideoDecoderConfig { 141 message VideoDecoderConfig {
138 // Should align with ::media::VideoCodec 142 // Proto version of media::VideoCodec.
143 // NEVER change these numbers or re-use old ones; only add new ones.
139 enum Codec { 144 enum Codec {
140 kUnknownVideoCodec = 0; 145 kUnknownVideoCodec = 0;
141 kCodecH264 = 1; 146 kCodecH264 = 1;
142 kCodecVC1 = 2; 147 kCodecVC1 = 2;
143 kCodecMPEG2 = 3; 148 kCodecMPEG2 = 3;
144 kCodecMPEG4 = 4; 149 kCodecMPEG4 = 4;
145 kCodecTheora = 5; 150 kCodecTheora = 5;
146 kCodecVP8 = 6; 151 kCodecVP8 = 6;
147 kCodecVP9 = 7; 152 kCodecVP9 = 7;
148 kCodecHEVC = 8; 153 kCodecHEVC = 8;
149 } 154 }
150 155
151 // Should align with ::media::VideoCodecProfile 156 // Proto version of media::VideoCodecProfile.
157 // NEVER change these numbers or re-use old ones; only add new ones.
152 enum Profile { 158 enum Profile {
153 VIDEO_CODEC_PROFILE_UNKNOWN = -1; 159 VIDEO_CODEC_PROFILE_UNKNOWN = -1;
154 H264PROFILE_BASELINE = 0; 160 H264PROFILE_BASELINE = 0;
155 H264PROFILE_MAIN = 1; 161 H264PROFILE_MAIN = 1;
156 H264PROFILE_EXTENDED = 2; 162 H264PROFILE_EXTENDED = 2;
157 H264PROFILE_HIGH = 3; 163 H264PROFILE_HIGH = 3;
158 H264PROFILE_HIGH10PROFILE = 4; 164 H264PROFILE_HIGH10PROFILE = 4;
159 H264PROFILE_HIGH422PROFILE = 5; 165 H264PROFILE_HIGH422PROFILE = 5;
160 H264PROFILE_HIGH444PREDICTIVEPROFILE = 6; 166 H264PROFILE_HIGH444PREDICTIVEPROFILE = 6;
161 H264PROFILE_SCALABLEBASELINE = 7; 167 H264PROFILE_SCALABLEBASELINE = 7;
162 H264PROFILE_SCALABLEHIGH = 8; 168 H264PROFILE_SCALABLEHIGH = 8;
163 H264PROFILE_STEREOHIGH = 9; 169 H264PROFILE_STEREOHIGH = 9;
164 H264PROFILE_MULTIVIEWHIGH = 10; 170 H264PROFILE_MULTIVIEWHIGH = 10;
165 VP8PROFILE_ANY = 11; 171 VP8PROFILE_ANY = 11;
166 VP9PROFILE_PROFILE0 = 12; 172 VP9PROFILE_PROFILE0 = 12;
167 VP9PROFILE_PROFILE1 = 13; 173 VP9PROFILE_PROFILE1 = 13;
168 VP9PROFILE_PROFILE2 = 14; 174 VP9PROFILE_PROFILE2 = 14;
169 VP9PROFILE_PROFILE3 = 15; 175 VP9PROFILE_PROFILE3 = 15;
170 HEVCPROFILE_MAIN = 16; 176 HEVCPROFILE_MAIN = 16;
171 HEVCPROFILE_MAIN10 = 17; 177 HEVCPROFILE_MAIN10 = 17;
172 HEVCPROFILE_MAIN_STILL_PICTURE = 18; 178 HEVCPROFILE_MAIN_STILL_PICTURE = 18;
173 }; 179 };
174 180
175 // Should align with ::media::VideoPixelFormat 181 // Proto version of media::VideoPixelFormat.
182 // NEVER change these numbers or re-use old ones; only add new ones.
176 enum Format { 183 enum Format {
177 PIXEL_FORMAT_UNKNOWN = 0; 184 PIXEL_FORMAT_UNKNOWN = 0;
178 PIXEL_FORMAT_I420 = 1; 185 PIXEL_FORMAT_I420 = 1;
179 PIXEL_FORMAT_YV12 = 2; 186 PIXEL_FORMAT_YV12 = 2;
180 PIXEL_FORMAT_YV16 = 3; 187 PIXEL_FORMAT_YV16 = 3;
181 PIXEL_FORMAT_YV12A = 4; 188 PIXEL_FORMAT_YV12A = 4;
182 PIXEL_FORMAT_YV24 = 5; 189 PIXEL_FORMAT_YV24 = 5;
183 PIXEL_FORMAT_NV12 = 6; 190 PIXEL_FORMAT_NV12 = 6;
184 PIXEL_FORMAT_NV21 = 7; 191 PIXEL_FORMAT_NV21 = 7;
185 PIXEL_FORMAT_UYVY = 8; 192 PIXEL_FORMAT_UYVY = 8;
(...skipping 11 matching lines...) Expand all
197 PIXEL_FORMAT_YUV444P9 = 20; 204 PIXEL_FORMAT_YUV444P9 = 20;
198 PIXEL_FORMAT_YUV444P10 = 21; 205 PIXEL_FORMAT_YUV444P10 = 21;
199 PIXEL_FORMAT_YUV420P12 = 22; 206 PIXEL_FORMAT_YUV420P12 = 22;
200 PIXEL_FORMAT_YUV422P12 = 23; 207 PIXEL_FORMAT_YUV422P12 = 23;
201 PIXEL_FORMAT_YUV444P12 = 24; 208 PIXEL_FORMAT_YUV444P12 = 24;
202 PIXEL_FORMAT_Y8 = 25; 209 PIXEL_FORMAT_Y8 = 25;
203 PIXEL_FORMAT_Y16 = 26; 210 PIXEL_FORMAT_Y16 = 26;
204 PIXEL_FORMAT_I422 = 27; 211 PIXEL_FORMAT_I422 = 27;
205 }; 212 };
206 213
207 // Should align with ::media::ColorSpace 214 // Proto version of media::ColorSpace.
215 // NEVER change these numbers or re-use old ones; only add new ones.
208 enum ColorSpace { 216 enum ColorSpace {
209 COLOR_SPACE_UNSPECIFIED = 0; 217 COLOR_SPACE_UNSPECIFIED = 0;
210 COLOR_SPACE_JPEG = 1; 218 COLOR_SPACE_JPEG = 1;
211 COLOR_SPACE_HD_REC709 = 2; 219 COLOR_SPACE_HD_REC709 = 2;
212 COLOR_SPACE_SD_REC601 = 3; 220 COLOR_SPACE_SD_REC601 = 3;
213 }; 221 };
214 222
215 optional Codec codec = 1; 223 optional Codec codec = 1;
216 optional EncryptionScheme encryption_scheme = 2; 224 optional EncryptionScheme encryption_scheme = 2;
217 optional Profile profile = 3; 225 optional Profile profile = 3;
(...skipping 19 matching lines...) Expand all
237 message PipelineStatistics { 245 message PipelineStatistics {
238 optional uint64 audio_bytes_decoded = 1; 246 optional uint64 audio_bytes_decoded = 1;
239 optional uint64 video_bytes_decoded = 2; 247 optional uint64 video_bytes_decoded = 2;
240 optional uint32 video_frames_decoded = 3; 248 optional uint32 video_frames_decoded = 3;
241 optional uint32 video_frames_dropped = 4; 249 optional uint32 video_frames_dropped = 4;
242 optional int64 audio_memory_usage = 5; 250 optional int64 audio_memory_usage = 5;
243 optional int64 video_memory_usage = 6; 251 optional int64 video_memory_usage = 6;
244 }; 252 };
245 253
246 message CdmKeyInformation { 254 message CdmKeyInformation {
247 // Align with ::media::CdmKeyInformation::KeyStatus 255 // Proto version of media::CdmKeyInformation::KeyStatus.
256 // NEVER change these numbers or re-use old ones; only add new ones.
248 enum KeyStatus { 257 enum KeyStatus {
249 USABLE = 0; 258 USABLE = 0;
250 INTERNAL_ERROR = 1; 259 INTERNAL_ERROR = 1;
251 EXPIRED = 2; 260 EXPIRED = 2;
252 OUTPUT_RESTRICTED = 3; 261 OUTPUT_RESTRICTED = 3;
253 OUTPUT_DOWNSCALED = 4; 262 OUTPUT_DOWNSCALED = 4;
254 KEY_STATUS_PENDING = 5; 263 KEY_STATUS_PENDING = 5;
255 RELEASED = 6; 264 RELEASED = 6;
256 } 265 }
257 266
258 optional bytes key_id = 1; 267 optional bytes key_id = 1;
259 optional KeyStatus status = 2; 268 optional KeyStatus status = 2;
260 optional uint32 system_code = 3; 269 optional uint32 system_code = 3;
261 } 270 }
262 271
263 // Should align with ::media::CdmPromise::Exception 272 // Proto version of media::CdmPromise::Exception.
273 // NEVER change these numbers or re-use old ones; only add new ones.
264 enum CdmException { 274 enum CdmException {
265 NOT_SUPPORTED_ERROR = 0; 275 NOT_SUPPORTED_ERROR = 0;
266 INVALID_STATE_ERROR = 1; 276 INVALID_STATE_ERROR = 1;
267 INVALID_ACCESS_ERROR = 2; 277 INVALID_ACCESS_ERROR = 2;
268 QUOTA_EXCEEDED_ERROR = 3; 278 QUOTA_EXCEEDED_ERROR = 3;
269 UNKNOWN_ERROR = 4; 279 UNKNOWN_ERROR = 4;
270 CLIENT_ERROR = 5; 280 CLIENT_ERROR = 5;
271 OUTPUT_ERROR = 6; 281 OUTPUT_ERROR = 6;
272 } 282 }
273 283
274 // Should align with ::media::ContentDecryptionModule::MessageType 284 // Proto version of media::ContentDecryptionModule::MessageType.
285 // NEVER change these numbers or re-use old ones; only add new ones.
275 enum CdmMessageType { 286 enum CdmMessageType {
276 LICENSE_REQUEST = 0; 287 LICENSE_REQUEST = 0;
277 LICENSE_RENEWAL = 1; 288 LICENSE_RENEWAL = 1;
278 LICENSE_RELEASE = 2; 289 LICENSE_RELEASE = 2;
279 } 290 }
280 291
281 // Should align with ::media::CdmSessionType 292 // Proto version of media::CdmSessionType.
293 // NEVER change these numbers or re-use old ones; only add new ones.
282 enum CdmSessionType { 294 enum CdmSessionType {
283 TEMPORARY_SESSION = 0; 295 TEMPORARY_SESSION = 0;
284 PERSISTENT_LICENSE_SESSION = 1; 296 PERSISTENT_LICENSE_SESSION = 1;
285 PERSISTENT_RELEASE_MESSAGE_SESSION = 2; 297 PERSISTENT_RELEASE_MESSAGE_SESSION = 2;
286 }; 298 };
287 299
288 message RendererInitialize { 300 message RendererInitialize {
289 optional int32 client_handle = 1; 301 optional int32 client_handle = 1;
290 optional int32 audio_demuxer_handle = 2; 302 optional int32 audio_demuxer_handle = 2;
291 optional int32 video_demuxer_handle = 3; 303 optional int32 video_demuxer_handle = 3;
(...skipping 10 matching lines...) Expand all
302 optional int32 cdm_id = 1; 314 optional int32 cdm_id = 1;
303 optional int32 callback_handle = 2; 315 optional int32 callback_handle = 2;
304 } 316 }
305 317
306 message RendererClientOnTimeUpdate { 318 message RendererClientOnTimeUpdate {
307 optional int64 time_usec = 1; 319 optional int64 time_usec = 1;
308 optional int64 max_time_usec = 2; 320 optional int64 max_time_usec = 2;
309 } 321 }
310 322
311 message RendererClientOnBufferingStateChange { 323 message RendererClientOnBufferingStateChange {
312 // Should align with ::media::BufferingState 324 // Proto version of media::BufferingState.
325 // NEVER change these numbers or re-use old ones; only add new ones.
313 enum State { 326 enum State {
314 BUFFERING_HAVE_NOTHING = 0; 327 BUFFERING_HAVE_NOTHING = 0;
315 BUFFERING_HAVE_ENOUGH = 1; 328 BUFFERING_HAVE_ENOUGH = 1;
316 }; 329 };
317 330
318 optional State state = 1; 331 optional State state = 1;
319 } 332 }
320 333
321 message DemuxerStreamReadUntil { 334 message DemuxerStreamReadUntil {
322 optional int32 callback_handle = 1; 335 optional int32 callback_handle = 1;
323 optional uint32 count = 2; 336 optional uint32 count = 2;
324 } 337 }
325 338
326 message DemuxerStreamInitializeCallback { 339 message DemuxerStreamInitializeCallback {
327 optional int32 type = 1; 340 optional int32 type = 1;
328 optional AudioDecoderConfig audio_decoder_config = 2; 341 optional AudioDecoderConfig audio_decoder_config = 2;
329 optional VideoDecoderConfig video_decoder_config = 3; 342 optional VideoDecoderConfig video_decoder_config = 3;
330 } 343 }
331 344
332 message DemuxerStreamReadUntilCallback { 345 message DemuxerStreamReadUntilCallback {
333 // Should align with ::media::DemuxerStream::Status 346 // Proto version of media::DemuxerStream::Status.
347 // NEVER change these numbers or re-use old ones; only add new ones.
334 enum Status { 348 enum Status {
335 kOk = 0; 349 kOk = 0;
336 kAborted = 1; 350 kAborted = 1;
337 kConfigChanged = 2; 351 kConfigChanged = 2;
338 }; 352 };
339 353
340 optional Status status = 1; 354 optional Status status = 1;
341 optional uint32 count = 2; 355 optional uint32 count = 2;
342 optional AudioDecoderConfig audio_decoder_config = 3; 356 optional AudioDecoderConfig audio_decoder_config = 3;
343 optional VideoDecoderConfig video_decoder_config = 4; 357 optional VideoDecoderConfig video_decoder_config = 4;
344 } 358 }
345 359
346 message CdmInitialize { 360 message CdmInitialize {
347 optional string key_system = 1; 361 optional string key_system = 1;
348 optional string security_origin = 2; 362 optional string security_origin = 2;
349 optional bool allow_distinctive_identifier = 3; 363 optional bool allow_distinctive_identifier = 3;
350 optional bool allow_persistent_state = 4; 364 optional bool allow_persistent_state = 4;
351 optional bool use_hw_secure_codecs = 5; 365 optional bool use_hw_secure_codecs = 5;
352 optional int32 callback_handle = 6; 366 optional int32 callback_handle = 6;
353 } 367 }
354 368
355 message CdmSetServerCertificate { 369 message CdmSetServerCertificate {
356 optional int32 callback_handle = 1; 370 optional int32 callback_handle = 1;
357 optional bytes certificate_data = 2; 371 optional bytes certificate_data = 2;
358 } 372 }
359 373
360 message CdmCreateSessionAndGenerateRequest { 374 message CdmCreateSessionAndGenerateRequest {
375 // Proto version of media::EmeInitDataType.
376 // NEVER change these numbers or re-use old ones; only add new ones.
361 enum EmeInitDataType { 377 enum EmeInitDataType {
362 UNKNOWN = 0; 378 UNKNOWN = 0;
363 WEBM = 1; 379 WEBM = 1;
364 CENC = 2; 380 CENC = 2;
365 KEYIDS = 3; 381 KEYIDS = 3;
366 }; 382 };
367 383
368 optional CdmSessionType session_type = 1; 384 optional CdmSessionType session_type = 1;
369 optional EmeInitDataType init_data_type = 2; 385 optional EmeInitDataType init_data_type = 2;
370 optional int32 callback_handle = 3; 386 optional int32 callback_handle = 3;
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 589
574 // RPC_CDMC_ONSESSIONMESSAGE 590 // RPC_CDMC_ONSESSIONMESSAGE
575 CdmClientOnSessionMessage cdmclient_onsessionmessage_rpc = 601; 591 CdmClientOnSessionMessage cdmclient_onsessionmessage_rpc = 601;
576 // RPC_CDMC_ONSESSIONKEYSCHANGE 592 // RPC_CDMC_ONSESSIONKEYSCHANGE
577 CdmClientOnSessionKeysChange cdmclient_onsessionkeychange_rpc = 602; 593 CdmClientOnSessionKeysChange cdmclient_onsessionkeychange_rpc = 602;
578 // RPC_CDMC_ONSESSIONEXPIRATIONUPDATE 594 // RPC_CDMC_ONSESSIONEXPIRATIONUPDATE
579 CdmClientOnSessionExpirationUpdate cdmclient_onsessionexpirationupdate_rpc = 595 CdmClientOnSessionExpirationUpdate cdmclient_onsessionexpirationupdate_rpc =
580 603; 596 603;
581 }; 597 };
582 } 598 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698