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

Side by Side Diff: ppapi/proxy/ppapi_messages.h

Issue 7545014: Implement PPAPI VideoDecode out-of-process support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Multiply-included message header, no traditional include guard. 5 // Multiply-included message header, no traditional include guard.
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
11 #include "base/process.h" 11 #include "base/process.h"
12 #include "base/shared_memory.h" 12 #include "base/shared_memory.h"
13 #include "base/string16.h" 13 #include "base/string16.h"
14 #include "base/sync_socket.h" 14 #include "base/sync_socket.h"
15 #include "gpu/command_buffer/common/command_buffer.h" 15 #include "gpu/command_buffer/common/command_buffer.h"
16 #include "gpu/ipc/gpu_command_buffer_traits.h" 16 #include "gpu/ipc/gpu_command_buffer_traits.h"
17 #include "ipc/ipc_channel_handle.h" 17 #include "ipc/ipc_channel_handle.h"
18 #include "ipc/ipc_message_macros.h" 18 #include "ipc/ipc_message_macros.h"
19 #include "ipc/ipc_message_utils.h" 19 #include "ipc/ipc_message_utils.h"
20 #include "ipc/ipc_platform_file.h" 20 #include "ipc/ipc_platform_file.h"
21 #include "ppapi/c/pp_bool.h" 21 #include "ppapi/c/pp_bool.h"
22 #include "ppapi/c/pp_file_info.h" 22 #include "ppapi/c/pp_file_info.h"
23 #include "ppapi/c/pp_instance.h" 23 #include "ppapi/c/pp_instance.h"
24 #include "ppapi/c/pp_module.h" 24 #include "ppapi/c/pp_module.h"
25 #include "ppapi/c/pp_point.h" 25 #include "ppapi/c/pp_point.h"
26 #include "ppapi/c/pp_rect.h" 26 #include "ppapi/c/pp_rect.h"
27 #include "ppapi/c/pp_resource.h" 27 #include "ppapi/c/pp_resource.h"
28 #include "ppapi/c/pp_size.h" 28 #include "ppapi/c/pp_size.h"
29 #include "ppapi/c/dev/pp_video_dev.h"
29 #include "ppapi/c/private/ppb_flash_tcp_socket.h" 30 #include "ppapi/c/private/ppb_flash_tcp_socket.h"
30 #include "ppapi/proxy/ppapi_param_traits.h" 31 #include "ppapi/proxy/ppapi_param_traits.h"
31 #include "ppapi/proxy/serialized_flash_menu.h" 32 #include "ppapi/proxy/serialized_flash_menu.h"
32 #include "ppapi/proxy/serialized_structs.h" 33 #include "ppapi/proxy/serialized_structs.h"
33 #include "ppapi/shared_impl/input_event_impl.h" 34 #include "ppapi/shared_impl/input_event_impl.h"
34 #include "ppapi/shared_impl/ppapi_preferences.h" 35 #include "ppapi/shared_impl/ppapi_preferences.h"
35 36
36 #define IPC_MESSAGE_START PpapiMsgStart 37 #define IPC_MESSAGE_START PpapiMsgStart
37 38
38 IPC_ENUM_TRAITS(PP_InputEvent_Type) 39 IPC_ENUM_TRAITS(PP_InputEvent_Type)
39 IPC_ENUM_TRAITS(PP_InputEvent_MouseButton) 40 IPC_ENUM_TRAITS(PP_InputEvent_MouseButton)
41 IPC_ENUM_TRAITS(PP_VideoDecodeError_Dev)
40 42
41 IPC_STRUCT_TRAITS_BEGIN(PP_Point) 43 IPC_STRUCT_TRAITS_BEGIN(PP_Point)
42 IPC_STRUCT_TRAITS_MEMBER(x) 44 IPC_STRUCT_TRAITS_MEMBER(x)
43 IPC_STRUCT_TRAITS_MEMBER(y) 45 IPC_STRUCT_TRAITS_MEMBER(y)
44 IPC_STRUCT_TRAITS_END() 46 IPC_STRUCT_TRAITS_END()
45 47
46 IPC_STRUCT_TRAITS_BEGIN(PP_FloatPoint) 48 IPC_STRUCT_TRAITS_BEGIN(PP_FloatPoint)
47 IPC_STRUCT_TRAITS_MEMBER(x) 49 IPC_STRUCT_TRAITS_MEMBER(x)
48 IPC_STRUCT_TRAITS_MEMBER(y) 50 IPC_STRUCT_TRAITS_MEMBER(y)
49 IPC_STRUCT_TRAITS_END() 51 IPC_STRUCT_TRAITS_END()
50 52
51 IPC_STRUCT_TRAITS_BEGIN(PP_Size) 53 IPC_STRUCT_TRAITS_BEGIN(PP_Size)
52 IPC_STRUCT_TRAITS_MEMBER(height) 54 IPC_STRUCT_TRAITS_MEMBER(height)
53 IPC_STRUCT_TRAITS_MEMBER(width) 55 IPC_STRUCT_TRAITS_MEMBER(width)
54 IPC_STRUCT_TRAITS_END() 56 IPC_STRUCT_TRAITS_END()
55 57
56 IPC_STRUCT_TRAITS_BEGIN(PP_Rect) 58 IPC_STRUCT_TRAITS_BEGIN(PP_Rect)
57 IPC_STRUCT_TRAITS_MEMBER(point) 59 IPC_STRUCT_TRAITS_MEMBER(point)
58 IPC_STRUCT_TRAITS_MEMBER(size) 60 IPC_STRUCT_TRAITS_MEMBER(size)
59 IPC_STRUCT_TRAITS_END() 61 IPC_STRUCT_TRAITS_END()
60 62
63 IPC_STRUCT_TRAITS_BEGIN(PP_PictureBuffer_Dev)
64 IPC_STRUCT_TRAITS_MEMBER(id)
65 IPC_STRUCT_TRAITS_MEMBER(size)
66 IPC_STRUCT_TRAITS_MEMBER(texture_id)
67 IPC_STRUCT_TRAITS_END()
68
69 IPC_STRUCT_TRAITS_BEGIN(PP_Picture_Dev)
70 IPC_STRUCT_TRAITS_MEMBER(picture_buffer_id)
71 IPC_STRUCT_TRAITS_MEMBER(bitstream_buffer_id)
72 IPC_STRUCT_TRAITS_END()
73
61 IPC_STRUCT_TRAITS_BEGIN(::ppapi::Preferences) 74 IPC_STRUCT_TRAITS_BEGIN(::ppapi::Preferences)
62 IPC_STRUCT_TRAITS_MEMBER(standard_font_family) 75 IPC_STRUCT_TRAITS_MEMBER(standard_font_family)
63 IPC_STRUCT_TRAITS_MEMBER(fixed_font_family) 76 IPC_STRUCT_TRAITS_MEMBER(fixed_font_family)
64 IPC_STRUCT_TRAITS_MEMBER(serif_font_family) 77 IPC_STRUCT_TRAITS_MEMBER(serif_font_family)
65 IPC_STRUCT_TRAITS_MEMBER(sans_serif_font_family) 78 IPC_STRUCT_TRAITS_MEMBER(sans_serif_font_family)
66 IPC_STRUCT_TRAITS_MEMBER(default_font_size) 79 IPC_STRUCT_TRAITS_MEMBER(default_font_size)
67 IPC_STRUCT_TRAITS_MEMBER(default_fixed_font_size) 80 IPC_STRUCT_TRAITS_MEMBER(default_fixed_font_size)
68 IPC_STRUCT_TRAITS_END() 81 IPC_STRUCT_TRAITS_END()
69 82
70 IPC_STRUCT_TRAITS_BEGIN(::ppapi::InputEventData) 83 IPC_STRUCT_TRAITS_BEGIN(::ppapi::InputEventData)
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 318
306 // PPB_URLLoader 319 // PPB_URLLoader
307 // (Messages from browser to plugin to notify it of changes in state.) 320 // (Messages from browser to plugin to notify it of changes in state.)
308 IPC_MESSAGE_ROUTED1(PpapiMsg_PPBURLLoader_UpdateProgress, 321 IPC_MESSAGE_ROUTED1(PpapiMsg_PPBURLLoader_UpdateProgress,
309 pp::proxy::PPBURLLoader_UpdateProgress_Params /* params */) 322 pp::proxy::PPBURLLoader_UpdateProgress_Params /* params */)
310 IPC_MESSAGE_ROUTED3(PpapiMsg_PPBURLLoader_ReadResponseBody_Ack, 323 IPC_MESSAGE_ROUTED3(PpapiMsg_PPBURLLoader_ReadResponseBody_Ack,
311 pp::proxy::HostResource /* loader */, 324 pp::proxy::HostResource /* loader */,
312 int32 /* result */, 325 int32 /* result */,
313 std::string /* data */) 326 std::string /* data */)
314 327
328 // PPB_VideoDecoder_Dev.
329 // (Messages from renderer to plugin to notify it to run callbacks.)
330 IPC_MESSAGE_ROUTED3(PpapiMsg_PPBVideoDecoder_EndOfBitstreamACK,
331 pp::proxy::HostResource /* video_decoder */,
332 int32_t /* bitstream buffer id */,
333 int32_t /* error result for callback */)
Ami GONE FROM CHROMIUM 2011/08/03 20:25:53 But these aren't errors most of the time (they're
vrk (LEFT CHROMIUM) 2011/08/03 22:05:22 Talked in person. Done.
334 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBVideoDecoder_FlushACK,
335 pp::proxy::HostResource /* video_decoder */,
336 int32_t /* error result for callback */)
337 IPC_MESSAGE_ROUTED2(PpapiMsg_PPBVideoDecoder_ResetACK,
338 pp::proxy::HostResource /* video_decoder */,
339 int32_t /* error result for callback */)
340
341 // PPP_VideoDecoder_Dev.
342 IPC_MESSAGE_ROUTED3(PpapiMsg_PPPVideoDecoder_ProvidePictureBuffers,
343 pp::proxy::HostResource /* video_decoder */,
344 uint32_t /* requested number of buffers */,
345 PP_Size /* dimensions of buffers */)
346 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_DismissPictureBuffer,
347 pp::proxy::HostResource /* video_decoder */,
348 int32_t /* picture buffer id */)
349 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_PictureReady,
350 pp::proxy::HostResource /* video_decoder */,
351 PP_Picture_Dev /* output picture */)
352 IPC_MESSAGE_ROUTED1(PpapiMsg_PPPVideoDecoder_NotifyEndOfStream,
353 pp::proxy::HostResource /* video_decoder */)
354 IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_NotifyError,
355 pp::proxy::HostResource /* video_decoder */,
356 PP_VideoDecodeError_Dev /* error */)
357
315 // ----------------------------------------------------------------------------- 358 // -----------------------------------------------------------------------------
316 // These are from the plugin to the renderer. 359 // These are from the plugin to the renderer.
317 360
318 // Reply to PpapiMsg_CreateChannel. The handle will be NULL if the channel 361 // Reply to PpapiMsg_CreateChannel. The handle will be NULL if the channel
319 // could not be established. This could be because the IPC could not be created 362 // could not be established. This could be because the IPC could not be created
320 // for some weird reason, but more likely that the plugin failed to load or 363 // for some weird reason, but more likely that the plugin failed to load or
321 // initialize properly. 364 // initialize properly.
322 IPC_MESSAGE_CONTROL1(PpapiHostMsg_ChannelCreated, 365 IPC_MESSAGE_CONTROL1(PpapiHostMsg_ChannelCreated,
323 IPC::ChannelHandle /* handle */) 366 IPC::ChannelHandle /* handle */)
324 367
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 PP_Bool /* is_always_opaque */, 937 PP_Bool /* is_always_opaque */,
895 pp::proxy::HostResource /* result */) 938 pp::proxy::HostResource /* result */)
896 IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_ResourceCreation_ImageData, 939 IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_ResourceCreation_ImageData,
897 PP_Instance /* instance */, 940 PP_Instance /* instance */,
898 int32 /* format */, 941 int32 /* format */,
899 PP_Size /* size */, 942 PP_Size /* size */,
900 PP_Bool /* init_to_zero */, 943 PP_Bool /* init_to_zero */,
901 pp::proxy::HostResource /* result_resource */, 944 pp::proxy::HostResource /* result_resource */,
902 std::string /* image_data_desc */, 945 std::string /* image_data_desc */,
903 pp::proxy::ImageHandle /* result */) 946 pp::proxy::ImageHandle /* result */)
947 // PPB_VideoDecoder.
948 IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVideoDecoder_Create,
949 PP_Instance /* instance */,
950 pp::proxy::HostResource /* context */,
951 std::vector<PP_VideoConfigElement> /* config */,
952 pp::proxy::HostResource /* result */)
953 IPC_MESSAGE_ROUTED4(PpapiHostMsg_PPBVideoDecoder_Decode,
954 pp::proxy::HostResource /* video_decoder */,
955 pp::proxy::HostResource /* bitstream buffer */,
956 int32 /* bitstream buffer id */,
957 int32 /* size of buffer */)
958 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBVideoDecoder_AssignPictureBuffers,
959 pp::proxy::HostResource /* video_decoder */,
960 std::vector<PP_PictureBuffer_Dev> /* picture buffers */)
961 IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBVideoDecoder_ReusePictureBuffer,
962 pp::proxy::HostResource /* video_decoder */,
963 int32_t /* picture buffer id */)
964 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVideoDecoder_Flush,
965 pp::proxy::HostResource /* video_decoder */)
966 IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVideoDecoder_Reset,
967 pp::proxy::HostResource /* video_decoder */)
968 IPC_SYNC_MESSAGE_ROUTED1_0(PpapiHostMsg_PPBVideoDecoder_Destroy,
969 pp::proxy::HostResource /* video_decoder */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698