OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // IPC messages for EME on android. |
| 6 // Multiply-included message file, hence no include guard. |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "ipc/ipc_message_macros.h" |
| 11 |
| 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_SUPPORTED_CODECS = 0, |
| 22 WEBM_VP8_AND_VORBIS = 1 << 0, |
| 23 MP4_AAC = 1 << 1, |
| 24 MP4_AVC1 = 1 << 2, |
| 25 }; |
| 26 |
| 27 struct SupportedKeySystemRequest { |
| 28 SupportedKeySystemRequest(); |
| 29 ~SupportedKeySystemRequest(); |
| 30 |
| 31 // Key system UUID. |
| 32 std::vector<uint8> uuid; |
| 33 // Bitmask of requested codecs. |
| 34 SupportedCodecs codecs; |
| 35 }; |
| 36 |
| 37 struct SupportedKeySystemResponse { |
| 38 SupportedKeySystemResponse(); |
| 39 ~SupportedKeySystemResponse(); |
| 40 |
| 41 // Key system UUID. |
| 42 std::vector<uint8> uuid; |
| 43 // Bitmask of supported compositing codecs. |
| 44 SupportedCodecs compositing_codecs; |
| 45 // Bitmask of supported non-compositing codecs. |
| 46 SupportedCodecs non_compositing_codecs; |
| 47 }; |
| 48 |
| 49 } // namespace android |
| 50 |
| 51 #endif // CHROME_COMMON_ENCRYPTED_MEDIA_MESSAGES_ANDROID_H |
| 52 |
| 53 |
| 54 #define IPC_MESSAGE_START EncryptedMediaMsgStart |
| 55 |
| 56 IPC_ENUM_TRAITS(android::SupportedCodecs) |
| 57 |
| 58 IPC_STRUCT_TRAITS_BEGIN(android::SupportedKeySystemRequest) |
| 59 IPC_STRUCT_TRAITS_MEMBER(uuid) |
| 60 IPC_STRUCT_TRAITS_MEMBER(codecs) |
| 61 IPC_STRUCT_TRAITS_END() |
| 62 |
| 63 IPC_STRUCT_TRAITS_BEGIN(android::SupportedKeySystemResponse) |
| 64 IPC_STRUCT_TRAITS_MEMBER(uuid) |
| 65 IPC_STRUCT_TRAITS_MEMBER(compositing_codecs) |
| 66 IPC_STRUCT_TRAITS_MEMBER(non_compositing_codecs) |
| 67 IPC_STRUCT_TRAITS_END() |
| 68 |
| 69 |
| 70 // Messages sent from the renderer to the browser. |
| 71 |
| 72 // Synchronously get a list of supported EME key systems. |
| 73 IPC_SYNC_MESSAGE_CONTROL1_1( |
| 74 ChromeViewHostMsg_GetSupportedKeySystems, |
| 75 android::SupportedKeySystemRequest /* key system information request */, |
| 76 android::SupportedKeySystemResponse /* key system information response */) |
OLD | NEW |