| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // IPC messages for EME on android. | 5 // IPC messages for EME on android. |
| 6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ipc/ipc_message_macros.h" | 10 #include "ipc/ipc_message_macros.h" |
| 11 | 11 #include "media/cdm/encrypted_media_codecs.h" |
| 12 // Singly-included section for enums and custom IPC traits. | |
| 13 #ifndef CHROME_COMMON_ENCRYPTED_MEDIA_MESSAGES_ANDROID_H | |
| 14 #define CHROME_COMMON_ENCRYPTED_MEDIA_MESSAGES_ANDROID_H | |
| 15 | |
| 16 namespace android { | |
| 17 | |
| 18 // Defines bitmask values used to specify supported codecs. | |
| 19 // Each value represents a codec within a specific container. | |
| 20 enum SupportedCodecs { | |
| 21 NO_CODECS = 0, | |
| 22 WEBM_VORBIS = 1 << 0, | |
| 23 WEBM_VP8 = 1 << 1, | |
| 24 WEBM_CODECS = (WEBM_VORBIS | WEBM_VP8), | |
| 25 MP4_AAC = 1 << 2, | |
| 26 MP4_AVC1 = 1 << 3, | |
| 27 MP4_CODECS = (MP4_AAC | MP4_AVC1), | |
| 28 ALL_CODECS = (WEBM_CODECS | MP4_CODECS), | |
| 29 INVALID_CODECS = ~ALL_CODECS | |
| 30 }; | |
| 31 | |
| 32 } // namespace android | |
| 33 | |
| 34 #endif // CHROME_COMMON_ENCRYPTED_MEDIA_MESSAGES_ANDROID_H | |
| 35 | |
| 36 | 12 |
| 37 #define IPC_MESSAGE_START EncryptedMediaMsgStart | 13 #define IPC_MESSAGE_START EncryptedMediaMsgStart |
| 38 | 14 |
| 39 IPC_ENUM_TRAITS(android::SupportedCodecs) | 15 IPC_ENUM_TRAITS(media::SupportedCodecs) |
| 40 | 16 |
| 41 IPC_STRUCT_BEGIN(SupportedKeySystemRequest) | 17 IPC_STRUCT_BEGIN(SupportedKeySystemRequest) |
| 42 IPC_STRUCT_MEMBER(std::string, key_system) | 18 IPC_STRUCT_MEMBER(std::string, key_system) |
| 43 IPC_STRUCT_MEMBER(android::SupportedCodecs, codecs, | 19 IPC_STRUCT_MEMBER(media::SupportedCodecs, codecs, media::NO_CODECS) |
| 44 android::NO_CODECS) | |
| 45 IPC_STRUCT_END() | 20 IPC_STRUCT_END() |
| 46 | 21 |
| 47 IPC_STRUCT_BEGIN(SupportedKeySystemResponse) | 22 IPC_STRUCT_BEGIN(SupportedKeySystemResponse) |
| 48 IPC_STRUCT_MEMBER(std::string, key_system) | 23 IPC_STRUCT_MEMBER(std::string, key_system) |
| 49 IPC_STRUCT_MEMBER(android::SupportedCodecs, compositing_codecs, | 24 IPC_STRUCT_MEMBER(media::SupportedCodecs, |
| 50 android::NO_CODECS) | 25 compositing_codecs, |
| 51 IPC_STRUCT_MEMBER(android::SupportedCodecs, non_compositing_codecs, | 26 media::NO_CODECS) |
| 52 android::NO_CODECS) | 27 IPC_STRUCT_MEMBER(media::SupportedCodecs, |
| 28 non_compositing_codecs, |
| 29 media::NO_CODECS) |
| 53 IPC_STRUCT_END() | 30 IPC_STRUCT_END() |
| 54 | 31 |
| 55 // Messages sent from the renderer to the browser. | 32 // Messages sent from the renderer to the browser. |
| 56 | 33 |
| 57 // Synchronously get a list of supported EME key systems. | 34 // Synchronously get a list of supported EME key systems. |
| 58 IPC_SYNC_MESSAGE_CONTROL1_1( | 35 IPC_SYNC_MESSAGE_CONTROL1_1( |
| 59 ChromeViewHostMsg_GetSupportedKeySystems, | 36 ChromeViewHostMsg_GetSupportedKeySystems, |
| 60 SupportedKeySystemRequest /* key system information request */, | 37 SupportedKeySystemRequest /* key system information request */, |
| 61 SupportedKeySystemResponse /* key system information response */) | 38 SupportedKeySystemResponse /* key system information response */) |
| OLD | NEW |