| OLD | NEW |
| 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 KEY_STATUS_PENDING = 5; | 253 KEY_STATUS_PENDING = 5; |
| 254 RELEASED = 6; | 254 RELEASED = 6; |
| 255 } | 255 } |
| 256 | 256 |
| 257 optional bytes key_id = 1; | 257 optional bytes key_id = 1; |
| 258 optional KeyStatus status = 2; | 258 optional KeyStatus status = 2; |
| 259 optional uint32 system_code = 3; | 259 optional uint32 system_code = 3; |
| 260 } | 260 } |
| 261 | 261 |
| 262 // Should align with ::media::CdmPromise::Exception | 262 // Should align with ::media::CdmPromise::Exception |
| 263 enum MediaKeysException { | 263 enum CdmException { |
| 264 NOT_SUPPORTED_ERROR = 0; | 264 NOT_SUPPORTED_ERROR = 0; |
| 265 INVALID_STATE_ERROR = 1; | 265 INVALID_STATE_ERROR = 1; |
| 266 INVALID_ACCESS_ERROR = 2; | 266 INVALID_ACCESS_ERROR = 2; |
| 267 QUOTA_EXCEEDED_ERROR = 3; | 267 QUOTA_EXCEEDED_ERROR = 3; |
| 268 UNKNOWN_ERROR = 4; | 268 UNKNOWN_ERROR = 4; |
| 269 CLIENT_ERROR = 5; | 269 CLIENT_ERROR = 5; |
| 270 OUTPUT_ERROR = 6; | 270 OUTPUT_ERROR = 6; |
| 271 } | 271 } |
| 272 | 272 |
| 273 // Should align with ::media::MediaKeys::MessageType | 273 // Should align with ::media::ContentDecryptionModule::MessageType |
| 274 enum MediaKeysMessageType { | 274 enum CdmMessageType { |
| 275 LICENSE_REQUEST = 0; | 275 LICENSE_REQUEST = 0; |
| 276 LICENSE_RENEWAL = 1; | 276 LICENSE_RENEWAL = 1; |
| 277 LICENSE_RELEASE = 2; | 277 LICENSE_RELEASE = 2; |
| 278 } | 278 } |
| 279 | 279 |
| 280 // Should align with ::media::MediaKeys::SessionType | 280 // Should align with ::media::ContentDecryptionModule::SessionType |
| 281 enum MediaKeysSessionType { | 281 enum CdmSessionType { |
| 282 TEMPORARY_SESSION = 0; | 282 TEMPORARY_SESSION = 0; |
| 283 PERSISTENT_LICENSE_SESSION = 1; | 283 PERSISTENT_LICENSE_SESSION = 1; |
| 284 PERSISTENT_RELEASE_MESSAGE_SESSION = 2; | 284 PERSISTENT_RELEASE_MESSAGE_SESSION = 2; |
| 285 }; | 285 }; |
| 286 | 286 |
| 287 message RendererInitialize { | 287 message RendererInitialize { |
| 288 optional int32 client_handle = 1; | 288 optional int32 client_handle = 1; |
| 289 optional int32 audio_demuxer_handle = 2; | 289 optional int32 audio_demuxer_handle = 2; |
| 290 optional int32 video_demuxer_handle = 3; | 290 optional int32 video_demuxer_handle = 3; |
| 291 optional int32 callback_handle = 4; | 291 optional int32 callback_handle = 4; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 } | 357 } |
| 358 | 358 |
| 359 message CdmCreateSessionAndGenerateRequest { | 359 message CdmCreateSessionAndGenerateRequest { |
| 360 enum EmeInitDataType { | 360 enum EmeInitDataType { |
| 361 UNKNOWN = 0; | 361 UNKNOWN = 0; |
| 362 WEBM = 1; | 362 WEBM = 1; |
| 363 CENC = 2; | 363 CENC = 2; |
| 364 KEYIDS = 3; | 364 KEYIDS = 3; |
| 365 }; | 365 }; |
| 366 | 366 |
| 367 optional MediaKeysSessionType session_type = 1; | 367 optional CdmSessionType session_type = 1; |
| 368 optional EmeInitDataType init_data_type = 2; | 368 optional EmeInitDataType init_data_type = 2; |
| 369 optional int32 callback_handle = 3; | 369 optional int32 callback_handle = 3; |
| 370 optional bytes init_data = 4; | 370 optional bytes init_data = 4; |
| 371 } | 371 } |
| 372 | 372 |
| 373 message CdmLoadSession { | 373 message CdmLoadSession { |
| 374 optional MediaKeysSessionType session_type = 1; | 374 optional CdmSessionType session_type = 1; |
| 375 optional string session_id = 2; | 375 optional string session_id = 2; |
| 376 optional int32 callback_handle = 3; | 376 optional int32 callback_handle = 3; |
| 377 } | 377 } |
| 378 | 378 |
| 379 message CdmUpdateSession { | 379 message CdmUpdateSession { |
| 380 optional string session_id = 1; | 380 optional string session_id = 1; |
| 381 optional int32 callback_handle = 2; | 381 optional int32 callback_handle = 2; |
| 382 optional bytes response = 3; | 382 optional bytes response = 3; |
| 383 } | 383 } |
| 384 | 384 |
| 385 message CdmCloseSession { | 385 message CdmCloseSession { |
| 386 optional string session_id = 1; | 386 optional string session_id = 1; |
| 387 optional int32 callback_handle = 2; | 387 optional int32 callback_handle = 2; |
| 388 } | 388 } |
| 389 | 389 |
| 390 message CdmRemoveSession { | 390 message CdmRemoveSession { |
| 391 optional string session_id = 1; | 391 optional string session_id = 1; |
| 392 optional int32 callback_handle = 2; | 392 optional int32 callback_handle = 2; |
| 393 } | 393 } |
| 394 | 394 |
| 395 message CdmPromise { | 395 message CdmPromise { |
| 396 // These two fields are used only for RPC_CDM_INITIALIZE_CALLBACK | 396 // These two fields are used only for RPC_CDM_INITIALIZE_CALLBACK |
| 397 optional int32 cdm_id = 1; | 397 optional int32 cdm_id = 1; |
| 398 optional int32 decryptor_handle = 2; | 398 optional int32 decryptor_handle = 2; |
| 399 | 399 |
| 400 optional string session_id = 3; | 400 optional string session_id = 3; |
| 401 optional bool success = 4; | 401 optional bool success = 4; |
| 402 optional MediaKeysException exception = 5; | 402 optional CdmException exception = 5; |
| 403 optional uint32 system_code = 6; | 403 optional uint32 system_code = 6; |
| 404 optional string error_message = 7; | 404 optional string error_message = 7; |
| 405 } | 405 } |
| 406 | 406 |
| 407 message CdmClientOnSessionMessage { | 407 message CdmClientOnSessionMessage { |
| 408 optional string session_id = 1; | 408 optional string session_id = 1; |
| 409 optional MediaKeysMessageType message_type = 2; | 409 optional CdmMessageType message_type = 2; |
| 410 optional bytes message = 3; | 410 optional bytes message = 3; |
| 411 } | 411 } |
| 412 | 412 |
| 413 message CdmClientOnSessionKeysChange { | 413 message CdmClientOnSessionKeysChange { |
| 414 optional string session_id = 1; | 414 optional string session_id = 1; |
| 415 optional bool has_additional_usable_key = 2; | 415 optional bool has_additional_usable_key = 2; |
| 416 repeated CdmKeyInformation key_information = 3; | 416 repeated CdmKeyInformation key_information = 3; |
| 417 } | 417 } |
| 418 | 418 |
| 419 message CdmClientOnSessionExpirationUpdate { | 419 message CdmClientOnSessionExpirationUpdate { |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 | 572 |
| 573 // RPC_CDMC_ONSESSIONMESSAGE | 573 // RPC_CDMC_ONSESSIONMESSAGE |
| 574 CdmClientOnSessionMessage cdmclient_onsessionmessage_rpc = 601; | 574 CdmClientOnSessionMessage cdmclient_onsessionmessage_rpc = 601; |
| 575 // RPC_CDMC_ONSESSIONKEYSCHANGE | 575 // RPC_CDMC_ONSESSIONKEYSCHANGE |
| 576 CdmClientOnSessionKeysChange cdmclient_onsessionkeychange_rpc = 602; | 576 CdmClientOnSessionKeysChange cdmclient_onsessionkeychange_rpc = 602; |
| 577 // RPC_CDMC_ONSESSIONEXPIRATIONUPDATE | 577 // RPC_CDMC_ONSESSIONEXPIRATIONUPDATE |
| 578 CdmClientOnSessionExpirationUpdate cdmclient_onsessionexpirationupdate_rpc = | 578 CdmClientOnSessionExpirationUpdate cdmclient_onsessionexpirationupdate_rpc = |
| 579 603; | 579 603; |
| 580 }; | 580 }; |
| 581 } | 581 } |
| OLD | NEW |