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 <string> | |
9 #include <vector> | |
10 | |
11 #include "ipc/ipc_message_macros.h" | |
12 | |
13 // Singly-included section for enums and custom IPC traits. | |
14 #ifndef CHROME_COMMON_ENCRYPTED_MEDIA_MESSAGES_ANDROID_H | |
15 #define CHROME_COMMON_ENCRYPTED_MEDIA_MESSAGES_ANDROID_H | |
16 | |
17 namespace android { | |
18 | |
19 // Defines bitmask values used to specify supported codecs. | |
20 // Each value represents a codec within a specific container. | |
21 enum SupportedCodecs { | |
22 NO_SUPPORTED_CODECS = 0, | |
23 WEBM_VP8_AND_VORBIS = 1 << 0, | |
24 MP4_AAC = 1 << 1, | |
25 MP4_AVC1 = 1 << 2, | |
26 }; | |
27 | |
28 struct SupportedKeySystemRequest { | |
29 SupportedKeySystemRequest(); | |
30 ~SupportedKeySystemRequest(); | |
31 | |
32 // Key system UUID. | |
33 std::vector<uint8> uuid; | |
34 // Bitmask of requested codecs. | |
35 SupportedCodecs requested_codecs; | |
ddorwin
2013/09/18 03:58:31
nit: requested_ is redundant in the type (and hope
qinmin
2013/09/18 05:08:21
Done.
| |
36 }; | |
37 | |
38 struct SupportedKeySystemResponse { | |
39 SupportedKeySystemResponse(); | |
40 ~SupportedKeySystemResponse(); | |
41 | |
42 // Key system UUID. | |
43 std::vector<uint8> uuid; | |
44 // Bitmask of supported compositing codecs. | |
45 SupportedCodecs compositing_codecs; | |
46 // Bitmask of supported non-compositing codecs. | |
47 SupportedCodecs non_compositing_codecs; | |
48 }; | |
49 | |
50 } // namespace android | |
51 | |
52 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | |
53 | |
54 | |
55 #define IPC_MESSAGE_START EncryptedMediaMsgStart | |
56 | |
57 IPC_ENUM_TRAITS(android::SupportedCodecs) | |
58 | |
59 IPC_STRUCT_TRAITS_BEGIN(android::SupportedKeySystemRequest) | |
60 IPC_STRUCT_TRAITS_MEMBER(uuid) | |
61 IPC_STRUCT_TRAITS_MEMBER(requested_codecs) | |
62 IPC_STRUCT_TRAITS_END() | |
63 | |
64 IPC_STRUCT_TRAITS_BEGIN(android::SupportedKeySystemResponse) | |
65 IPC_STRUCT_TRAITS_MEMBER(uuid) | |
66 IPC_STRUCT_TRAITS_MEMBER(compositing_codecs) | |
67 IPC_STRUCT_TRAITS_MEMBER(non_compositing_codecs) | |
68 IPC_STRUCT_TRAITS_END() | |
69 | |
70 | |
71 // Messages sent from the renderer to the browser. | |
72 | |
73 // Synchronously get a list of supported EME key systems. | |
74 IPC_SYNC_MESSAGE_CONTROL1_1( | |
75 ChromeViewHostMsg_GetSupportedKeySystems, | |
76 android::SupportedKeySystemRequest /* key system information request */, | |
77 android::SupportedKeySystemResponse /* key system information response */) | |
OLD | NEW |