OLD | NEW |
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 #include "content/common/common_param_traits.h" | 5 #include "content/common/common_param_traits.h" |
6 #include "ipc/ipc_message_macros.h" | 6 #include "ipc/ipc_message_macros.h" |
7 #include "media/video/capture/video_capture.h" | 7 #include "media/video/capture/video_capture.h" |
8 | 8 |
9 #define IPC_MESSAGE_START VideoCaptureMsgStart | 9 #define IPC_MESSAGE_START VideoCaptureMsgStart |
10 | 10 |
11 IPC_ENUM_TRAITS(media::VideoCapture::State) | 11 IPC_ENUM_TRAITS(media::VideoCapture::State) |
12 | 12 |
13 IPC_STRUCT_TRAITS_BEGIN(media::VideoCaptureParams) | 13 IPC_STRUCT_TRAITS_BEGIN(media::VideoCaptureParams) |
14 IPC_STRUCT_TRAITS_MEMBER(width) | 14 IPC_STRUCT_TRAITS_MEMBER(width) |
15 IPC_STRUCT_TRAITS_MEMBER(height) | 15 IPC_STRUCT_TRAITS_MEMBER(height) |
16 IPC_STRUCT_TRAITS_MEMBER(frame_per_second) | 16 IPC_STRUCT_TRAITS_MEMBER(frame_per_second) |
17 IPC_STRUCT_TRAITS_MEMBER(session_id) | 17 IPC_STRUCT_TRAITS_MEMBER(session_id) |
18 IPC_STRUCT_TRAITS_END() | 18 IPC_STRUCT_TRAITS_END() |
19 | 19 |
20 // Notify the renderer process about the state update such as | 20 // Notify the renderer process about the state update such as |
21 // Start/Pause/Stop. | 21 // Start/Pause/Stop. |
22 IPC_MESSAGE_ROUTED2(VideoCaptureMsg_StateChanged, | 22 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_StateChanged, |
23 int /* device id */, | 23 int /* device id */, |
24 media::VideoCapture::State /* new state */) | 24 media::VideoCapture::State /* new state */) |
25 | 25 |
26 // Tell the renderer process that a new buffer is allocated for video capture. | 26 // Tell the renderer process that a new buffer is allocated for video capture. |
27 IPC_MESSAGE_ROUTED4(VideoCaptureMsg_NewBuffer, | 27 IPC_MESSAGE_CONTROL4(VideoCaptureMsg_NewBuffer, |
28 int /* device id */, | 28 int /* device id */, |
29 base::SharedMemoryHandle /* handle */, | 29 base::SharedMemoryHandle /* handle */, |
30 int /* length */, | 30 int /* length */, |
31 int /* buffer_id */) | 31 int /* buffer_id */) |
32 | 32 |
33 // Tell the renderer process that a buffer is available from video capture. | 33 // Tell the renderer process that a buffer is available from video capture. |
34 IPC_MESSAGE_ROUTED3(VideoCaptureMsg_BufferReady, | 34 IPC_MESSAGE_CONTROL3(VideoCaptureMsg_BufferReady, |
35 int /* device id */, | 35 int /* device id */, |
36 int /* buffer_id */, | 36 int /* buffer_id */, |
37 base::Time /* timestamp */) | 37 base::Time /* timestamp */) |
38 | 38 |
39 // Tell the renderer process the width, height and frame rate the camera use. | 39 // Tell the renderer process the width, height and frame rate the camera use. |
40 IPC_MESSAGE_ROUTED2(VideoCaptureMsg_DeviceInfo, | 40 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_DeviceInfo, |
41 int /* device_id */, | 41 int /* device_id */, |
42 media::VideoCaptureParams) | 42 media::VideoCaptureParams) |
43 | 43 |
44 // Start the video capture specified by (routing_id, device_id). | 44 // Start the video capture specified by (routing_id, device_id). |
45 IPC_MESSAGE_ROUTED2(VideoCaptureHostMsg_Start, | 45 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_Start, |
46 int /* device_id */, | 46 int /* device_id */, |
47 media::VideoCaptureParams) | 47 media::VideoCaptureParams) |
48 | 48 |
49 // Pause the video capture specified by (routing_id, device_id). | 49 // Pause the video capture specified by (routing_id, device_id). |
50 IPC_MESSAGE_ROUTED1(VideoCaptureHostMsg_Pause, | 50 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Pause, |
51 int /* device_id */) | 51 int /* device_id */) |
52 | 52 |
53 // Close the video capture specified by (routing_id, device_id). | 53 // Close the video capture specified by (routing_id, device_id). |
54 IPC_MESSAGE_ROUTED1(VideoCaptureHostMsg_Stop, | 54 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Stop, |
55 int /* device_id */) | 55 int /* device_id */) |
56 | 56 |
57 // Tell the browser process that the video frame buffer |handle| is ready for | 57 // Tell the browser process that the video frame buffer |handle| is ready for |
58 // device (routing_id, device_id) to fill up. | 58 // device (routing_id, device_id) to fill up. |
59 IPC_MESSAGE_ROUTED2(VideoCaptureHostMsg_BufferReady, | 59 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_BufferReady, |
60 int /* device_id */, | 60 int /* device_id */, |
61 int /* buffer_id */) | 61 int /* buffer_id */) |
OLD | NEW |